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

NRF5340 Performance

Hello, we are a long time user of the NRF52840 and are consistently running out of spare CPU, so are looking at the NRF5340.

I see that the NRF5340 runs up to 128Mhz.  Was the flash memory bus bandwidth doubled vs the NRF52? Also does the SRAM run up to 128Mhz?

Thanks,

Dave

  • Hi Dave

    Every design choice has advantages and disadvantages. Like you indicate having faster flash throughput will increase power consumption, it won't help with wakeup times, and this drawback will affect you whether you need it or not. 

    If you go to sleep a lot then there is no need to use the the MCU at 128MHz, 64MHz provides better efficiency, and would probably reduce the overhead from going in and out of sleep since you would most likely do it less often (because of higher CPU utilization). 

    In the end the question is whether or not the nRF5340 will fit within your project requirements, in terms of performance and power consumption, and the only way to know that for sure is to test it out in practice. 

    One trick to reduce cache misses and improve performance is to put critical code (like frequently occurring interrupt handlers) in RAM so it can run without wait states and without having to use the cache. The RAM in the nRF5340 is divided in separate blocks, meaning you can put code in one block and data in another, to prevent interleaving code and data access which would otherwise slow this down. 
    Obviously this assumes you have some RAM to spare, again depending on your project requirements, but even just setting aside 10% of the RAM for code should increase performance considerably if you make sure to put the right part of the code into RAM 

    As for the flash speed the expert on this is still unavailable, but I will get back to you as soon as he's back in office. I don't think there is an increase in flash throughput in the nRF5340 (as you can probably read out of my answer), but I can't know for sure until I have gotten his input. 

    Best regards
    Torbjørn

  • The ARM Cortex-M MCUs use a mixed 16- and 32-bit instruction set, thus code execution is typically a lot slower than fetch speed. Modern C compilers are pretty good at unsing 16-bit instructions whenever possible.

    The NRF53x flash cache is 8KB. That should fit most of the timing sensitive application code entirely.

    And while the core will use a bit more power at 128MHz, it can also sleep longer in typical MCU applications.

    This lowers the active time and overall current consumtion - also known as "race to idle".

Related