2009-12-06 02:57 AM
Problem with DMA-ADC and LowPower Mode
2011-05-17 04:32 AM
Hi mates,
Yes, This is absolutely possible; and this is the beauty of STM32 with DMA ;) . However this is only in Sleep mode not in STOP like the case from enke, because in STOP mode , all clocks on the internal busses are freezed, In Sleep Mode only CPU is OFF and is no more fetching from Flash, SRAM and you can put inside your main polling routine while(1) { {WFI or WFE } ; } With this scheme : DMA is working in Back-to-back and CPU will wake-up only for IRQ and exceptions and all with minimum Low power, saving some cycles on DMA accesses. Cheers, STOne-32. [ This message was edited by: STOne-32 on 02-12-2009 21:54 ]2011-05-17 04:32 AM
Hi,
i have a Problem with the ADC. I configured the ADC with DMA-Access. Sometimes, after a Wakeup from LowPower-Mode the ADC-Values does not update. The ADC does not work. Do you have any idea? Do i have to restart the ADC? Florian Enter Sleep Mode: PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI); WakeUp: //Enable HSE RCC_HSEConfig(RCC_HSE_ON); //Wait till HSE is ready HSEStartUpStatus = RCC_WaitForHSEStartUp(); if(HSEStartUpStatus == SUCCESS) { RCC_PLLCmd(ENABLE); //Enable PLL while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) //Wait till PLL is ready {} RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); //Select PLL as system clock source while(RCC_GetSYSCLKSource() != 0x08) //Wait till PLL is used as system clock source {} } else { NVIC_GenerateSystemReset(); }2011-05-17 04:32 AM
Hi enke, i'm having similar issues with mixing DMA access and sleep mode. In my case it's on the ethernet controller: everything seem to be ok with the ethernet chip itself, but there is nothing in the DMA buffer in the end. It seems that your issue is also related to the DMA controller rather than the ADC controller.
ST people: is it possible to use DMA while the chip is in sleep mode?2011-05-17 04:32 AM
Hi ST,
do you have an Idea how i can fix my problem? Florian2011-05-17 04:32 AM
Hi STMicroelectronics,
can you give me an hint, how i can found a soluten for my problem? After a complete Reset the ADC works fine again. I tried to re_init the DMA. But that doesnt work. How can i restart my ADC or DMA without rebooting the controller? Florian2011-05-17 04:32 AM
Hi enke, the peripherals (DMA, ADC etc.) have their own ''peripheral'' reset (see ADC_DeInit, DMA_DeInit).
After wake-up, reset these peripherals and reconfigure. Tell us if it solved the case.