Hi,everyone:
I am a new hand for S12 serial MCU,there are a lot of meterials i need to read.
But right now,i really want to know the startup sequence of S12(such as MC9S12).
Cause i'm reading the source code of the officail bootloader project,and do some research In the memory map,but i do not know how the mcu goto the _BootStart,and who init the code,data,bss segment(_BootStart just run into main without init segments).
please,best wishes.
I get the data init code from official app project,but i still do not know how mcu run into _BootStart.
Hello,
Do you mean AN4258 Serial Bootloader for S12(X)?
https://www.nxp.com/files-static/microcontrollers/doc/app_note/AN4258.pdf
The code is in Bootloader project in StartS12X.s file.
The _BootStart includes the code of jumping to application.
"After reset, the bootloader enables the pull-up resistor on pin PP0 and reads the status of pin PP0 to find out if you want to execute the bootloader or the user application."
I hope it helps.
Best Regards,
Diana
Hi Diana:
Actually i want to know the process of the cold boot of MCU.
For example,When arm core mcu power on,it get 4 bytes of address 0 for sp,and 4 bytes of address 4 for ip,then start to execute.
https://www.nxp.com/docs/en/reference-manual/S12CPUV2.pdf
see reset vectors, exception processing etc