Page 3 of 5

Re: DAC driver for the STM32

Posted: Tue Sep 03, 2013 8:54 am
by mobyfab
ah indeed I didn't think about that!

I might need to make some minor modifications in the driver to support that.

Right now it's very basic.

Re: DAC driver for the STM32

Posted: Tue Sep 03, 2013 8:56 am
by Giovanni
Great, NP, as long it works, we can grow it afterward.

Giovanni

Re: DAC driver for the STM32

Posted: Tue Sep 17, 2013 9:52 pm
by sebx86
@Mobyfab : it seemed that you forgot to call your dac_init() routine in hal.c.
I try to make that work with the STM32F4.

Sebastien

Re: DAC driver for the STM32

Posted: Wed Sep 18, 2013 1:07 pm
by mobyfab
I merged your code, thanks!

Fabien

Re: DAC driver for the STM32

Posted: Thu Sep 19, 2013 9:52 am
by sebx86
Did you do some tests, is it supposed to work ?

It seems that the dac_callback_t is not implemented and missing some information about the current state of the driver, how can we know in which half of the buffer we are ?
Do you have plans for double buffering, I think it could be really useful if you wanna stream changing buffers ?

I suppose that since the DAC is not official yet, API could be still adapted...

Re: DAC driver for the STM32

Posted: Thu Sep 19, 2013 11:39 am
by mobyfab
The first version was fully tested and worked pretty well.

The latest code since the API change by Giovanni has not been tested yet.

There is probably some code missing.

Double buffering was supported in the old API but not anymore.

Re: DAC driver for the STM32

Posted: Thu Sep 19, 2013 11:53 am
by Giovanni
The issue with double buffering is that requires the advanced DMA only found on the F4, that would make the API too platform specific.

Giovanni

Re: DAC driver for the STM32

Posted: Thu Sep 26, 2013 7:06 pm
by sebx86
Hi Mobyfab,
your code with the new API works well on the STM32F4, congrats :).

Callbacks are just missing, It seeems to miss information whether you reached the half or full buffer interrupt.

Re: DAC driver for the STM32

Posted: Thu Sep 26, 2013 8:51 pm
by sebx86
Also, in your driver, the following modifications are required
add the call to the init function in the hal main file and dac_lld_stop has to be renamed into dac_lld_stop_conversion.

It converts basically, but when you stop the conversion, the RTOS hangs. I didn't investigate that yet.
Something seems to be wrong in the high-level driver in dacStopConversion between lines 217 and 222.

Re: DAC driver for the STM32

Posted: Wed Oct 02, 2013 9:16 pm
by mobyfab
Hey seb,

Thanks for your work, feel free to send the pull request :)

I will do some testing as soon as I can.