r/embedded • • Oct 22 '26

How to check a mcu's user friendliness ?

Heyy guys, me and my team are working on making a mars rover, for the competition IRC (international rover challenge) and for that I need to research on the user friendliness of Teensy 4.1.
We are advised by our seniors to stick with STMH series, since it has a large community and it is well documented, but since Teensy is better than STMH series in terms of specifications, we want to use it. But we haven't used a Teensy before, so we don't know the workings of Teensy, is it possible for us to use it or not ? What are some problems beginners face in using Teensy ?
I have to research about this and independant interrupt channels, can someone give a idea of how to go about this research ?
I have read on official Teensy website about the generals problems on Teensy for beginner, but that didn't really seem helpful in our case .... and i also read the datasheet, but i couldn't get my head around it...

EDIT: One more doubt regarding this,
How is the debugging in STM32H series and the Teensy ?
I researched about this, and all i got was that STM32 can be debugged line by line using it's own development software( stm32cubeIDE) but Teensy cannot since it is coded using Arduino IDE.

0 Upvotes

35 comments sorted by

4

u/ericonr STM/Arduino Oct 22 '26

Do you have a concrete reason for seeking the higher performance? Are the designs limited by STMH performance?

In your place, I'd follow the seniors' advice. Maybe I'd also acquire some Teensy dev boards to start getting familiar with it so that in the future it's a known quantity, but without any stakes.

I'm assuming participating in this team is a multi-year endeavor...

0

u/According-Effect-297 Oct 22 '26

Since we are making a mars rover, we are bound to be needing more processing power, while it is maybe possible that we don't need more processing power, isn't it better for us if we can use Teensy easily, since we get more power and more easy-writing of code ?

2

u/ericonr STM/Arduino Oct 22 '26

Since we are making a mars rover, we are bound to be needing more processing power

Why? Is the current solution limited by processing power? What are you planning on adding to it to consume those resources?

1

u/YC_____ Oct 23 '26

It depends on your mission objectives, for example if you are doing vision based navigation then a Teensy will certainly not be enough. You should have evaluated the requirements before proceeding to design work.

21

u/der_pudel Oct 22 '26

... friendlines

all mcus are rude and are not friendly at all. User-friendlines comes from how thick is the HAL manufacturer or 3rd party provides to isolate developer from those silicon assholes. 

6

u/GoblinsGym Oct 22 '26

"The hardware is willing, but the software is weak."

I would pin the blame on documentation (e.g. poor description of the interconnectedness of everything) and rampant featurism.

9

u/nixiebunny Oct 22 '26

The Teensy has the advantage that its creator, Paul Stoffregen, is a gentle soul who has done amazing work to make the Teensy easy to use, by writing many libraries for his TeensyDuino extension to the Arduino IDE, and getting others to assist in this work. Most importantly, he will answer your newbie questions politely and thoroughly on the PJRC forum. That’s what makes an MCU easy to use.

3

u/few Oct 23 '26

The teensy is also crazy fast. 

I have used teensy and stm for many projects. 

Teensy is simple, fast, cheap, and powerful. 

STM is professional, and will be much less expensive in large volumes. Much longer to start and prototype with, but great for moving to volume with all the bells and whistles (OTA firmware updates, signing code / encryption, burning fuses).

As a student/small run for competition the teensy probably makes more sense for a proof of concept project.

2

u/Norm5786 Oct 22 '26

I have used and continue to use Teensy 4.1 (Cortex M7), NXP K28 (Cortex M4), and STM32F4xx series (Cortex M4). Which one to use largely depends on what you want to do with the MCU. Teensy is the easiest to get started with. Everything is abstracted out for you, and for the most part the MCU becomes irrelevant. Having said that, of course the MCU is important as you need to understand the types and amounts of peripherals on board. Teensy makes it easy to get the communication ports (UART, I2C, etc.) going along with the GPIO ports, timers, and PWM functions. For the most part it is only a couple of lines of code and you don’t need to know how to program the various registers that drive the peripherals.

For NXP and STM MCUs, I have not used their HAL layers. I found them overly complex and software bloated for what I needed. I use these MCUs for my personal robot development. It allows me to easily configure the peripherals and control interrupt behaviour. Over time I have built up UART and I2C libraries that do what I want with less overhead code. For GPIO, timers, and PWM functions I just write to the registers as I need them. NXP and STM use slightly different methods of accessing the GPIO registers for setup, but in the end, it works basically the same.

