cancel
Showing results for 
Search instead for 
Did you mean: 

example adc dma and ble

battellino
Associate II

Can you give me an example where to acquire data from an ADC channel via DMA with triggered timer and send it via BLE Thanks

3 REPLIES 3
STTwo-32
ST Employee

Hello @battellino 

An official example no, but you may find some of the on GitHub. 

I may suggest you start from one of the BLE examples. Then, add your ADC configuration, enable your ADC, and add a task that do the extract of data and share them on BLE.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I have already tried... my problem is that I would like to know if I can use HAL_ADC_Start_IT(&hadc1) to acquire 1000 samples in my main independently of the sequencer and then when I have acquired the 1000 samples I send them. Only by doing this the simple callback in the main I can't even go in with the breakpoint because the sequencer starts immediately. How can I do it

battellino_0-1718965862954.png

battellino_1-1718965891871.png

Thanks

 

What I suggest you is to look at the implementation of this wiki and try to add the ADC acquisition and send the same way as the implementation of the notify will sending pushing the button sw1 on the sequencer.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.