ADC in conjustion with DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-19 5:45 AM
Hi
I am facing an odd problem with ADC in conjunction with DMA on STM32L151V8T-A.
I can see that it measures all three channels. However, the result of each channel is stored in the first element of my results array (Result[3]).
Every time that the callback function is called the results of one out of three channels is stored in Result[0] element. It is as if the memory address is not increasing.
Can somebody help?
Solved! Go to Solution.
- Labels:
-
STM32L1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-20 2:14 AM - edited ‎2024-03-20 3:00 AM
Hi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-20 2:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-20 4:44 AM
Ok thanks. I will look at it by tomorrow or after and get back to you with a feedback
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-21 5:51 AM - edited ‎2024-03-21 5:56 AM
Hello @Pejwaak ,
Change Data width of Peripheral and Memory to "Word" instead of "Half Word":
Please confirm if this solves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-21 9:41 AM
Hi
I have already tried it but tried it again any. I am attaching this screen-shot so you know exactly what I mean. Every-time ADC complete flag was set I took a screen shot. as you can see the value of the first element of ADCArray changes. I tested them and it turned out that these differents values are the values from each three channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-22 8:54 AM
I attached a project where I did 3 channels conversion in continuous mode with DMA on STM32L152D_EVAL board. Unfortunately, I don't have your board on hands.
The three converted channels are:
- Channel 31: potentiometer
- Channel 16: temperature sensor
- Channel 17: Vrefint
I tested the project with IAR, you can port it easily to CubeIDE with CubeMx.
As you can see in this screenshot, the data converted are arranged in the correct order.
You can inspire from my project to find your issue.
Please select this answer if it does answer your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-22 8:56 AM
Thanks very much for your kind helps. I will have a look at your project and will get back you asap.

- « Previous
-
- 1
- 2
- Next »