Skip to main content
Visitor II
April 7, 2024
Solved

how does HAL_ADC_Start_DMA() behave if the DMA is set to half_word

  • April 7, 2024
  • 1 reply
  • 1498 views

HAL_ADC_Start_DMA() takes a pointer to a uint32_t buffer, but the cubeMX can configure the DMA for word, half_word or byte.

So therefore you can only configure the DMA for word transfers?

I was setting the cubeMX to half_word or uint16_t and using 12bit adc, but I noticed the compiler warning about HAL_ADC_Start_DMA() taking a uint32_t.

It is simple for me just to use a uint32_t buffer, but am I missing something?

    This topic has been closed for replies.
    Best answer by Konrad1

    OK, ignore my question, I see the HAL casts the pointer into a literal address, so if you want you can just ignore the compiler warnings.

    1 reply

    Konrad1AuthorAnswer
    Visitor II
    April 7, 2024

    OK, ignore my question, I see the HAL casts the pointer into a literal address, so if you want you can just ignore the compiler warnings.