This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to test NRF51822 transport data rate

  1. now I used sample code of radio

  2. change NRF_RADIO->MODE = (RADIO_MODE_MODE_Nrf_2Mbit << RADIO_MODE_MODE_Pos);

  3. In transmitter code , I change

    while (true) { send_packet(); packet ++; nrf_delay_ms(1); __WFE(); }

  4. In receiver code , I change

    int oldrecv = -1; while (true) { uint32_t received = read_packet(); if(oldrecv != received-1) { NRF_LOG_INFO("%d\r\n", received); NRF_LOG_FLUSH(); oldrecv = received; } err_code = bsp_indication_set(BSP_INDICATE_RCV_OK); APP_ERROR_CHECK(err_code); }

  5. result. Transport data 1KB/S, Data lose is about 80%.

  6. question1, is my test right?

  7. question2, how to solve this problem?

  8. question3, how to test 2M bit ?

Parents
  • Hi

    What is your end goal of this exercise?

    If you are planning to implement an application later on I would strongly recommend using an RF library, such as the nrf_esb implementation available in the SDK. Then you will get features such as FIFO buffering, acknowledgements and packet re-transmission for free, and you don't have to focus on the low level radio handling.

    If you use 255 byte payloads you will get pretty high data rates, and you can increase it even more by disabling the acknowledgement feature (even though you won't detect packet loss anymore).

    Best regards
    Torbjørn

  • You are right, Think you very much!

Reply Children
No Data
Related