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);
}
}
}
Hi,
Sorry. If you have other's question. Please create a new question.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,
You do not use the signal Multiplexing function.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi ,can you explain more about it ? I don't understand what does it mean. Thank you very much!
The comment shows that we should configure the pin as LLWU. But the next line, the function configure the pin as GPIO.
Thank you very much for your answer.
This problem has been solved.
The new problem I encounter now is that the data of SRAM is lost after exiting VLLS3 mode.
Please tell me what I should do now so as not to lose SRAM.
The development environment I use is Keil
Thank you very much for your answer. This problem has been solved. The new problem I encounter now is that the data of SRAM is lost after exiting VLLS3 mode.
Please tell me what I should do now so as not to lose SRAM.
The development environment I use is Keil