Back to articles
Why does the nRF5340 have two cores?
A device with two user-accessible processor cores may seem a bit excessive, but when you understand why Nordic has spent millions of R&D dollars bringing nRF5340 to market, you’ll see it’s anything but.
Nordic pioneered the Bluetooth LE Arm processor-based SoC with the launch of the nRF51822 back in 2012. Some scoffed at the idea suggesting that it was overkill for a short-range wireless chip to incorporate its own Arm processor, Flash memory, and more. They argued that what developers needed was a “connectivity chip” to pair with an external processor and memory. But what those sceptics failed to appreciate is that if you give developers more capability, they will quickly come up with innovative ways to use it then come back asking for yet more processing power, memory and peripherals.
Today the clear size, power, cost, and convenience advantages of a single-chip solution have won over most and the hardware architecture first brought to market by Nordic has been mimicked by other companies. The nRF52 Series enhanced the concept with a more powerful Arm processor and higher Flash and RAM capacity to meet continued customer demand. With hundreds of millions of nRF51 and nRF52 Series SoCs in use worldwide, it’s fair to say the original idea has worked quite well.
With the nRF5340, the first Bluetooth LE SoC in Nordic’s latest short-range wireless product family, Nordic has again changed the game by introducing a device with not one, but two user-accessible processor cores.
Power to the developer
Developers are very clever at coming up with new applications for wireless connectivity (especially as Nordic’s unique software architecture and development tools make it easy to prototype new ideas). And each one tends to be more complex than the last. This demand for enhanced performance to support more complex wireless applications has led to the increase in processing power and memory.
But such demands do present the chip manufacturer with a challenge: A more powerful processor with a faster clock and associated larger memory capacity demands more power, yet developers expect short-range wireless chips to run longer from batteries with each product iteration. A single-processor device always has a trade-off between the CPU’s computational power and its efficiency. For example, there is even an energy cost for the computational overhead needed to run sophisticated application software even when the processor is just waking up solely to perform a simple Bluetooth LE connection.
Eliminating the trade-off
A dual-core SoC eliminates the processor trade-off. While a highly efficient network processor looks after the relatively simple Bluetooth LE stack operation, a powerful processor can be dedicated to the application—only needing to wake up when it’s time to run the complex software algorithms. To make things even more battery-friendly, each processor can benefit from its own power management system.
The nRF5340 incorporates two Arm Cortex-M33 processors. The application processor is optimized for performance and can run at either 128 or 64 MHz. The choice of clocking frequency is determined by the developer’s requirement for processor performance (510 CoreMark at 128 MHz) or efficiency (76 CoreMark/mA at 64 MHz). The network processor is optimized for efficiency (101 CoreMark/mA at 64 MHz).
How well does this combination of two processors work? If you compare the nRF5340 with Nordic’s advanced nRF52840, for example, the former offers much better computing performance and superior power consumption.
Coping with stack and application real-time demands
The Bluetooth LE protocol software (“stack”) has hard real-time requirements, and it often happens that the customer application has some real-time requirements of its own. These separate requirements often don’t combine well. The challenges can be solved in a single-core SoC but at the cost of higher software complexity and the associated risk of bugs that are difficult to resolve. For example, in the medical market, specific certified applications cannot be combined with the protocol software underlining the need for certainty of software behavior.
The arrangement of the nRF5340’s cores is more like a two-chip solution in one SoC rather than a system that can run software in parallel. Each core has its own firmware images and set of tasks that run optimally on that core. This arrangement makes it easy to overcome the problems of clashes between application and protocol code real-time requirements.
One size doesn’t fit all
A dual-core architecture introduces some complexity because the SoC has more interacting components than a wireless SoC with a single Arm processor. But the nRF5340 architecture has been cleverly divided into distinctly defined subsystems to maximize its flexibility. For example, as the world’s leading Bluetooth LE solutions provider, Nordic has designed the most efficient and stable subsystem to operate the RF protocol. Safe in the knowledge that this subsystem is perfectly optimized, the customer needs no developing there, allowing them to focus solely on the application processor subsystem to differentiate their product from the competition.
This does not mean the more ambitious developer is locked out from the network processor; Nordic gives customers full access to both cores and freedom to use each as they want - which is not always the case for comparable products on the market. The network processor’s programmability enables the developer to select application software elements to run on it to take advantage of its higher efficiency compared with the application processor.
For example, some customers may only be interested in simple Bluetooth LE connectivity and will be able to fit the whole Bluetooth LE stack in the network domain, while others might target multiprotocol solutions where the upper layers will only fit in the application domain. (IoT requiring end-to-end encryption are best served by the CryptoCell-312, which only resides in the application domain.)
The only certain thing is that one solution will not work for all. That’s why Nordic is planning to provide software examples that demonstrate different approaches for combining the application and network processors.
Multicore could come next
The nRF5340 features two cores primarily to eliminate the trade-off between processing capability and power consumption associated with a single core. The application processor provides the computational heavy lifting only when needed while the power-optimized network processor looks after the wireless protocol. A second advantage is that each core can run its own software, preventing clashes between application code and protocol software. But while two cores are good, more than two are better. That’s why the nRF5340’s architecture is designed to support a multicore system and not just a dual-core one. A multicore nRF53 Series SoC could form part of Nordic’s product portfolio in the future.
Back in 2012, Nordic’s nRF51 Series SoC’s unleashed a wave of innovative wireless products. With the release of the dual-core nRF5340, a whole new generation is about to appear.