- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
03-18-2017 04:44 PM
I just measured the number of machine cycles between the time that I enter the EMU_EnterEMU2 subroutine, and the time that the WFI instruction is executed. The time is 258 machine cycles or a little over 8uS at 32MHZ core clock ! Since I am burning full power during this additional 8uS, I am becoming concerned.
Single stepping thru the code, I see that the code is configuring/reconfiguring the DC-DC converter (again). What is going on here ? Is this code necessary ? Why ?
I am not doing the restore on exit from EM2 either since I am already using the HFRCO oscillator.
Is the DC-DC configured for something different after exit from EMU2 if I don't use the restore function ?
Solved! Go to Solution.
03-21-2017 11:18 AM
The DC-DC converter can be changed to different modes based on your power and noise requirements (which may be different in EM2). See AN948 for more information. Also see errata DCDC_E202 and DCDC_E203, the workaround is to set the DCDC to low noise mode when entering EM2 to reduce the output dip that occurs.
Keep in mind the emlib function is intended to cover all use cases. You can write your own function if you like, to reduce the amount of time it takes to enter EM2.
03-22-2017 07:25 PM
Also, are you compiling code in the Debug or Release configuration?
Debug includes a fair bit of overhead to permit stepping correspondence between C instructions and the underlying assembly language as well as constructs necessary for local variable visibility.
Try compiling your code in the Release configuration and seeing what happens to the EM2 entry time.