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

About the demo running micro-esb concurrently with ble in Blogs

Hi, I look at this demo,found that the ESB is PRX in most time, it may lead to a high power consumption.I want to achieve auto ack, piggybacking data in ACk from PRX.So the PTX is only work a short time,just when there are data need to be sended. How to achieve that?

Thanks

Parents
  • Hi,

    To do that you can simply don't enable RX mode when the the timeslot starts on the PTX side. It's nrf_esb_start_rx() call inside TIMESLOT_BEGIN_IRQHandler().

  • The way the esb_timeslot library works now is that same firmware used for both peer. When we have anything in the T payload buffer, at the beginning of a timeslot we will try to send it. So the payload is always sent as a TX packet, not an ACK payload packet. Therefore the TX payload is always empty when the device in PRX mode => no ACK payload.

    To do what you plan to do, you need to modify the code, on your dedicated PRX device, you should disable the check inside TIMESLOT_BEGIN_IRQHandler()

    if (m_transmit_fifo.free_items < sizeof(m_transmit_fifo.buf) && m_ut_state != UT_STATE_TX)
    

    This will disable the nrf_esb_write_payload() at line 328 in that statement.

    And you call nrf_esb_write_payload() when you want to add a ACK payload on the PRX side instead.

Reply
  • The way the esb_timeslot library works now is that same firmware used for both peer. When we have anything in the T payload buffer, at the beginning of a timeslot we will try to send it. So the payload is always sent as a TX packet, not an ACK payload packet. Therefore the TX payload is always empty when the device in PRX mode => no ACK payload.

    To do what you plan to do, you need to modify the code, on your dedicated PRX device, you should disable the check inside TIMESLOT_BEGIN_IRQHandler()

    if (m_transmit_fifo.free_items < sizeof(m_transmit_fifo.buf) && m_ut_state != UT_STATE_TX)
    

    This will disable the nrf_esb_write_payload() at line 328 in that statement.

    And you call nrf_esb_write_payload() when you want to add a ACK payload on the PRX side instead.

Children
No Data
Related