Electronics > Microcontrollers

Why do most MCU code start by resetting peripherals?

<< < (5/6) > >>

Siwastaja:

--- Quote from: free_electron on October 17, 2021, 05:02:39 pm ---for many arm processors there is a hidden start block that gets compiled in 'front' of your code and runs before anything else. It fixes hardware issues

--- End quote ---

Never seen one. Any example?

free_electron:

--- Quote from: Siwastaja on October 17, 2021, 05:19:18 pm ---
--- Quote from: free_electron on October 17, 2021, 05:02:39 pm ---for many arm processors there is a hidden start block that gets compiled in 'front' of your code and runs before anything else. It fixes hardware issues

--- End quote ---

Never seen one. Any example?

--- End quote ---
in some of them it is added to the binary , in some it is part of the bootrom in  a sealed off block. During firmware load this can be updated with latest fixes.  Certain STM32 7xx series have it. Same for Arm-7 or Arm9. Raspberry pi has it too.  runs before anything else.
This is common these days.

Siwastaja:
I have worked extensively with STM32F7 and H7 series and definitely nothing like this is compiled or linked in. These come with errata notes and working around with broken peripherals is left to the user (obviously, their library code implements said workarounds, too).

The CPU of course can execute some code that resides in the factory rom section (similar to the factory bootloader which cannot be erased), this would be invisible to the user, so I don't know about that.

semir-t:
I also never saw this in the binary for the STM32 boards, and if something like this is part of the binary file it should be visible in the source code. I would like to read about this more if someone has docs to share.

ataradov:
I've only seen pre-boot patches on some obscure parts from Infineon. I don't think any common MCUs do anything like this.

MPUs might, I don't know. But also, what would MPUs patch? They don't have any internal code.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

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