10 ms·
It's required whenever your clock cycle time is near your timing requirements. Not so much a problem with multi GHz microcontrollers, but still needed for cheap
by nomel 2y ago
It's required whenever your clock cycle time is near your timing requirements. Not so much a problem with multi GHz microcontrollers, but still needed for cheap ones.
Manually add up all cycles for each instruction in each branch, then pad the shorter with noop to make them the same. Repeat for each code path, and cry when you need to make a change.
- JohnFen 2y agoYep, it's a practice I still engage in with several of my microcontroller-based projects.
- gibibit 2y agoI know it's probably an intentional exaggeration... but are there really any microcontrollers over 1 GHz core clock? Fast I know of is ST at around 600 MHz.
- nomel 2y agoARM Cortex based ones exceed 1GHz [1]. Although, maybe the definition of microcontroller is a bit fuzzy these days. [1] https://www.mouser.com/c/semiconductors/integrated-circuits-ics/embedded-processors-controllers/microcontrollers-mcu/?maximum%20clock%20frequency=1%20GHz~~2.4%20GHz&rp=semiconductors%2Fintegrated-circuits-ics%2Fembedded-processors-controllers%2Fmicrocontrollers-mcu%7C~Maximum%20Clock%20Frequency https://www.mouser.com/c/semiconductors/integrated-circuits-...
- gibibit 2y agoARM Cortex-A is an application processor, not a microcontroller. With an MMU (can run a full OS like Linux) and without internal memory. Cortex-M is a microcontroller, without MMU (can't run Linux etc.), and typically has internal RAM and flash. Only the NXP i.MXRT1170 reaches 1 GHz CPU clock, and this is not multi-GHz as the prior comment declared.