Skip to main content
Associate II
June 21, 2024
Question

example adc dma and ble

  • June 21, 2024
  • 1 reply
  • 1221 views

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

1 reply

STTwo-32
Technical Moderator
June 21, 2024

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.
Associate II
June 21, 2024

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

 

STTwo-32
Technical Moderator
June 21, 2024

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.