Example of SW trigger DAC with dacConvert()

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

Example of SW trigger DAC with dacConvert()

Post by neums »

Hallo,
is there any example which shows the dacConvert() call? I didn't find it in the DAC example project for the STMF303.

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: Example of SW trigger DAC with dacConvert()

Post by Giovanni »

Hi,

It is the same of dacStartConversion() except it does not return after starting the conversion. The function only returns when dacStopConversion() is called from some other thread or ISR.

The example is in \testhal\STM32\STM32F30x\DAC.

Giovanni
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Has thanked: 10 times
Been thanked: 5 times

Re: Example of SW trigger DAC with dacConvert()

Post by neums »

Thanks,
so, to put once a time a sample to the dac i should use the dacPutChannelX() function?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Example of SW trigger DAC with dacConvert()

Post by Giovanni »

Correct, that function simply writes the DAC output register without starting any background activity.

Giovanni
Post Reply