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

Using nRF52840 for high data rate operation

Hi there,

I'm about to develop my first BLE product and got my eyes on the nRF52840.

My product should be able to do the following:

1. Continuously read high rate data (1Mbps) from an SPI connection (for couple of hours with no stop)

2. Store the data it reads on an external flash memory (writing it from the nRF on a SD card)

3. Transmit it over BLE to an iOS / Android application

Can the nRF52840 withstand these 3 requirements for continuous operation?

Is there any other Nordic component that meets these requirements?

I'll appreciate your help.

Thanks,

Nir

Parents
  • Hello Nir,

    1) Yes, you can read 1Mbps.

    2) If the SD card can be written to fast enough.

    3) You can have a throughput of 1.4Mbps of payload under optimal conditions.

     

    However, doing all these at the same time will be very hard. Transmitting on 1Mbps (of payload data) is using a lot of CPU resources. I don't think you will be able to handle the other two tasks at the same time. Transmitting these at these rates over the radio takes significantly more time than a regular BLE message. You will have to enable data length extension, which means that the radio will take a significant amount of the CPU time. Also, the range of using 2Mbps PHY (which will lead to 1.4Mbps of payload) does not have a great range, but I don't know the range requirement in your application).

     

    When doing this, I don't think you will have enough time to handle all the interrupts from the SPI, and manage that data to write it to the SD card. 

    I can't say this 100% certain. You would have to test to be sure, but I can't say it looks promising.

     

    Best regards,

    Edvin

  • Hi Edvin,

    Thank you very much for your fast reply.

    Your answer leads me to the following questions:

    1. In what maximal data rate (instead of 1Mbps) can I feel comfortable with these 3 tasks happening simultaneously?

    2. Can I use DMA with the component, so once it reads the sample over one SPI connection it will automatically send it through another SPI / SDIO connection without the CPU's participation?

    3. For what range does the 2Mbps PHY rate works well? (Optimally, I would like to have a credible communication for at least 5 meters range)

    I'll appreciate your help.

    Thanks,

    Nir

  • Hello Nir,

    1: You can handle data on 1Mbps through the SPI, but it is typically used in bursts, and not a continuous stream (for several hours). If you can't handle the interrupts when the SPI buffer is ready fast enough, the data will overflow.

    2: It is possible to forward data, but I think you need to modify the data in order to store it on an SD card. An SD card doesn't just take a stream of data via SPI, and stores it. It has commands that you need to add in order to store the data.

    3: Difficult to say. I attached a couple of projects, built on ble_app_uart and ble_app_uart_c, which will connect when both are powered, and write in the UART log what throughput they have (they are sending dummy data). You can test the throughput on different ranges with this. The example is written in SDK14.1.0, so you would need to download this in order to test it. It might work on 14.2.0, but that is not tested. It will probably not work in SDK15, due to some API changes.

     

    ble_app_uart_TP_examples.zip

     

    I simply don't know on what rate you will be able to do this. You would have to test. You can use this example to send the data, add the SPI and sd-card example (sdk\examples\peripheral\fatfs), and see how long it can run before you start loosing data.

Reply
  • Hello Nir,

    1: You can handle data on 1Mbps through the SPI, but it is typically used in bursts, and not a continuous stream (for several hours). If you can't handle the interrupts when the SPI buffer is ready fast enough, the data will overflow.

    2: It is possible to forward data, but I think you need to modify the data in order to store it on an SD card. An SD card doesn't just take a stream of data via SPI, and stores it. It has commands that you need to add in order to store the data.

    3: Difficult to say. I attached a couple of projects, built on ble_app_uart and ble_app_uart_c, which will connect when both are powered, and write in the UART log what throughput they have (they are sending dummy data). You can test the throughput on different ranges with this. The example is written in SDK14.1.0, so you would need to download this in order to test it. It might work on 14.2.0, but that is not tested. It will probably not work in SDK15, due to some API changes.

     

    ble_app_uart_TP_examples.zip

     

    I simply don't know on what rate you will be able to do this. You would have to test. You can use this example to send the data, add the SPI and sd-card example (sdk\examples\peripheral\fatfs), and see how long it can run before you start loosing data.

Children
No Data
Related