Issue STM32 DAC Topic is solved

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

Moderator: RoccoMarco

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

Issue STM32 DAC

Post by sam »

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: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Issue STM32 DAC

Post by Giovanni »

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: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Issue STM32 DAC

Post by Giovanni »

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: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

Re: Issue STM32 DAC

Post by faisal »

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!
Post Reply