Issue STM32 DAC Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

sam
Posts: 1
Joined: Tue Nov 13, 2018 4:23 pm
Has thanked: 1 time
Been thanked: 1 time

Issue STM32 DAC  Topic is solved

Postby sam » Tue Nov 13, 2018 4:40 pm

Hey, I used DAC-1 in my project with timer-5 (DAC_TRG(3)) as a trigger source. This implementation is done on NUCLEO-L496ZG (Controller: STM32L496). It works fine as expected. After this, I ported my code to NUCLEO-L4R5ZI (STM32L4R5Z). The same code is not working on L4R5ZI for DAC other features like UART, timers are working as expected.
I am not getting DMA interrupt for completion of data transfer. Timer as a trigger is properly configured and runs as expected.
I am new to this. While I investigate into it just wanted to share the problem so that if someone already faced a similar issue, please point out the possible things to verify.

Thanks!

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Issue STM32 DAC

Postby Giovanni » Tue Nov 13, 2018 5:29 pm

Hi,

DAC driver is not yet tested on L4+, there could be a problem. It is in the TODO list (next weekend).

Changes were about DMA so this could explain it. L4+ has a new DMAMUX, probably the driver does not set it up correctly -> no DMA interrupt.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Issue STM32 DAC

Postby Giovanni » Thu Nov 15, 2018 6:10 pm

Hi,

I fixed the problems, L4+ has a different layout of the DAC CR register, the Reference Manual is wrong, it shows the old layout, header files revealed the problem. In addition, there was a problem with DMAMUX selection as I suspected.

I added a demo for L4 and L4+ under /testhal/STM32/multi/DAC

Giovanni

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: Issue STM32 DAC

Postby faisal » Mon Nov 26, 2018 6:25 pm

Giovanni wrote:Hi,

I fixed the problems, L4+ has a different layout of the DAC CR register, the Reference Manual is wrong, it shows the old layout, header files revealed the problem. In addition, there was a problem with DMAMUX selection as I suspected.

I added a demo for L4 and L4+ under /testhal/STM32/multi/DAC

Giovanni


Dang, that's nasty. So much for the reference manual :). Thanks Giovanni!


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 15 guests