Regarding BLE serialization

Hello Nordic,

As described regarding BLE Serialization in the link https://nordic-prod.zoominsoftware.io/bundle/sdk_nrf5_v12.3.0/page/lib_serialization.html, we want to use nRF52820 as a connectivity chip. But when i look at the documentation of the softdevice https://docs.nordicsemi.com/bundle/ug_gsg_ses/page/UG/gsg/softdevices.html, i don't see any support for the nRF52820.

1. Can we use nRF52820 as a connectivity chip or not?

2. If possible, can we have a possibility to update the softdevice of Connectivity chip from the BLE Application chip?

kind regards

Teja

Parents
  • Hello,

    2. If possible, can we have a possibility to update the softdevice of Connectivity chip from the BLE Application chip?

    This is not possible. The flash on the nRF52820 is too small to support SoftDevice upgrades. 

    Can we use nRF52820 as a connectivity chip or not?

    The link that you refer to is for SDK 12.3.0, which is way older than the nRF52820. Try looking in the one for SDK17.1.0:

    https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/lib_serialization.html

    Out of the box, we don't have a project file for the nRF52820, but you can probably use one of the ones found in SDK17.1.0\examples\connectivity\ble_connectivity, and adjust the target device, and flash and ram sizes.

    What SoftDevice do you intend to use? Do you want full feature support? Or is it e.g. only for peripheral uses?

    Best regards,

    Edvin

  • Actually, I mixed up the devices. The nRF52820 may be able to update the softdevice (the nRF52810/52811 will not work). I will have to check if you find it relevant. But please let me know what softdevice you intend to use. And if you are not sure, please let me know what kind of device you want to develop. BLE peripheral? BLE central? both?

    Best regards,

    Edvin

  • Hi Edvin,

    we want to develop a BLE Peripheral and communicate with the Application via uart using serialization library provided by nordic.

    The Softdevice, we want to use is either s112 or s113, i suppose these are the only supported packages from nodic for the nRF52820 chip.

    I downloaded the latest SDK "nRF5_SDK_17.1.0_ddde560\examples\connectivity\ble_connectivity" and looked at the hex files provided. The size of the hex are relatively larger than the flash size of the nr52820 chip. We could find the suitable one for the chip.

    So, if we use serialization library for the development can we fit our application on the chip?

    Generally, What is the approximate size of the Softdevice?

    Along side the softdevice, we also need to have firmware using codedec for decoding and encoding purpose on the nRF52820 chip? I am afraid, if we combine both we cannot fit the firmware on the nRF52820  Soc

    Best Regards

    Teja

  • I mean, we could not find the suitable precompiled Hex file for the chip in the SDK.

    Overall, the firmware on the connectivity chip consists of  "Serialization + Codedec + Softdevice" , am i right?

    In case, if we want to update the firmware, then we need have DFU over Uart. So we need also consider this point.

    This is the overall idea, and we would like to know how feasible this solution fits?

Reply
  • I mean, we could not find the suitable precompiled Hex file for the chip in the SDK.

    Overall, the firmware on the connectivity chip consists of  "Serialization + Codedec + Softdevice" , am i right?

    In case, if we want to update the firmware, then we need have DFU over Uart. So we need also consider this point.

    This is the overall idea, and we would like to know how feasible this solution fits?

Children
  • The flash of the nRF52820 is 256kB (= 0x40000 bytes), as you can see in the nRF52 series comparison table.

    The precompiled version of the serialization application using the s112 softdevice is 0x2573B bytes = 153 403 bytes, so it will fit.

    If you are using a serial bootloader, it only needs to fit the bootloader, and the softdevice and application, so that should be doable. The serial bootloader is only around 21kB.

    You can play around with the .hex files using nRF Connect for Desktop -> Programmer.

    The size of the flash will be the last DK that you connected to it, so it is a bit off, since we don't have an nRF52820 DK, but you can drag the hex files into it, and you can see what flash addresses they occupy:

    This is what it looks like with the pre-built connectivity firmware with the s112 and a serial bootloader:

    Note that the address for the bootloader is not correct. This is because I built the bootloader for the nRF52811, which is even smaller than the nRF52820, so in reality, you have some more space between the app and the bootloader. The screenshot is taken from the nRF Connect for Desktop -> Programmer application.

    So it seems feasible. But be aware that you need to do some tweaking. We don't have any bootloader projects for the nRF52820, so you will need to modify one of the existing serial bootloaders to fit the nRF52820 by changing the target device and modifying the flash and ram sizes. The same goes for the connectivity firmware. 

    Also, I believe I remember that somewhere in the bootloader, there is a restriction saying you can't update the softdevice in the nRF52810/11, but I don't remember whether it also applies for the nRF52820. The restriction was based off that it doesn't have space for two softdevices in flash at the same time, but that isn't really a requirement if you are using a serial bootloader, so you can just remove the restriction if you run into it.

    Teja_K said:
    Overall, the firmware on the connectivity chip consists of  "Serialization + Codedec + Softdevice" , am i right?

    Depends on what you mean by "serialization + codedec", but it consists of the softdevice and the application that interprets the UART messages in the serialization protocol, and triggers the equivalent softdevice API. And the other way around, when it receives a softdevice interrupt, it packs it into the serial protocol and forwards it to the main application chip via serial.

    In the screenshot above, you can see the different parts:

    Orange: MBR (part of the softdevice, specifically used for DFU and softdevice updates)
    Blue: Softdevice
    Green: Appliaction
    Red: Bootloader

    Best regards,

    Edvin

  • Thanks for the reply.

    But, I could not found the precompiled version of the serialization application using the s112 softdevice in the "nRF Connect SDK /  nRF5_SDK_17.1.0_ddde560 / s112nrf52720 ".

    Could you please tell us, where is the correct place to find this application hex file?

    or If you have any example application, can you provide us?

  • I found it in:

    nRF5_SDK_17.1.0_ddde560\examples\connectivity\ble_connectivity\hex\ble_connectivity_s112_uart_pca10040e.hex

    You can build it yourself using the application project found in:

    nRF5_SDK_17.1.0_ddde560\examples\connectivity\ble_connectivity\pca10040e\ser_s112_uart\ and select your favorite IDE. Again, you need to adapt this to work with the nRF52820, as these application projects are intended for the nRF52810/nRF52811.

    Best regards,

    Edvin

  • Hi Edvin,

    Thanks for the response.

    In case of nRF52820, Can I know how many multiple/parallel connections does the chip support?

  • It depends on the softdevice that you use, and some other things, such as how many characteristics you have, the connection parameters (MTU). So the only way to test is to try, to know for sure, because the memory requirement is a sum of a lot of parameters.

    Also, you have to keep in mind the time spent for each connection. If you have a short (7.5ms) connection interval, you can only manage to fit two connections successfully every connection interval. You can of course rely on the scheduler in the softdevice, giving the connections that are about to time out a higher priority, but then it is better to increase the connection interval. 

    How many are you hoping to support?

    Best regards,

    Edvin

Related