Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

what happened during an interval in the Power Profiling Application example?

Dear friends,

            In the Power Profiling Application (an example of nordic SDK), the priority of the application timer is set to APP_LOW(as shown in the pic below).  

However, according to the pic below, as sd_app_evt_wait() is a SVC, how can the application timer with a lower priority wake up the SOC ?

(1) In this application, if the SOC was waken up by the timer before connection event, does the notification data still have to be send until the coming connection event?  That to say, the sd_ble_gatts_hvx() just copies the data into the radio buffer? and during an interval,there may be multiple tx phases? In addition, if the SOC was waken up at the connection event time, what will happen?

(2) what is the size of Radio buffer?

(3) During an interval, there may be four kinds of frame? such as: payload frame from M and empty ack frame from S; payload frame from M and payload frame from S; empty frame from M and payload frame from S; empty frame from M and empty ack frame from S?

Parents
  • FormerMember
    +1 FormerMember

    There is a mismatch between the softdevice specification (SDS) and the SDK examples: The SDS says that the software interrupt priority level of the softdevice is '4' (APP_IRQ_PRIORITY_MID). However, in the applications in the SDK, it is set to APP_IRQ_PRIORITY_LOWEST, see swi_interrupt_priority_workaround(..) in nrf_sdh.c.

    Answer to your questions:

    1. If sd_ble_gatts_hvx() has been called successfully, the notification data will be transmitted upon the next connection interval. And yes, that can include multiple packets per connection interval. 
      The SOC will keep track of when it needs wake up with respect to the BLE activity. 
    2. The S132 has 6 TX HVX buffers.
    3. Could you elaborate a little more? Note: there will only be transmitted multiple packets per connection interval when there are data in the TX buffers.
  • Thank u for your valueable answer. If the software interrupt priority level of the softdevice is '4' (e.g. for sd_app_evt_wait() ) and the priority of the timer in this application is set to APP_LOW, how can the application timer wake up the SOC ? (The ISR of the timer is to call  sd_ble_gatts_hvx() to send data).

    (1) if the SOC was waken up by the timer at the connection event time, what will happen? 

    (2)  6 TX HVX buffers? you mean 6 tx phases in a connection event?

    (3) how many bytes sd_ble_gatts_hvx() can write to the memory buffer at a time?

    (4) i mean: during a connection evt, can a Slave device both receive user data from a Master and tx data to the Peer?

    best regards.

  • FormerMember
    +1 FormerMember in reply to xvhongpeng

    sd_app_evt_wait() does only put the chip to sleep, it doesn't stay in that priority level. Therefore, a timer of priority APP_LOW can wake up the chip.

     

    1. A timer will wake up the chip at the time of a connection event. If something else, other than the timer keeping track of the connection is waking up the chip, it is still the radio that will get the priority when needed.
    2. When there are data in the TX buffers, the chip will try to get them transmitted as fast as possible. The number of packets per connection interval does also depends on what the central device is capable of. Note: It is also possible to extend the packet length, that will increase the throughput. I would recommend you to read the throughput chapter in the Softdevice Specification, and also test test the throughput example in the SDK.
    3. The number of bytes that can be written to the TX buffer depends on the maximum packet size that is configured. To get a better understanding of this, I would recommend you to test the throughput example. 
    4. Yes, in a connection event, both the slave and the master can send and receive data. The data rates a written in the throughput example in the SDS.
Reply Children
No Data
Related