Limitations of the mbed platform

23 Dec 2014

In learning a bit abut this platform , it seems that there are some limitations, like an inability to start multiple tickers at the same time.

So i wonder , what are the limitations of the platform, or things the mbed makes harder to do than normal mcu programming, that i should be aware of before designing something ?

Thanks.

23 Dec 2014

Which target are you using? Since there is none connected to your account. There should not be a problem with starting multiple tickers: It is common to use several, and you can use as many as you want.

I do know of the NRF platform having issues with its ticker code which resulted in only one ticker being usable, but that should have been fixed iirc (maybe not yet in the mbed lib, but mbed-src, which has the latest source code and is a bit the beta branch should have it for sure).

In general mbed is intended to be easier than normal MCU programming, not harder ;). Some of the mbed libraries aren't as optimized as they can be, and in general they don't provide all options that the hardware does. This is intended, since otherwise the code won't be target independent. However there are user libraries with more optimized code for specific peripherals of specific targets, and there is nothing stopping yourself from writing other code: you can directly access all hardware (NRF platform might be bit different, never used it, and I know there is another layer which should result in low power consumption), so you can for example use mbed functions for non-critical parts, and if they won't suffice for the most critical parts of your code you write your own drivers to handle that.

23 Dec 2014

Thanks. I'm new to the mbed, just learning, not using specific platform.

As for tickers - it seems that you can't have timers starting at EXCATLY the same time - because you attach them at different time points.

Also, if i decide to write my own drivers for something, doesn't the mbed makes it harder than a regular mcu ? and can i use the provider HAL for that purpose - or usually there would be conflicts ?

24 Dec 2014

In theory you can work around that Ticker issue if you really want, minus one problem: It is still a single core processor inside, so it can only handle one task at a time: Even if you would set them to start at exactly at the same time, it would do first one then the other one. But thats the case for every regular MCU.

Writing drivers isn't harder then for a regular MCU, only thing which might be relevant is that some resources (especially timers) are already in use by the mbed library for things like the ticker. And generally also provider HAL should not be an issue: The latest Freescale targets and all STM targets do the same internally: The mbed library is build on top of their manufacturer HAL code.

24 Dec 2014

Thank you!