8 years, 3 months ago.

porting an old project to ARMmbed

Hi all, It has been long time I used MCU. I didn't use mbed before. I am looking for some advice if mbed is suitable for my project.

1) I need a development board as a end product. So I need to load the code into the chip permanently (code remains in the chip even with power off). With mbed, does it support online code updated (without using external code burner)? After the code uploaded, will it stay in the chip even with power off?

2) I saw online some MCU in the market supports RTOS. I wonder if mbed supports that or not. In my project, I am using a MCU to control a DDS. I need the MCU to output control signal via GPIO or UART at precise time interval (ranged from microsecond to 100millseconds). Any board can do that?

Thanks.

1 Answer

8 years, 3 months ago.

mbed ARM devices have flash memory, so the programme remains in the device when power is removed. It will start execution again as soon as power comes back on.

Regular mbed boards (eg nucleo or LPC1768) have a programmer on board. You can drag and drop the code to the programmer that shows up as memory stick when you connect it to your host PC. This can be repeated ''ín the field''. Give a new binary file to your enduser or maintenance guy. They can connect the mbed to a PC using the USB port and just drop the new binary on the memorystick. Reset the board and the code executes.

There is an RTOS available although it will be replaced by mbed OS. In most cases you dont need that for simple time controlled actions. The mbed library Timer or Ticker methods should do the trick.

Accepted Answer

Thanks for your answer. I wonder are ll model of mbed boards use flash or some will use non-volatile memory to store permanent code.

In addition, what's the resolution and precision of the timer mbed provide? I use to have the PC controlling the clock in terms of 1 or 2 milliseconds interval. But because of the event-driven OS in PC, I rarely will get the timer control better tan 10ms to something like 300ms.

posted by kim jone 16 Jan 2016

All mbed boards use flash for code execution. I think most could execute code from RAM, but its not used. Checkout the platforms page.

Timer resolution is 1 us. Even when taking into account some interrupt overhead, the accuracy should still be pretty close to a microsecond since the processors typically run at 30-48MHz (M0) upto 80-120MHz (M3/M4) or even higher for the M7.

posted by Wim Huiskamp 17 Jan 2016