Skip to main content
Senior
January 26, 2025
Question

BLE receive data DMA and TASK Sequencer

  • January 26, 2025
  • 1 reply
  • 515 views

Hello, 

I am making BLE data logging application where STM32WB35 series working as peripheral and sending to laptop the sensor data every second. STM32WB35 is receiving data from sensor on UART and sending same data to laptop every second on BLE. The data length can be anywhere between 50 to 150 Bytes.

I am lost on implementing the READ characteristic for this application.  

ST tutorial video on BLE Notification implements Task using Sequencer. What you think about this logic.

 

1) Create Task1 { Send Notification to Client(Laptop) }

 

2) Run Receive UART data by DMA  . 

3) Inside HAL_UART_RxCpltCallback   , implement  UTIL_SEQ_SetTask

4) Run Task1 --> Send Notification to Client 

5) Client send Data Read Request with Notification 

5) Rx Event in Custom_stm.c --> Send Data on BLE and enable DMA again to receive data on UART from sensor.

6) Go to Step 3.

 

1 reply

STTwo-32
Technical Moderator
February 27, 2025

Hello @Nico3 

For me, i think you should: 

  1. Create the sending task.
  2. Collect the data
  3. run the send task.
  4. wait for an acknowledgement from the client
  5. restart the process from step 2.

Best Regards.

STTwo-32