1. What are the BT QDIDs of OM66XX ?
2. Can I use any of the Timers in sleep mode?
Please reference evt_timer_set(), it is a software timer and base on 32k low power clock (pmu timer).
3. How many sleep modes are available in OM6XXX and how to configure?
Please reference here
4. Can I use external 32 kHz crystal ?
Yes, OM6XXX support 32768Hz crystal. Use function drv_pmu_select_32k() to enable it.
5. How to speed up the execution of my code ?
You can try following ways:
- Use faster system and CPU clock, but this leads higher power consumption. (Refrence drv_pmu_xtal32m_x2_startup and drv_rcc_clock_set (RCC_CLK_CPU, 1))
- Do not use MicroLIB of KEIL.
- Put critical code into SRAM. (Use
__RAM_CODE or __RAM_RODATA macro to critical function, or put the critical file(.o) into ER_RAM_CODE section in KEIL scatter file).
- Use higher compiler optimization level.
6. How can I reduce system power consumption ?
You can try following ways:
- Try putting some frequently executed code into RAM (Use
__RAM_CODE or __RAM_RODATA macro).
- Try putting some of the system presets RAM_CODE into RAM. Modify
linker_flash.sct file (in KEIL): ER_RAM_CODE +0 ALIGN 32 { ER_RAM_CODE +0 ALIGN 32 {
from *.o(RAM_CODE) to *.o(RAM_CODE*)
*.o(RAM_RODATA) *.o(RAM_RODATA*)
} }
- The drv_icache_powerdown_in_sleep_enable() function can power down the ICACHE during sleep (default is not power down), but this will cause all the contents of the ICACHE to be lost during sleep, so that it needs to be reloaded when waking up.
- The drv_pmu_ram_power_on() function can power down unused RAM block.
7. How to check what is preventing the chip from going to sleep ?
The sleep state is completely controlled by software. The PM component of the software is how the chip goes to sleep. The PM source code is located at components/pm/pm.c. The following code snippet is from pm.c:
{
status = pm_sleep_state_check();
status = pm_sleep_checker_check();
}
return status;
}
{
int i;
return status;
for(i = 0; i < PM_SLEEP_CHECKER_NUM; ++i) {
if(pm_env.checker[i].callback != NULL) {
pm_status_t checker_status = pm_env.checker[i].callback();
status =
OM_MIN(status, checker_status);
break;
}
}
}
return status;
}
{
if (!pm_env.sleep_enable) {
}
}
#define OM_MIN(x, y)
MIN.
Definition: om_utils.h:66
pm_status_t drv_pmu_sleep_status(void)
what power status should be entried
pm_status_t pm_sleep_check(void)
pm sleep check
pm_status_t
PM status.
Definition: pm.h:112
void pm_power_manage(void)
pm power manage
void pm_sleep(pm_status_t status)
system sleep
@ PM_STATUS_IDLE
All modules are alive, but CPU clock is gating.
Definition: pm.h:116
There are 4 important checking points: