Page 1 of 1

Issue STM32 DAC

Posted: Tue Nov 13, 2018 4:40 pm
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!

Re: Issue STM32 DAC

Posted: Tue Nov 13, 2018 5:29 pm
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

Re: Issue STM32 DAC

Posted: Thu Nov 15, 2018 6:10 pm
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

Re: Issue STM32 DAC

Posted: Mon Nov 26, 2018 6:25 pm
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!