This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

External MCU flashing over BLE using nRF52840

Hi,

I have a STM32 MCU and I want to flash this MCU by using an nRF52840. The two chips will be connected by UART.

From where I need to start, and what is the most easiest way to do this ?

In resume, I want : PC/Phone <-BLE-> nRF52840 <-UART-> STM32.

My binary file is about 250Ko.

Thank you in advance for your answer.

Florian

  • I guess it's because I send too much data and too fast to the UART.

    Or too much too fast for the BLE link.

    BLE = "Bluetooth Low Energy": so its focus is on minimising energy consumption - which means it is specifically not designed for high-volume and/or high-speed data transfer ...

    How can I solve this

    You will need some sort of flow control - or "pacing" - to regulate your data transmission.

  • I tried to remake the error to re-send you the code but I don't have the same lines in the debug terminal besides the fact that I changed nothing.

    I did chopped off one part of the error report but in the next picture I highlighted the line (it's in the main file, line 560).

  • I found why there is not the same lines (the debug buffer was too small because I printed all the data).

    Here is what I get now, in the debug terminal:

    <info> app: Debug logging for UART over RTT started.
    
    <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    
    <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    
    <info> app: Connected
    
    <debug> nrf_ble_gatt: ATT MTU updated to 247 bytes on connection 0x0 (response).
    
    <info> app: Data len is set to 0xF4(244)
    
    <debug> app: ATT MTU exchange completed. central 0xF7 peripheral 0xF7
    
    <debug> nrf_ble_gatt: Data length updated to 251 on connection 0x0.
    
    <debug> nrf_ble_gatt: max_rx_octets: 27
    
    <debug> nrf_ble_gatt: max_tx_octets: 251
    
    <debug> nrf_ble_gatt: max_rx_time: 328
    
    <debug> nrf_ble_gatt: max_tx_time: 2120
    
    <debug> app: ATT MTU exchange completed. central 0xF7 peripheral 0xF7
    
    <debug> app: PHY update request.
    
    <debug> app: Ready to send data over BLE NUS
    
    <debug> app: Ready to send data over BLE NUS
    
    <debug> app: Ready to send data over BLE NUS
    
    <debug> app: Ready to send data over BLE NUS
    
    <error> app: ERROR 1 [NRF_ERROR_SVC_HANDLER_MISSING] at C:\Users\FLO\Desktop\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_uart\main.c:560
    
    PC at: 0x0002ED67
    
    <error> app: End of error report
    
    

  • I looked at it, solved my error report but I still does not receive all of my data

Related