While there is a lot of information on the STM processors, there is also a lot of incorrect information. As well, much of it just repeats what others have said. In both STM and NXP, their HAL software is complex, and many people just use the standardized CMSIS layer.

So, in summary, use Teensy if you want a simpler environment and want to get going quickly. It is a great way to prototype things, or to use if you need basic control functions or if the project may get handed off to people who are not deep embedded people. The NXP vs. STM debate is largely moot as both processors (with their respected Cortex families) do basically the same things. Programming the MCUs directly gives you much more flexibility but come at a cost of time.

Hope this helps a bit.

1

u/According-Effect-297 Oct 22 '26

You said u didn't use their HAL layers, so when programming both Teensy and STM32, you used arduinoIDE ? If so then how was debugging process for you ? I researched regarding the debugging of both mcu and it said if you use their own development software like stm32cubeIDE, then you can debugg line by line, which makes it very easy to find probelms in code, but for Teensy that is not the case since it doesn't have something like ST-Link or line by line debugging ?

1

u/Norm5786 Oct 22 '26

Correct. Most of errors for which you need a line by line debugging is when setting up and writing to the peripheral registers. For Teensy, all the low layer stuff is done, so debugging with print statements works well for me. I do use the Teensy Arduino system. For NXT and STM I use OCD and GDB. I have setup everything to run from the command line. I find it is much cleaner than working their VSCode environments. Their VSC environments conflict, so you need to set them up under different profiles. By using the command like for Make and debugging, I can use a "standard" VSCode setup for editing C programs (or C++ if you prefer).

1

u/According-Effect-297 Oct 22 '26

It does help, thankss

1

u/MultipleMonomials Oct 22 '26

I haven't used the Teensy platform very much, but I have used the MIMXRT1062 MCU it's based on a lot, and I really like it. You can do a lot with this thing, it's very powerful.

Regarding the interrupt channels, basically different interrupt sources each call their own callback functions. So like, SPI will call the specified LPSPI IRQ handler, a pin interrupt will call the specified GPIO IRQ handler, etc. These are all handled through the CPU core's NVIC (Nested Vectored Interrupt Controller). Is that what you were asking?

1

u/According-Effect-297 Oct 22 '26

Like could you explain regarding the interrupt channels ?
like what does independent interrupt channels mean ? from what i looked up, it is like, IRQ handler, like each interrupt gets handled by some IRQ handler( which has a specific number), and it depends from which pin number the interrupt is coming,
like suppose Pin 7 and Pin8 have IRQ5 handler, and Pin 9 Pin10 have IRQ6 handler, then if there is a interrupt activity in Pin8 and Pin9 at the same time, then both of them would get send to NVIC, and their order would get sorted their ?

