2016-11-17 11:02 AM
I'm on an STM32F4 and using an RTOS. I put the MCU to sleep whenever the scheduler has nothing to do using the WFI instruction.
I'm using DMA1 with i2S and a USART. I want to disable the DMA1 clock using theRCC_AHB1LPENR_DMA1LPEN bit which means the clock is disabled when the mcu is asleep. The problem is that sometimes the UART doesn't
functionwhen
RCC_AHB1LPENR_DMA1LPEN=0 even though the MCU is awake. The UART is never able to complete it's transmission.
Does anyone have any advice on how to use theRCC_AHB1LPENR_DMA1LPEN bit? Resetting it adds about an hour to battery life so I don't want to just leave it set all the time.
Thanks #sleep #wfi #rcc #ahb1lpenr