I'm working with a flex gecko 2.4/868 Mhz and I need to reduce the current consumption of my system. To do this I've tried to prescale the HFXO. However if I set a prescaler > 2, the program doesn't run. I'm using the USART and I've tried also to prescale the HFPERCLK, in this case the program doesn't run if I set a prescaler > 16. Is there any limit on the prescaler size? I would like to make my EFR32 to run at a frequency of about 1 Mhz.
Are you following this example:
And what do you mean by don't run?, freeze up?, data on usart is wrong?
I've put my program in debug, step by step and I've identified the problem: when I put cpu in EM1 mode, the program stops on this line:
__ASM volatile ("wfi");
What does it mean?
Ok, it ,means that the uP is waiting for an interrupt to wake up from EM1. I've activated the rtcc to generate an interrupt every 250 ms. It works fine until the HFXO is prescaled by two. It seems that with a prescaler greater than 2 the interrupt never arrives...
WFI (Wait For Interrupt) makes the processor suspend execution (Clock is stopped) until one of the following events take place:An IRQ ,interruptAn FIQ interrupt or A Debug Entry request made to the processor.
Are you sure you are using HFXO for MCU core?, not very energy efficient as crystal ocs takes 300us to stabilize, as I take it you are shutting down HighFreq clocks while sleeping = EM2 mode
Radio Controller (RAC) does need it though, but there is HFRCO to HFXO-when-ready switching examples.
And switching from 7MHz to 1MHz don't save much power if you sleep 98% of the time anyway, as it's better to wake up and get things done fast, then go back to em2.
Poking around on timings in examples where you don't have full understanding what things do always lead to weird results.