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

maximum baudrate nrf52 slower than BLE 5.0

Hi, we're starting to plan an update to BLE 5.0 (specifically the double bandwidth feature) on a product using the nRF521832 connected to an STM32. We were just testing increasing our internal communication speed, and realised the nRF52 is limiting us to "Up to 1 Mbps baudrate"

That's slower than the net OTA bandwidth of ~1.4Mbps!

Any chance we could double that? My suggestions would be:

  1. using 8x oversampling rather than 16x?
  2. utilising a faster clock (PCLK32M) when available?

Thanks!

PS: we'll be outputting the nordics clock on a GPIO to drive the clock input on the STM32, so clock drift between the two devices should not be an issue for us ;-)

  • Unless I misunderstand your suggestions they would both require us to make hardware changes to the chip, it's not something we can change in software. In other words I would disagree it's an easy thing to do ;)

    In my experience with other micro controllers, 8x oversampling is a very common setting for the uart peripheral, 16x being the default. That setting being a single bit in a register, on the STM32 it is the OVER8 bit in the USARTx_CR1 register. So if you have such a register, then it should be a simple solution, but yeah, if your peripheral hardware doesn't have that, then I agree: not quite so easy :-)

    Same with the second suggestion: often it's possible to configure what clock source the peripheral should use, or the other way round: what frequency the peripherals' clock should get. But since often several peripherals share a clock, I'd understand if this suggestion is more difficult...

    I get that to make sure the soft device runs 100% smooth it's best not to expose every bit of hardware capability to the user, but the 8x Oversampling bit, if it exists, in my opinion should not cause any harm!

    That said: Good point and thanks for the info on the iPhone's max speed: was that measured with the iPhone 8 or X (should both have BLE 5.0) and if yes, with what connection interval? 30ms, 15ms or including the "HID" trick to bring it down to 11.25ms?

    Thanks again

  • Hi

    For better or worse we design most of the serial interfaces ourselves, trying to enforce a unified look and feel (including the task/event registers that are used in all Nordic peripherals). This includes the UART, which sets the baudrate exclusively through the BAUDRATE register.

    Both the iPhone 8 and X support the high speed mode introduced by Bluetooth 5.
    The connection interval when achieving the highest speed is 15ms.
    The main limitation in the latest iPhones regarding speed is the event length, which is capped to 50% of the connection interval. This means you are only allowed to send packet for 50% of the available time, even if the connection interval is small. This is probably done to ensure sufficient RF time for other RF protocols (like WiFi or classic Bluetooth), but also means that you will not achieve the highest possible speeds that Bluetooth 5 is capable of.

    Best regards

  • I see! too bad, I guess... and the clock input is "hardwired" to 16M? and if not: which other peripherals would be affected (or effectively disabled) if it could be changed to 32M?

    Did you by any chance test the iPhone with Wifi turned off, and no classic bluetooth devices paired? (see if iOS is smart enough to then give BLE 100% radio time? ;-) (PS: if you do still test that, remember that on iOS 11 Control center Wifi Off != Wifi Radio off! You have to go into the settings to really Disable the Wifi and/or Bluetooth hardware!)

  • Hi

    The radio surely wouldn't work, since the carrier frequency would be far too high, and the flash memory would not be able to keep up at the higher speeds. Most likely the chip would crash completely because of some internal timing violations.
    Usually devices like these are designed to tolerate a certain amount of drift (up to 10% for instance), but once you go beyond that various things on the device are bound to fail. Since we don't test the chip under these conditions we can only guess what would happen.

    Try overclocking your desktop CPU to double the frequency, and I am sure you will see similar issues ;)

    I don't know if we have tested with WiFi disabled in the settings, but I am pretty sure the ~670kbps limit is enforced by the phone regardless.
    I would be happy to be proven wrong in this case :)

    Best regards

Related