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

nRF52810 -> nRF52805 firmware compatibility?

If I have a firmware project working reliably on the nRF52810, is it possible to build a single firmware image that will run on both the nRF52805 and the nRF52810? I'm not using any of the peripherals that the nRF52805 loses from the nRF52810. I understand the pinout differences but I hope to be able to sort them out in the hardware design or to detect nRF52805 vs nRF52810 at boot and set the pinout accordingly.

I diffed many of the nRF52810 files in SDK 17.0.0 against their nRF52805 counterparts and didn't see much difference (beyond the missing peripheral registers), but maybe I'm missing something. I don't have access to actual nRF52805 hardware to simply try this, so I wondered if anyone here had any input.

Edit: It's maybe worth mentioning that I did see this post about developing for the nRF52805 (https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/developing-for-the-nrf52805-with-nrf5-sdk), but while it is helpful, it focuses on the differences between nRF52832 and nRF52805 rather than nRF52810 and nRF52805.

Thanks.

  • Hi 

    This should be possible, but I will have to check internally if this is something we have tested. 

    Mostly the nRF52805 has a subset of the functionality in the nRF52810, but since the nRF52805 was released after the nRF52810 there are some minor differences in the nRF52805's favor, such as longer maximum length for EasyDMA transfers in many of the peripherals (TWIM and SPIM for instance). 

    I will provide more details next week. 

    Best regards
    Torbjørn

  • Thanks for checking into this.

    Assuming this can work (and I'll wait to see if you get any additional feedback from your team), it sounds like the correct approach would be to compile for nRF52810 because the nRF52810's smaller EasyDMA length could work on nRF52805 (just not at peak performance) but the nRF52805's larger EasyDMA length would not work at all on nRF52810.

  • Hi

    Whichever approach you pick there will be some possible pitfalls, because of missing functionality in one device over the other. 

    As an example the nRF52805 only has 10 PPI channels, vs 20 in the nRF52810, and lacks the PWM, PDM and COMP interfaces. If you compile for the nRF52810 you would need to make sure that you don't access any of these features. 

    Best regards
    Torbjørn

  • If I start with nRF52810, is limiting PPI channels to 10 (instead of 20) to accommodate nRF52805 as simple as changing PP_CH_NUM from 20 to 10 in nrf52810_peripherals.h?

    Similarly, if I start with nRF52805, is limiting max EasyDMA size to accommodate nRF52810 as simple as changing X_EASYDMA_MAXCNT_SIZE #defines in nrf52805_peripherals.h? Looks like I'd have to reduce TWI/SPI values from 14 to 10.

    There are no dev boards with real nRF52805 parts, are there? Only emulated? So since I can't actually test "nRF52810 code" on real nRF52805 hardware until/unless I build a custom board, it might make more sense to compile for nRF52805 and get it working on my nRF52810 board.

  • Hi 

    Sydney said:
    If I start with nRF52810, is limiting PPI channels to 10 (instead of 20) to accommodate nRF52805 as simple as changing PP_CH_NUM from 20 to 10 in nrf52810_peripherals.h?

    That should be enough, yes, but I would recommend copying these files and renaming them so you don't have to change the originals. In order for this to work you need to define a new chip code (replacing NRF52805_XXAA or NRF52810_XXAA), and update nrf.h to point to your modified files instead of the originals. 

    Sydney said:
    Similarly, if I start with nRF52805, is limiting max EasyDMA size to accommodate nRF52810 as simple as changing X_EASYDMA_MAXCNT_SIZE #defines in nrf52805_peripherals.h? Looks like I'd have to reduce TWI/SPI values from 14 to 10.

    Correct, changing these defines should be sufficient. 

    If you diff the nrf528xx_peripherals.h files it is quite clear what is different (even if this includes some typo fixes and other non consequential differences). 

    Sydney said:
    There are no dev boards with real nRF52805 parts, are there?

    Correct. For both the nRF52805 and the nRF52810 the development kit used is the nRF52DK (nRF52832).  

    Sydney said:
    So since I can't actually test "nRF52810 code" on real nRF52805 hardware until/unless I build a custom board, it might make more sense to compile for nRF52805 and get it working on my nRF52810 board.

    At some point you need to test on both platforms anyway, but I agree that it makes sense to base your project around the nRF52805. 

    As I said earlier I think the safest way is to create new header files that limit the functionality to the lowest common denominator between the two devices. 

    Best regards
    Torbjørn

Related