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

concurrent characteristic

I have nrf51822 with latest sd130.

I need to implement central what connects to smartphone. Phone has two characteristics with HVX. First char is sending one byte after 80 ms. Second char is sending bigger data after 100 ms. Second char data processing takes 400ms and I do it in read response. When I am processing second char data is the first char data coming in concurrently or is the second char blocking until I return read response?

Parents
  • Please have a look at Exception (interrupt) management with a SoftDevice

    I have made a diagram to illustrate what will happen. Exactly when what will happen is difficult to say, it depends on the connection interval, the number of packets that are/can be received in a connection interval.

    I don't know if you are using a scheduler, this would put the application events in a buffer in the application space and run them from main context, instead of App(L).

    Without a scheduler something like this will happen:

    image description

    • PE - Protocol Event
    • LL - Link Layer
    • AE - Application Event

    You can see that when you do processing from the BLE_GATTC_EVT_READ_RSP you will be in App(L). The SoftDevice will interrupt this if is needed, i.e. the LL will receive the notification, but the application wouldn't know until you are finished with the App(L) processing.

    There is a limited amount of AEs that can be kept by the buffers in the SoftDevice, so if you process in App(L) for too long they will get full. When they are full the link layer will begin to nack packets.

Reply Children
No Data
Related