On Mon, Jul 3, 2023 at 10:03 PM Petro Karashchenko wrote: > The de-init part is a bit tricky here. I think that u-boot enables clocking > for various parts of the SoC and mux pins used in bootloader, so if I > recall correctly the clocks are not shutted down and pins are not > de-muxed to reset value state when the OS is booted. The best would be if > the OS (NuttX) drivers do not assume if it is started by HW loader or SW > loader, but have drivers immune to that assumption and hard reset the > peripheral in driver init routine.
Exactly :-) Long time ago Reset was also Zero that set all peripherals (and memory?) to a known state that could be assumed. Modern MCU/CPU/SoC for energy saving have only Reset and that does not equal Zero so it is safest to assume "unknown state" and set the "zero state" on your own :-) On the other hand interesting things may leak out from memory because of that :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info