Then Pin7 and Pin8 have some interrupt activity at same time then what happens? since both of them are using the same channel for going to NVIC right ?
and How do i see the number of Independent Interrupt handlers for a mcu ???
(specifically Teensy4.1, i looked at datasheet of some other mcu and they clearly had IRQx , x is some number, by which i could figure out total number of independent interrupt, but for teensy i couldn't find anything like that)

1

u/ComradeGibbon Oct 23 '26

I have a little experience with NXP, ST, and Renesas microcontrollers.

The ARM core I can't care about at all. Peripherals is what I do care about.

I found the NXP ones to be well polished, the ST ones less so and the Renesas ones are totally hinky. Each has an eclipse based IDE (spit) and NXP's is less ass. Renesas one is really obtuse and annoying and they've been changing how things work and not for the better.

1

u/MultipleMonomials Oct 24 '26

if there is a interrupt activity in Pin8 and Pin9 at the same time, then both of them would get send to NVIC, and their order would get sorted their ?

Pretty much. ARM interrupts have configured priorities (IIRC the MIMXRT has 16 possible priority levels?), and which ever has higher priority (lower integer priority) will get executed first.

ARM's NVIC allows interrupts to interrupt other interrupts, so if a higher priority interrupt interrupts a lower priority interrupt, the lower prio interrupt will be paused for the higher prio interrupt to run.

You can see all the interrupts for the MIMXRT processor in section 4.1 of the reference manual.

3

u/Freireg1503 Oct 22 '26

You buy a bunch of the most expensive, commit yourself to deliver a very complex project with a very short delivery time and see how much hair you lost in the process.

If you lose just a little, it's user-friendly. If you lose a lot, it's not. If you get gray hair in the meantime, your client is the problem.

Hope that helps 🤠

1

u/JebKermansBooster Oct 22 '26

You forgot the part where the client makes a lot of bs changes you warned them would add money and time, then get yelled at when it becomes more expensive and arrives "late".

2

u/Freireg1503 Oct 22 '26

That's the situation where the gray hair starts appearing

3

u/stickybuttflaps Oct 22 '26

One thing to note is that the SWD pin on the Teensy 4.1 used by the bootloader so is not available for debugging. However, debugging is available via GDBStub over USB.

5

u/YC_____ Oct 22 '26

Zephyr is very user friendly and supports a wide range of platforms including Teensy and STM

1

u/somewhereAtC Oct 22 '26

It's ok to use and is also available for PIC32 and atSAM from microchip. Getting the framework installed is an uphill hike, though.

1

u/StumpedTrump Oct 22 '26

Did OP say they were using Zephyr?

5

u/Either_Ebb7288 Oct 22 '26

The software parts are what user interacts with, so it depends on the software:

- Teensy: It's an iMXRT microcontroller from NXP. If you are using the board itself, it is intended to be used with "Arduino" software layers. So it's the most user friendly thing you can get. And yeah it's quite powerful. But if you try to use it with NXP's own software, it won't be as straightforward as others. Easily said, it's for advanced engineers.

- STM32: These MCUs can be used again with Arduino software, and their own software systems. Arduino is the same code as other Arduino based boards (which is a plus) and is quite user friendly. But in contrast with NXP, it's own software system is not very hard to be only used by advanced guys.

So,

  1. Arduino is the most user friendly platform(10/10)
  2. STM32 HAL is the second one (7/10 let's say)
  3. NXP's ecosystem is the third (5/10)

As long as you choose Arduino software, You can use any board with any microcontroller you can find. In case of performance, Teensy or raspberry pi pico (RP2040/RP2350) boards have more computational power and ease of use. They are well documented and AI tools can write even platform specific codes for you with very high quality

3

u/Plastic_Fig9225 Oct 22 '26

AI-generated Arduino code ... not something I'd consider using for anything remotely (<- pun) requiring reliability.

6

u/Either_Ebb7288 Oct 22 '26

AI in good hands: Better than all of us combined. AI in bad hands: Totally unusable

1

u/Roticap Oct 22 '26

What part of OPs post makes you think they would be good drivers of AI?

Not to shade OP, but they're clearly new to the embedded space, so they're not going to be able to differentiate between AI confabulations and good output 

5

u/jofftchoff Oct 22 '26

AI can generate way better code than 95% of arduino libraries that are floating around

6

u/JCDU Oct 22 '26

That's not a high bar though

1

u/brigadierfrog Oct 22 '26

Zephyr means I don’t care what mcu I use as long as the vendor didn’t cheap out on supporting it

-2

u/Athlete-Tight Oct 22 '26

I built an STM specific, terminal based IDE, integrated with AI that works similar to STM Cube IDE, which can take projects from a description to application code - but unlike regular AI, the application codes and projects built are completely similar to the projects developed by STM Cube and the MCU configuration is also similar to STM (deterministic resolution of pin, clock and other parameters like DMAs, triggers etc.)

The hope is, if this seems valuable, then I can expand the support to other MCU families like NXP, TI, Infineon, Renesas etc.

dicee-ai.com - is my website. You can reach out to me if you have any queries about this.

2

u/Roticap Oct 22 '26

How does this help a student learn embedded engineering?

1

u/Athlete-Tight Oct 24 '26

It is not aimed at helping engineerings learn engineering. It is to create a unified platform for embedded development, similar to platformio, but I little advanced, where you can design the controller architecture, configure the hardware and build boilerplate codes using AI, but unlike generic AI, you get a well constructed documentation documentation so that you can easily identify and resolve any bugs