AnsweredAssumed Answered

STM32F429i Disco Problem ADC+DMA Continuous Scan Mode

Question asked by Gluka_73 on Feb 13, 2016
Hello everybody,
I've configured the STM32F429i-DISCO eval with CubeMX (vers. 4.12.0) to read ADC1 IN5 (pin PA5), IN13 (pin PC3) and Temp Sens channels in continuous scan mode with DMA enabled. Attach you can find the CubeMX screenshoot.
I've generated the code for True Studio and add, before the while(){} loop the Start_DMA statement:
 if(HAL_ADC_Start_DMA(&hadc1, (uint32_t*)&uhADCxConvertedValue, 3) != HAL_OK)
  {
    /* Start Conversation Error */
    return FALSE;
  }
  else
  {
    return TRUE;
  }

where the variable array is declared as:
__IO uint16_t uhADCxConvertedValue[3];

In this situation the HAL_ADC_Start_DMA() function return FALSE.
I've tried also other different DMA configuration but, in the best case, putting a breakpoint in the DMA2_Stream0_IRQHandler() function, I see it enters the first time, reading a correct value in uhADCxConvertedValue[0] variable but it never returns in the IRQ handler and never update the ADC output value.
In the CubeMX FW package I've found a similar example but only with one ADC channel mapped and it always correctly read the channel and enters in the IRQ function.
Any idea?

Thanks.

Attachments

Outcomes