Thanks for your attention!
Chip model: MPC5604CCL6, 100PIN, LQFP
Recently practiced using the nxp official website bootloader upgrade routine, modified from "Bolero_Bootloader_Ver2", used the serial port to upgrade, but encountered a problem:
The bootloader program can be run, and the upgraded app program can also run, but the information sent from the serial port after the app program starts is garbled, for example: main() in the app; the statement in the function is printf("system ready\r\n" ), is garbled, and if the data is sent from the PC serial port assistant to the MCU, and the MCU returns to the PC, it can be displayed normally; for example, “cmd00” is sent to the MCU through the serial port, and the serial assistant receives “cmd00”. Can be displayed normally.
The app program is stored at 0x0000A000 ~ 0x0007E000, and the area of B0F1~B0F6 has been erased before the program is programmed.
Thanks & regards.
flash erase range:
CFLASH.LMS.R = 0x0003003E; // B0F1~B0F6
linker file memory range:
resetvector: org = 0x00000000, len = 0x00000008
APP_ENTRY: org = 0x00008000, len = 0x00000020
init: org = 0x00008020, len = 0x00000FE0
exception_handlers: org = 0x00009000, len = 0x00001000
internal_flash: org = 0x0000A000, len = 0x0007E000
internal_ram: org = 0x40000000, len = 0x00006000
heap : org = 0x40006000, len = 0x00001000
stack : org = 0x40007000, len = 0x00001000