# Project Name: Icu_Port_Wakeup_demo
---
## Function Description
This project showcases a demo for waking up the ICU from either Standby mode or PowerDown mode. SW3 is capable of waking up from PowerDown mode, while both SW3 and SW2 can wake up from Standby mode. SW3 is configured with EcuM and will report EcuM events.

---
## Operation in Standby Mode (Default)
+ ***Step 1***: Download the code into the EVB. After 5 seconds, JTAG will be lost as the MCU enters Standby mode (the user can change the code to Power-Down Mode). Only the Blue LED will light.
+ ***Step 2***: Press SW2 to wake up the MCU. The MCU will resume running and the Green LED will light.
+ ***Step 3***: Reset the board. Wait for the Blue LED to light, then press SW3 to wake up the MCU. Both the Green and Red LEDs will light, and EcuM events will be set up.

![EcuM](./image.png)

---

## Operation in PowerDown Mode
Change the code `Mcu_SetMode(McuConf_McuModeSettingConf_McuModeSettingConf_1);` to `Mcu_SetMode(McuConf_McuModeSettingConf_McuModeSettingConf_2);`
+ ***Step 1***: Download the code into the EVB. After 5 seconds, JTAG will be lost as the MCU enters PowerDown mode. Only the Blue LED will light.
+ ***Step 2***: Press SW3 (SW2 cannot wake up from PowerDown mode) to wake up the MCU. The MCU will resume running and halt in IcuWakeupNotification. Only the Red LED will light.
---
## Icu HW Connection Diagram
Not required.

---
## Hardware requirement
+ **EVB**: YTM32B1MD1-EVB-Q100-Rev.A/B
+ **Debugger**: J-Link HW v9 or later with YUNTU `YTM32B1MD1` patch(support package) installed.

**Note**: Please check the version number at the bottom of the EVB. If it is `YTM32B1MD1-EVB-Q100-Rev.A/B`, please use the example projects ending with `_RevA` for `Icu_Demo`.
---

## Software requirement

+ **Config & Code Generation Tool**
  + **MCAL**: Yuntu Config Tool(YCT) v2.7.0 or later version
+ **Compiler Toolchain**
  + **GCC**: GNU GCC v10.3 or later version
  + **Keil/MDK**: ARM Keil/MDK v5.36 or later version(`armclang v6.18.2` is recommended to be used as the compiler)
  + **IAR**: IAR v9.50 or later version
  + **VS Code**: Microsoft Visual Studio Code IDE v1.76 or later version(C/C++ support, GNU toolchain, CMake v3.25, ninja, Cortex-Debug extensions installation required)
+ **Debugger driver**
    + **J-Link**: SEGGER J-Link v7.82 or later version, YUNTU `YTM32B1MD1` patch(support package) installation required.
    + **Ozone Debugger tool**: SEGGER Ozone v3.28 or later version.

    ***Note***: **YTM32B1MD1** patch install required which can be obtained via **YCT** or contact ***YUNTU sales/FAE team***.

---