Skip to main content
ABoga
Associate
October 24, 2018
Question

DMA STM32L0 operation

  • October 24, 2018
  • 1 reply
  • 892 views

Hello. I am using STM32L053R8T6. I connect 3 ADC channels (PA4, PA6, PA7). For this I use DMA. I need the resolution of the ADC - 8 bits, for this I initialize an array with the dimension of 8 bits (volatile uint8_t AdcValue [3];)

I am using DMA HAL_ADC_Start_DMA (& hadc, (uint32_t *) & AdcValue [0], 3);

Next, I look at the debugger in the Watch window

and at the minimum position of the resistor connected to the ADC, I get a value of 255, and at the maximum position of the resistor I get a value of 65. Why is this happening?

0690X000006CFEfQAO.png

I tried to run this example on the STM32F0 Discovery

board and it works there (from 5 to 255). But on STM32L0 for some reason, the minimum value is 65?

    This topic has been closed for replies.

    1 reply

    ABoga
    ABogaAuthor
    Associate
    October 24, 2018

    I tried to process 3 ADC channels (PA4, PA6, PA7) singly by running single transforms in the timer handler and received values (4-255).

    0690X000006CFNrQAO.png

    That says about the working scheme, but in the case of DMA, I get the minimum value of 65. What could be the problem?

    Thanks