This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F Sleep Mode

Hello,

I am having trouble entering sleep mode with the STM32F103 and RL-RTX. I am expecting the processor to halt indefinitely when I call the following code:

printf("calling __WFI();\r\n");
// enter low power mode: Request Wait For System Interrupt to wake uC up
__wfi();
printf("Exiting sleep mode\r\n");

The problem is that after "__wfi();" is called is automatically goes to the next statement: "printf("Exiting sleep mode\r\n");".

It almost seems like something is waking the processor from sleep mode right away or it is not going into sleep.

I would expect that the CPU halts at __wfi() until an interrupt is triggered.