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

Nrf24L01+ to gpu lowest latency

Hi, I have the opportunity to bid for some research funding for my project, and I'm thinking of speccing a workstation for processing video in realtime, and sensor data in real time.

For both situations, I'm interested in the lowest latency possible. For the sensor data, one or more nrf24l01+'s will be used to collect the data. What is the best way to transfer this to the gpu? I'm thinking of some sort of PCIe interface then gpudirect rdma or directgma.

I'm completely new to this kind of thing, and researching online appears confusing. I see there's quite a few gpudirect compatible products like high speed NICs or fpdp ports but I'm talking about stuff I don't know enough about.

At the moment, I'm going nrf24l01+ to stm32 to usb to pc. Wanting to know how to minimise the hops for a gpu workstation (Tesla, Firepro, etc...).

Thanks, Joe

  • Hi Joe

    I guess the question is how low latency you need.

    You could replace the nRF24L01+/STM32 combo with an nRF24LU1+ device, but it would probably not make a big impact on the latency since there is still an SPI connection between the radio and the MCU internally in the nRF24LU1+ device (similar to the interface you run externally between the nRF24L01+ and the STM32).

    Unless you find a way to connect an SPI based device like the nRF24L01+ directly to the PC, bypassing USB, the main latency will be set by the USB interface. I don't know what kind of USB endpoints you use in the STM32, but if you use bulk endpoints the latency over the USB will be 1ms. On top of that you have the time it takes to respond to the RX interrupt and read out the packet from the nRF24L01+, but this could be done in some hundreds of microseconds.

    The real challenge is probably going to be on the PC side, since a PC is not really a real time system and can give you a very variable latency. This is a bit outside our field of expertise, so I can't really help you there... If you can find some interface for the PC that gives you lower latency than USB, and can be interfaced to some MCU that can act as a bridge to the nRF24L01+, then you might get lower latency that what you have today. Otherwise I would expect a couple of milliseconds to be the lowest you can reach (not including software delays on the PC side).

    Best regards
    Torbjørn

  • Thanks. I think the latency will probably be ok but I'm interested in what's the best possible. I think ultimately, to get to the GPU in the shortest amount of time, I would have to make my own PCIe card and use the DMA access (gpudirect RDMA or directgma). Not a simple thing and I haven't found any off the shelf options including an MCU that I can programme to take data in via SPI. So I would have to do a lot myself (PCIe interface, etc) and I don't fancy that.

    For video there's quite a few PCIe options that are compatible with the gpu DMA schemes, designed for broadcast video applications I think.

    Anyway, thanks for your thoughts. Joe

  • I am sorry I couldn't be of more help...
    If you end up going down the USB route you might want to consider the recently released nRF52840 device. It contains a built in USB device interface, and the radio uses DMA rather than SPI internally, so it should be a bit quicker than an nRF24L01+ connected to a separate MCU.
    The drawback of this solution is that you have to write some dedicated software for the nRF52840, and you will still be limited by the latency of the USB.

  • I am happy to help. The best of luck with your project :)

Related