8 years, 10 months ago.

about real-time library

Hi there, I start my project with ARMmbed days ago. I was using very old MCU like 8051 before. I don't have much experience on embed system with threading or real-time supports. I am looking for a system support strict timing control. I am reading some materials on mbed and it seems that the system is single-thread. The OS is not real-time system but there is some real-time library supported. I wonder what is that real-time library for? Is it used to control to have precise timing/clock?

what kind of timing resolution are you looking for ?? nanoseconds, microseconds, millisecs.????

posted by Gary Z 20 Jan 2016

I expect the time resolution to be nanosecond. With the circuits and MCU I worked before, I can only achieve about couple microseconds (at best). In real case, it is even worse because some overheads could drop the time resolution to hundreds milliseconds

posted by kim jone 20 Jan 2016

Hello Kim. MBED is an amazing tool for rapid prototyping but has limitations like any other microcontroller. If you are looking for a multi-threaded processor with ultra low latency then consider the line from XMOS. However, be prepared for a learning curve as the tools are not as simple as MBED to grasp. For us, we are marrying the XMOS technology with MBED as you must develop the IP for your project but there are some great pre-written code samples on the xcore.com website. The XMOS line works in nanoseconds rather than milliseconds. There is a really nice solution they released which offers the XMOS CPU + ARM processor in a single device (ARM processor is from the Gecko line by SiLabs). Hoping that MBED will be supported on that target in the near future.

posted by Sanjiv Bhatia 20 Jan 2016

Thanks for your reply. I just read the XMOS spec, looks good but too much I can afford currently. Will try that in future for other project.

posted by kim jone 20 Jan 2016

1 Answer

8 years, 10 months ago.

The RTOS is useful to simply design of systems with multiple tasks that need to run. In the end of course we are talking about single core processors, so they can only run one task at a time. If you have very high requirements on timing as you say, then you are generally better of just programming it bare metal, with no OS in between. (Which is what you do normally on an MCU, also with mbed).

Thanks for your reply. Is it possible to have mbed work without any OS? I am just starting ... as I understand so far, mbed is working in a given OS!?

posted by kim jone 20 Jan 2016

The default for mbed is no OS. For most things you can make a simple interrupt driven program with no OS overhead. The mbed libraries do add a slight overhead to the raw ARM interrupt latency but not normally enough to matter.

posted by Andy A 20 Jan 2016