Hello, I now use the low power VLLS3 mode of KV10Z32, using the wakeup function of the LLWU, but the program will not wake up using the PTC3 (LLWU _ P7) and request help. thanks you
the following is the code
void BOARD_InitPins(void)
{
/* Port C Clock Gate Control: Clock enabled */
CLOCK_EnableClock(kCLOCK_PortC);
/* Port E Clock Gate Control: Clock enabled */
CLOCK_EnableClock(kCLOCK_PortE);
gpio_pin_config_t PTE16_config = {
.pinDirection = kGPIO_DigitalOutput,
.outputLogic = 0U
};
/* Initialize GPIO functionality on pin PTE16 (pin 3) */
GPIO_PinInit(BOARD_INITPINS_PTE16_GPIO, BOARD_INITPINS_PTE16_PIN, &PTE16_config);
/* PORTC3 (pin 24) is configured as LLWU_P7 */
PORT_SetPinMux(PORTC, 3U, kPORT_MuxAsGpio);
PORTC->PCR[3] = ((PORTC->PCR[3] &
/* Mask bits to zero which are setting */
(~(PORT_PCR_PS_MASK | PORT_PCR_ISF_MASK)))
/* Pull Select: Internal pulldown resistor is enabled on the corresponding pin, if the
* corresponding PE field is set. */
| PORT_PCR_PS(PCR_PS_0b0));
/* PORTE16 (pin 3) is configured as PTE16 */
PORT_SetPinMux(BOARD_INITPINS_PTE16_PORT, BOARD_INITPINS_PTE16_PIN, kPORT_MuxAsGpio);
}
int main(void)
{
smc_power_mode_vlls_config_t vlls_config; /* Local variable for vlls configuration */
/* Init board hardware. */
PMC_ClearPeriphIOIsolationFlag(PMC);
BOARD_InitPins();
for(uint32_t i = 0; i<0x5FFF;i++)
{
delay();
GPIO_WritePinOutput(GPIOE,16,1);
delay();
GPIO_WritePinOutput(GPIOE,16,0);
}
LLWU_SetExternalWakeupPinMode(LLWU,7,kLLWU_ExternalPinRisingEdge);
vlls_config.subMode = kSMC_StopSub3;
SMC_PreEnterStopModes();
SMC_SetPowerModeVlls(SMC, &vlls_config);
PMC->REGSC = PMC_REGSC_ACKISO_MASK;
SMC_PostExitStopModes();
while (1)
{
for(uint32_t i = 0; i<0x5FFF;i++)
{
delay();
GPIO_WritePinOutput(GPIOE,16,1);
delay();
GPIO_WritePinOutput(GPIOE,16,0);
}
}
}