UART drop 1 bytes when recovery from WFE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User14248
Level 1
Level 1
First like received
Hello,

I have a problem when enable WFE while enable UART receive interrupt.
For WFE, I set the function to XMC_SCU_CLOCK_SetSleepConfig(XMC_SCU_CLOCK_SLEEP_MODE_CONFIG_ENABLE_CCU);
For UART, I set the receive interrupt
/*Set service request for UART protocol events*/
XMC_USIC_CH_SetInterruptNodePointer(UART_CHANNEL.channel, XMC_USIC_CH_INTERRUPT_NODE_POINTER_RECEIVE,
0x0U);
/*Set service request for UART protocol events*/
XMC_USIC_CH_SetInterruptNodePointer(UART_CHANNEL.channel, XMC_USIC_CH_INTERRUPT_NODE_POINTER_ALTERNATE_RECEIVE,
0x0U);
/*Set priority and enable NVIC node for receive interrupt*/
NVIC_SetPriority((IRQn_Type)90, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),
18U, 0U));
NVIC_EnableIRQ((IRQn_Type)90);
XMC_USIC_CH_RXFIFO_EnableEvent(UART_CHANNEL.channel,
(uint32_t)((uint32_t)XMC_USIC_CH_RXFIFO_EVENT_CONF_STANDARD |
(uint32_t)XMC_USIC_CH_RXFIFO_EVENT_CONF_ALTERNATE));
XMC_USIC_CH_EnableEvent(UART_CHANNEL.channel,
(uint32_t)((uint32_t)XMC_USIC_CH_EVENT_STANDARD_RECEIVE |
(uint32_t)XMC_USIC_CH_EVENT_ALTERNATIVE_RECEIVE));

If the main clock switch from fPLL to fOFI, what is the fPERIPH? To remain the uart function, what else should be done?
Thank you.
0 Likes
0 Replies