Skip to main content
Tommino
Associate III
August 27, 2021
Question

Problems in performing STM32CubeIDE basics - 10 ADC DMA TIM HAL lab with STM32L476

  • August 27, 2021
  • 2 replies
  • 1034 views

Hello,

I have some problems in the 2nd part of the above mentioned exercise (see also STM32CubeIDE basics - 10 ADC DMA TIM HAL lab - YouTube).

I am not able to convert the output of the ADC in temperature values.

Building does not give any error but while debugging the converted values are all zero. The debug seems to stop at if(1==flag) but I can't figure out why

Attached the slides of the exercise and my code.

This topic has been closed for replies.

2 replies

Amel NASRI
ST Technical Moderator
August 30, 2021

Hi @Tommino​ ,

Does it work if you call HAL_DMA_Init() after HAL_ADC1_Init()?

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Tommino
TomminoAuthor
Associate III
August 30, 2021

Hi,

Thanks for the reply.

I am afraid it does not work with your suggestions. After the debug, the raw value buffer just contains one value (155?) and the converted values buffer has still 0s.

With my code the raw value buffers contains 8 values that are about 923,922 and so on.

Do you have additional suggestions?

-Tommaso