Skip to content

Super-Thomas/Nuvoton_ISP_Lite_for_Windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuvoton_ISP_Lite_for_Windows

Intro

This is the Simple version of NuMicro ISP Programming Tool. NuMicro ISP Programming Tool is very good but it is complicated because there have many functions. This program only supports UART connection and programming to APROM. And supports only one device. So this source code is simple. You can study Nuvoton ISP programming process with this program. Also, You can development advanced program include ISP function. This program works base on Windows platform. If you searching for NuMicro ISP App on the android platform, Please refer Using_Nuvoton_ISP_on_the_Android.

Development environment

N Name Description Note
1 Windows OS Windows 10 Pro 19045.3324
2 Visual Studio Visual Studio 2022 17.2.6 IDE

System Overview

image
As shown in the figure above, it is connected to the target board with Nuvoton MCU through UART by using USB to UART bridge on Windows PC.

How to ISP Firmware update

image
This program is same as Nuvoton's ISP Tool. If you want know details on how to use it, Please refer this documents.

ISP update process

Connect

image

Programming

image

Packet Description

Packet size is 64 Byte. There have 4 Byte of command list and 4 Byte of command index. You can ignore command index in the packet.
image

Please refer table below for command list.

Command Value(Hex/4 Byte) Description Note
CMD_UPDATE_APROM 0x000000A0 Update data to the internal flash of target board.
CMD_CONNECT 0x000000AE Try connect to target board.
CMD_GET_DEVICEID 0x000000B1 Request device ID to target board.

CMD_CONNECT

Try connect to target board. You must send this packet to target board every few millisecond during reset for target board. Target board must be received this packet when boot-up.
Host -> Target board
image

If target board received this packet from Host, Target board will send packet same as CMD_CONNECT packet to Host.
Target board -> Host
image

CMD_GET_DEVICEID

Request device ID to target board.
Host -> Target board
image

If target board received this packet from Host, Target board will send packet include device ID to Host. You can refer to device ID for each device here.
Target board -> Host
image

CMD_UPDATE_APROM

Update data to the internal flash of target board. There have two kind of packet. If you send CMD_UPDATE_APROM packet to target board for first time, You must send packet include Start address and Total length like as picture below.
Host -> Target board
image
Start Address: This is start address that where you need write buffer data.
Total Length: This is total length for buffer you needs write to flash.

You can send following packet after sent packet for first time.
Host -> Target board
image

If target board received this packet from Host, Target board will send packet include CRC for received packet to Host.
Target board -> Host
image

Software Description

image

Change the device ID to you want

For simple operation, a specific Device ID was used. I use M451RG6AE, so compare Device ID value for M451RG6AE and allow connection. If you want use another device id, Please looking for device id value you want in link below. https://github.com/OpenNuvoton/ISPTool/blob/master/NuvoISP/DataBase/PartNumID.cpp
And then change device id value in code below.

NuvoISPLiteDlg.h

// Device id
#define DEVICE_ID 0x00845120 // 0x00845120 is device id for M451RG6AE. Im used M451RG6AE so I will check only M451RG6AE.

Thanks to

https://github.com/OpenNuvoton/ISPTool
https://www.codeproject.com/Articles/992/Serial-library-for-C