2015-01-17 12:53 PM
I generated code for FreeRTOS with USB by STM32cube and I�m trying to use ADCs triggered by Timer3 and transfer data to memory by DMA2. There are only three FreeRTOS tasks sending messages to each other and sleeping most of the time. They are not communicating over USB and don�t access to hardware. Application is not using any ISRs (except USB). When ADC, DMA and Timer are initialized (it is not running yet), FreeRTOS after while crashes on
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd );
I didn�t found any problem with stack overflow, priorities etc. as suggested on FreeRTOS help.
If I comment out initialization of ADC, DMA and Timer FreeRTOS goes well.
It seems like trouble with HAL, because similar application works perfectly with std-libraries before.
Do you have any ideas how ADC with DMA can break down FreeRTOS scheduler?
Thank you
#stm32f4 #stm32cube #freertos2015-02-27 04:54 AM
Hi jirik,
Could you provide a little more informations about the STM32CubeF4 FW package you are using and your project files so we can better explain it to our development team...Regards,Heisenberg.2015-09-08 10:49 PM
Hi,
I have the same problem. Yesterday i updated STM32CubeF4 FW to v1.8. And still the same.I'm using ADC DMA example for stm32d4xx discovery and after adc initialization i start free-rtos (using cmsis-os wrapper) kernel with one thread. ADC does only one conversion and after that i have error in ADC handler - 0x2.2015-09-09 03:14 AM
Hi zvirblis.deimantas,
What is the error exactly?Does FreeRTOS work as expected when ADC is disabled (as it was the case for jirik09)?-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-09-09 08:56 AM
Error code is HAL_ADC_ERROR_DMA (0x02) which means DMA transfer error.
Free RTOS working fine. If i dont start FreeRTOS (everything commented) ADC conversions with DMA works fine.