News for hackers. Stuff that matters.
Re:Embedded Rust Experiments: Is My STM32 MCU Running Fast? by userbinator on Sunday January 27, 2019 @11:47PM (#19015380)
That diagram of the clocking system is a good example of how the bigger MCUs are like having a whole computer on a single chip, with all the implications of complexity that brings. It's not enough to set up a single clock; you also need to make sure the clocks to the peripherals that are in use are also what you need them to be.

(I wish such diagrams in datasheets would let you click on the appropriate blocks to jump directly to their registers and description sections.)

Re:Embedded Rust Experiments: Is My STM32 MCU Running Fast? by retSava on Monday January 28, 2019 @07:21AM (#19016907)
Yeah, even a small part such as the cc1310 from Texas Instruments (a sub-GHz wireless SOC for <10USD MOQ-1) is a triple-core device. One Cortex-M3 as the main core, a Cortex-something as the radio core, and a Sensor Controller (I'm guessing msp430-derived) as a low-power helper core. For the latter, you actually compile a binary blob that you push to it in firmware, and the format is not ARM.

Quite complex stuff.

Re:Embedded Rust Experiments: Is My STM32 MCU Running Fast? by henrikeh on Monday January 28, 2019 @12:43AM (#19015532)
Vendor tools for STM provide almost exactly what you wish for for the clock diagram.

Example: http://www.emcu.it/STM32clk/STM32clk.html

Re:Embedded Rust Experiments: Is My STM32 MCU Running Fast? by Rebelgecko on Monday January 28, 2019 @03:34AM (#19016000)
I haven't used the STM Cube configurator for a while, but last time I did it was almost at FPGA software levels of user-unfriendlieness. If you changed the indentation on a magic comment in your code and then adjusted one of the clocks, CUBE would clobber your existing code and silently delete it.
Re:Embedded Rust Experiments: Is My STM32 MCU Running Fast? by henrikeh on Monday January 28, 2019 @04:06AM (#19016113)
Yes, Cube autogenerates a lot of code and will overwrite things that don’t follow the inserted markers.

The original article even includes an example of using Cube to configure the clocks and then use those configurations together with Rust.

I agree that it isn’t ideal at all and kinda wonky. But more links in the datasheets would be nice.