|
6 | 6 | #include <zephyr/pm/pm.h>
|
7 | 7 | #include <fsl_power.h>
|
8 | 8 | #include <fsl_common.h>
|
| 9 | +#include <fsl_io_mux.h> |
| 10 | + |
| 11 | +#define NON_AON_PINS_START 0 |
| 12 | +#define NON_AON_PINS_BREAK 21 |
| 13 | +#define NON_AON_PINS_RESTART 28 |
| 14 | +#define NON_AON_PINS_END 63 |
| 15 | +#define RF_CNTL_PINS_START 0 |
| 16 | +#define RF_CNTL_PINS_END 3 |
| 17 | +#define LED_BLUE_GPIO 0 |
| 18 | +#define LED_RED_GPIO 1 |
| 19 | +#define LED_GREEN_GPIO 12 |
9 | 20 |
|
10 | 21 | static void frdm_rw612_power_init_config(void)
|
11 | 22 | {
|
@@ -42,6 +53,26 @@ void board_early_init_hook(void)
|
42 | 53 | };
|
43 | 54 |
|
44 | 55 | pm_notifier_register(&frdm_rw612_pm_notifier);
|
| 56 | + |
| 57 | + int32_t i; |
| 58 | + |
| 59 | + /* Set all non-AON pins output low level in sleep mode. */ |
| 60 | + for (i = NON_AON_PINS_START; i <= NON_AON_PINS_BREAK; i++) { |
| 61 | + IO_MUX_SetPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); |
| 62 | + } |
| 63 | + for (i = NON_AON_PINS_RESTART; i <= NON_AON_PINS_END; i++) { |
| 64 | + IO_MUX_SetPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); |
| 65 | + } |
| 66 | + |
| 67 | + /* Set the LED GPIO output pins to be High in PM3 as these pins are Active Low */ |
| 68 | + IO_MUX_SetPinOutLevelInSleep(LED_BLUE_GPIO, IO_MUX_SleepPinLevelHigh); |
| 69 | + IO_MUX_SetPinOutLevelInSleep(LED_RED_GPIO, IO_MUX_SleepPinLevelHigh); |
| 70 | + IO_MUX_SetPinOutLevelInSleep(LED_GREEN_GPIO, IO_MUX_SleepPinLevelHigh); |
| 71 | + |
| 72 | + /* Set RF_CNTL 0-3 output low level in sleep mode. */ |
| 73 | + for (i = RF_CNTL_PINS_START; i <= RF_CNTL_PINS_END; i++) { |
| 74 | + IO_MUX_SetRfPinOutLevelInSleep(i, IO_MUX_SleepPinLevelLow); |
| 75 | + } |
45 | 76 | #endif
|
46 | 77 |
|
47 | 78 | #ifdef CONFIG_I2S_TEST_SEPARATE_DEVICES
|
|
0 commit comments