Behind the datasheet: HW-RTOS | Avnet Silica

Display portlet menu

Behind the datasheet: HW-RTOS | Avnet Silica

Display portlet menu

Behind the datasheet: HW-RTOS

no image available
computer motherboard on bench
Making software run faster using hardware acceleration

Transferring data is fundamental to the Industrial IoT. As communications protocols become more complex to handle the large amount of data being moved around, they demand more of the limited resources available in an endpoint, such as a sensor or actuator. Can hardware accelerators help minimize the software burden?

Most embedded systems now use some form of operating system, particularly if they are based on a modern 32-bit core like the Arm Cortex-M family. Support for embedded real-time operating systems is strong, thanks to the benefits they bring. But real-time comes in many shapes, so what can engineers do if they need to maintain hard real-time execution? One approach is to make full use of the hardware features offered by the processing platform.

An operating system is normally software, designed to interact with hardware at a low level. Operating systems often provide an abstraction layer between the application and the hardware, which makes it easier for the higher-level code to access those low-level features.

A real-time operating system, or RTOS, extends this to include ways of guaranteeing things happen just when you want them to. This can create conditions where the software and hardware battle for control. The way around this is to turn off those hardware features that could disrupt the software, but this too has problems. If certain features, like interrupts, are turned off (masked) even for very short periods, there is a chance that an event will be missed.

This basically describes the huge challenges involved and the enormous skills required when developing real-time systems. The RTOS was designed to mitigate these issues, using techniques such as ticks, semaphores and interrupt service routines. All these features are normally software based.

The concept behind the proprietary HW-RTOS, or hardware RTOS, is to implement these features in hardware and access them through APIs. What this brings is low interrupt latency with low jitter and very short interrupt disable periods.

The main features of the Renesas HW-RTOS

By taking a dedicated hardware approach, the HW-RTOS handles the tasks that could make an RTOS less responsive. Because these features are offloaded to hardware, the rest of the system becomes more responsive and less susceptible to disruption from isolated events.

The first of these is tick offloading. By handling the process of measuring elapsed time in hardware, the RTOS doesn’t have to stop executing its current task just to mark time. And because the tick is executed in hardware there is no variation in time measurement, resulting in higher precision.

Diagram

The tick offloading feature of Renesas’ HW-RTOS acceleration technology delivers greater accuracy and higher processor utilization.

 

Interrupt servicing is a big part of real-time system design. A RTOS handles interrupts by switching to the relevant service routine when an interrupt is detected. If another interrupt is asserted during that time, potentially with a higher priority, it could be missed. The normal approach is to switch between tasks when servicing interrupts, but this can result in long periods of time when no tasks are being executed due to the interrupt servicing process.

In the HW-RTOS, the interrupt service routine is handled in hardware. This has the effect of reducing the load on the CPU, but also shortening the time during which interrupts are disabled. A further gain is a reduction in context switching.

Task switching with HW-RTOS

The HW-RTOS works through APIs. To the host the operating system, the HW-RTOS looks like a peripheral sitting on the system bus. Renesas has created a library for using the three registers that control the HW-RTOS. These registers are the API register, the argument register and the result register. If a task switch is needed, the HW-RTOS indicates this to the host operating system and puts the identification of the task to switch to into the results register.

The HW-RTOS is available in the RZ/N1D, RZ/N1S and RZ/N1L processors from Renesas. For more information about HW-RTOS, including a full list of the APIs it supports, take a look at this document on the Renesas website.

Follow Avnet Silica on LinkedIn

About Author

no image available
Philip Ling

Philip Ling is a senior technology writer with Avnet. He holds a post-graduate diploma in Advanced M...

Behind the datasheet: HW-RTOS | Avnet Silica

Display portlet menu

Behind the datasheet: HW-RTOS | Avnet Silica

Display portlet menu
Related Articles
AI/ML DVI camera
Advancing quality control: The Evolution, Impact and Future of Defect Visual Inspection (DVI) in Manufacturing
By Michaël Uyttersprot   -   July 26, 2023
In the complex realm of manufacturing, Defect Visual Inspection (DVI) has emerged as a critical process, evolving significantly over time.
Batteries-in-declining-state-of-charge
Extending operational lifetime for battery-powered devices is crucial
July 24, 2023
Ultra-low power devices encourage the use of primary cell batteries. Developers can employ design techniques to maximize the power available. It starts with understanding your application’s power profile.

Behind the datasheet: HW-RTOS | Avnet Silica

Display portlet menu
Related Events
How to use a GreenPAK in your application
Date: July 4, 2024
Location: Germany, Stuttgart
City at night
How to Quickly Connect STM32U5 Discovery Kit to the Cloud
Date: January 25, 2024
Location: online, on-demand