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.
DAC driver for the STM32
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: DAC driver for the STM32
@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
I try to make that work with the STM32F4.
Sebastien
Re: DAC driver for the STM32
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...
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
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.
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.
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: DAC driver for the STM32
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
Giovanni
Re: DAC driver for the STM32
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.
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
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.
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.