Electronics > Microcontrollers

Time required to learn a new M4F micro bare metal

(1/3) > >>

snarkysparky:
Well my product uses ATSAMD51.    And it is unobtanium at this time.

Looks like i will have to switch.   I wrote my own bare metal setups for PORT, SPI, IIC, TIMERS, A/D, UART, NVMCTRL,  bootloader,  Clock config...    Spent about 6 months getting this sorted.

I assume STM32 will not be available either.

How long should it take to start with a new manufacturers M4F and get all this setup bare metal.   Considering quality of documentation.

My concern is that many smaller players have poor documentation and it will take much longer to get up to speed.

Any thoughts ??

Thanks

Siwastaja:
For example, for me, it took a week of work to get going with Nordic Semiconductor Cortex M4 devices. Was totally unfamiliar with them.

This includes two-three days reading documentation, looking at the "simple" examples supposed to print "Hello World", but failing to do that because 5000-line-of-code logging library used to print that "hello world" requires so much understanding and configuration, including a massive file used to configure the color in which Hello World is supposed to be printed.

Finally after a few wasted days, ditching the "SDK" completely, just copypasting my usual STM32 linker scripts and startup code, modifying my existing GPIO helpers, etc., the thing was up and running in no time. Documentation quality is OK, examples are not. Peripheral design is exceptionally simple. Got UART and SPI working in matter of minutes. Even the RADIO peripheral was very simple to use on register level, and well documented.

In my opinion, writing bare metal with the available reference manuals / datasheets is always the easiest part. Most of the difference comes from the tools, libraries, SDKs, examples, etc. If you rely on them, their quality is of utmost importance. IMHO, the only sustainable choice is not to rely on those, at all.

SiliconWizard:

--- Quote from: snarkysparky on December 02, 2021, 01:11:20 pm ---How long should it take to start with a new manufacturers M4F and get all this setup bare metal.   Considering quality of documentation.
My concern is that many smaller players have poor documentation and it will take much longer to get up to speed.

--- End quote ---

It's impossible to answer that. You said it took you 6 months to do it on another chip, some people say it'll take 1 week.
Quality of documentation plays a role, certainly, but your personal experience and skills will make a lot more difference.
Beyond that, so will your expectations. If you are going to write your own whole abstraction library covering all peripherals and functionalities of the MCU, it will take a long time. And it's IMHO not the right approach. If you go bare metal, just write "drivers" for the features you *need* instead of writing the whole shebang before doing anything useful. You'll get there in much less time than 6 months, guaranteed.

Now if you're going to write a complete HAL of your own just to avoid using the vendor's one, that's the wrong approach if you go bare metal.
Always isolate the low-level functions properly in your projects, and porting them to a new device should not take too much time. Avoid excessive dependencies, and excessive abstraction as well. Just my 2 cents.

snarkysparky:
Yes it's quality of documentation.  I have become leery of Japanese semiconductor datasheets for any complex part.  It seems a lot is lost in translation.

I cursed the SAMD documentation many days for being so terse and leaving out many things in the section that you had to discover through net queries.

But I do like to go bare metal for the peripherals I mentioned.   I find the fewer hands in the pie the better.  And if I understand the hardware at register level I should be able to take care of  myself.

Who has the best -  complete - usable documentation for M4F processors that are actually available.

I will look into Nordic.   I need high pin count.   Was using the 128 version of SAMD.   

tmadness:
While it's very much against the grain here on this forum, why don't you try out a framework? Zephyr has a pretty comprehensive list of supported MCUs, there libopencm3 if you dont want an RTOS, Arduino (support and quality, are wildly varying YMMV), mbed is an option if you are not doing anything too resource hungry (timing, non standard peripheral combinations) . The cost of using a framework has never been cheaper. Most of the frameworks are have open code bases (most are also copy-left so watch for that) so you are free to expand upon them.
Bare metal has its place, but it is expensive many many ways.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version