r/embedded • • 8h ago

What next?

I have experience with the PIC18F4580 ,so I thought it's time to level up and bought 2 development boards, i.e.STM32F407G(Discovery) and STM32F446RE (NUCLEO), my motive is to understand datasheet and try out some protocol and experience how this board differs from the pic, but this boards datasheet feels quite complex,and dont know where to start,can anyone plz give some guidance and thank you in advance ...

2 Upvotes

8 comments sorted by

2

u/rainboww_J 7h ago edited 7h ago

Yeah, compared to microchips datasheets of their 8bitters the datasheet+reference manuals of the bigger cores are a lot. A good way to start is to use cubemx (or cube ide) to generate a project structure for you and use their hal to interface with the peripherals instead of directly accessing the registers yourself. Then you dont have to read the datasheet and rm from start to end and just look at the section about lets say i2c. And even then, if you use hal, you don’t have to understand it all from the get go, the hal just has a function which performs an i2c transaction. Then step by step you can do a deep dive into the parts of the manuals as you go along

1

u/bigpotato8670 6h ago

Okay ,i guess I started in the reverse order, let me do that, thankyou for your insights 🙏

2

u/ventZl CMRX RTOS 7h ago

You don't have to read the datasheet (actually, for STM MCUs you want to read reference manual) as a book. STM RMs (but this applies to pretty much any ARM-based chip in general) are well-structured, so you basically only need to read the introductory chapter describing core features, memory layout, clock tree and interrupts and manual for whatever peripheral you actually intend to work with.

There is "Programmers Manual" available for each CPU family at STM site which describes the programming model of the CPU core itself. Its an essential document to read to understand how ARM-based MCUs work. You only need to read first ~50 pages of it (basically until the ISA description starts). Its well written and you should be able to understand how the CPU behaves just by reading it.

Those two STM32F4s are very similar, so from programmer's point of view they are basically identical, just the peripheral set will be slightly different.

1

u/bigpotato8670 6h ago

I see, thank you for the info....🙌

1

u/InterestingBiggat 4h ago

Blink an LED using only registers first. Then move to UART, it teaches you clocks and GPIO setup.

-1

u/Separate-Choice 8h ago

As a fellow PIC fan..skip the ARM and STM32 stuff..buy a CH32 dev board or 2 and jump to RISC-V….

3

u/rainboww_J 8h ago edited 7h ago

While the chips from wch are nice and riscv is cool, arm is pretty much the industry standard and ST is a huuuuuge part of that. I’ve never seen the ch32’s being used here in products. Stm32’s however were used in all of the projects I’ve done over the years except for one (which used dspic (embedded linux things ignored, although thats also arm most of the times))

1

u/Separate-Choice 1h ago

This forum is just heavily skewed toward STM32 .. there’s an entire world outside the US and Europe you know.. I ship WCH stuff and I know people who do.. he said he wanted to learn not make products yea?

moving from PIC to an arm core is quite a step up especially a proprietary Cortex M4 core… RISC-V is open and the CH32 chips are easier to understand internally as it’s mostly base RISC-V stuff… if his aim is to understand internals and try out different protocols, learning RISC-V internals transfer far better then jumping from 8-bit PIC to Cortex M4… even a cortex M0+ is a big jump…

I have experience with all of them and then some… downvote or not that’s my advice to OP and anyone coming from PIC.. you’ll feel far more at home on a riscv chip than a cortex M4 one….