3 Middle;断相关¶
3.1 Middle;断Wake up;standby睡眠的脉冲Wide;度Need;求¶
As shown in the figure below, there is no probability to wake up Lcpu and generate an interrupt;。
Root cause;:
When the PB43 heart rate interrupt pulse width is only 99us, the customer uses the RC10K oscillator in standby mode, with a frequency between 8k-10k, corresponding to a maximum clock cycle of 125us. Therefore, this 99us pulse may not be able to wake up Lcpu in standby mode;。
Solution;:
Modify the peripheral register or firmware, the interrupt pulse width should be greater than the clock cycle, and under the RC10K oscillator, the pulse width should be at least greater than 125us;。
3.2 Interrupt function switch;¶
uint32_t mask;
mask = rt_hw_interrupt_disable(); /*Turn off interrupt;*/
rt_hw_interrupt_enable(mask); /*Turn on interrupt;*/