| Photo by Jeffery Cheng
MCU ICP and ISP
2023/06/02
Agenda
 In circuit programming (ICP)
 In system programming (ISP)
2
In-circuit programming of MCU
 Working principle
。 Using Nulink programmer to
program APROM through
proprietary protocol
。 Needs a Nu-Link programmer
。 Nu-link writes data to
APROM via SWD interface
。 Using ICP-tool on PC to
control the NU-link
programmer
3
In-system programming
4
 Working principle
。 No extra programmer needed
。 Write interface from host to target
MCU can be I2C, UART, SPI, CAN,
RS485, USB.
。 Host can be any processor, not
necessarily to be a PC
。 Host communicates with the
bootloader residing in LPROM via
selected interface and writes data to
APROM flash.
。 A bootloader is needed in LDROM
。 Host program can be implemented
on selected processor based on
source codes provided by Nuvoton.
ISP demo (1)
 Need to program bootloader into LDROM first
。 Find bootloader sample code, build it, and flash it into LDROM
 M0A21_Series_BSP_CMSIS_V3.01.000SampleCodeISPISP_UARTKEILISP_UART.
uvproj
。 In Keil, Flash -> Configure flash tools -> Utilities -> Settings-> Chip
settings -> Chip booting selection -> LDROM
。 Load bootloader into LDROM.
5
ISP demo (2)
 Prepare a firmware, which is a .bin file that will be updated to APROM
 Choose another project and build the code to get .bin which will be
needed in next step.
6
ISP demo (3)
 Download and open ISP tool to
flash firmware (.bin) into
APROM
 https://www.nuvoton.com/too
l-and-software/software-
tool/programmer-tool/
7
ISP demo (4)
 Update firmware to APROM via UART, not SWD.
8
ISP demo (5)
 Test new firmware by resetting the board.
 It’s the CAN TX sample code.
9
Nuvoton ICP and ISP programming user guide

Nuvoton ICP and ISP programming user guide

  • 1.
    | Photo byJeffery Cheng MCU ICP and ISP 2023/06/02
  • 2.
    Agenda  In circuitprogramming (ICP)  In system programming (ISP) 2
  • 3.
    In-circuit programming ofMCU  Working principle 。 Using Nulink programmer to program APROM through proprietary protocol 。 Needs a Nu-Link programmer 。 Nu-link writes data to APROM via SWD interface 。 Using ICP-tool on PC to control the NU-link programmer 3
  • 4.
    In-system programming 4  Workingprinciple 。 No extra programmer needed 。 Write interface from host to target MCU can be I2C, UART, SPI, CAN, RS485, USB. 。 Host can be any processor, not necessarily to be a PC 。 Host communicates with the bootloader residing in LPROM via selected interface and writes data to APROM flash. 。 A bootloader is needed in LDROM 。 Host program can be implemented on selected processor based on source codes provided by Nuvoton.
  • 5.
    ISP demo (1) Need to program bootloader into LDROM first 。 Find bootloader sample code, build it, and flash it into LDROM  M0A21_Series_BSP_CMSIS_V3.01.000SampleCodeISPISP_UARTKEILISP_UART. uvproj 。 In Keil, Flash -> Configure flash tools -> Utilities -> Settings-> Chip settings -> Chip booting selection -> LDROM 。 Load bootloader into LDROM. 5
  • 6.
    ISP demo (2) Prepare a firmware, which is a .bin file that will be updated to APROM  Choose another project and build the code to get .bin which will be needed in next step. 6
  • 7.
    ISP demo (3) Download and open ISP tool to flash firmware (.bin) into APROM  https://www.nuvoton.com/too l-and-software/software- tool/programmer-tool/ 7
  • 8.
    ISP demo (4) Update firmware to APROM via UART, not SWD. 8
  • 9.
    ISP demo (5) Test new firmware by resetting the board.  It’s the CAN TX sample code. 9