11 years, 10 months ago.

Cortex-M0 or Cortex-M3?

Hello!

I've worked before with Cortex-M3 on a STM32 Primer during college. Now I'm trying to develop a system and I can't decide what would be the best MCU for it...

The tasks I would need for it to perform are: -Operate a TFT LCD screen -Read and write to an SD card (KBytes of info) -Control a PWM output -Read 3 sensors (some digital and some analogic) -Controll a dimmable light (triacs, zero-cross detection...) -Actuate on relays and transistor switches -Send info to a webpage via ethernet board -PID controller (needs to do some divisions, multiplications and sums...)

All this tasks are to be preformed inside a infinte loop, but there is no need to have them working in Real Time.

Do you think that a Cortex-M0 would be good for this or do I need a more powerful microprocessor?

Also, if I start with a M0, how hard will it be to take the same code and make it work on an Cortex-M3?

Thanks!

1 Answer

11 years, 10 months ago.

Your first list of demands can be done by any microcontroller with the correct peripherals. If you just need to send simple packets to a webpage that shouldn't be an issue regardless, if the webpage must be hosted on the microcontroller you need to have plenty of resources, and generally the M3s will have that.

Now the real difference comes at the PID controller, an M3 is alot better for that. If it is actually needed depends on your requirements, such as speed of the loop. What I am missing only is why you wouldn't want an M3. Only thing I can think of is price? Because since you want ethernet connection (an advantage of the LPC1768 is the integrated one) I wouldn't think power consumption matters for your application.

Finally starting with M0 and going to M3 requires the following: Open compiler, click in the right-top, select your new board/microcontroller. That's it :). Okay I am lying, there is some more work since most likely your pinout is different. But most mbed code runs on all supported devices.

3 seconds is a good refresh rate for the PID (temperature control, it's a very slow response system).

I gave a little more though on the Internet thing and I think I'll have an indepentent board to put data online.

The reason I want the M0 is indeed the price, because this can potentially become a product to sell and every cents count.

I guess my biggest issue here is controlling the TFT LCD...

Maybe I'll start with M0 and switch to M3 in case there is something I'm unnable to do.

Thanks for the reply :)

posted by José Santos 26 Nov 2013

In principle I wouldn't expect too many issues with the TFT LCD, it depends more on the clock speed of the peripherals if you use SPI on how fast you can write it, and if you use parallel bus you need enough pins in a row.

posted by Erik - 26 Nov 2013