Electronic – Do I need OS for ARM Cortex-M0(3)

armcortex-mrtos

I'm a developer of control devices for switch mode power supplies which need to generate a PWM signal(s) with a frequencies about 100 kHz, measure analog signals, communicate vie USART, make relatively simple calculations and so on. It is also important to start up fast and react very fast on some events like external interrupts (often within a fraction of microsecond).

Now I'm using Atmel Studio with GNU C compiler.

I'd like to go from 8 bit AVRs to ARMs. The main reasons are (hopefully): faster, more flexible, more powerful calculations, better community support.

I'd really want a short learning curve and fast development cycle.

I decided to use ARM Cortex-M0 and M3 processors.

Will I be able to use operation system on ARM?

The reasons why I think it could be useful in my case – faster learning curve and development time. But I have some doubts that I will be able to run application within several milliseconds after supply voltage will be applied and that I will be able to interact with ARM peripherals (like timers).

So do I need an OS in my case?

Best Answer

A general purpose operating system, such as Linux, is a different thing from a real-time operating system (RTOS), such as FreeRTOS and ARM's own RTX. You can search for more info about the differences.

From the description of your application I would say that you certainly don't need, and probably don't want, a general purpose operating system. An RTOS could be used but it is probably not necessary.

I believe the ARM Cortex M0 and M3 microcontrollers do not have a Memory Management Unit (MMU) so that will make it difficult to even run a general purpose operating system on them. An RTOS does not require an MMU.

If you are already familiar with AVR programming but you're not familiar with RTOS programming then using an RTOS on your new ARM project is probably going to increase your learning curve rather than decrease it.

An RTOS does not require a lot of time to boot up like a general purpose operating system. An RTOS application can be up and running within milliseconds.

An RTOS should not get in your way of accessing the microcontroller peripherals such as timers.