Abov A31G32x User manual

Contents A31G32x USB Bootloader quick guide
2
Contents
1Introduction ....................................................................................................................................5
2User requirements..........................................................................................................................6
2.1 Hardware.............................................................................................................................6
2.1.1 Starter Kit................................................................................................................6
2.1.2 Shield Board ...........................................................................................................6
2.2 Software ..............................................................................................................................7
2.3 Reference documents .........................................................................................................7
2.4 System requirements ..........................................................................................................8
2.5 ABOV website .....................................................................................................................8
3User Bootloader environment & concept .......................................................................................9
4Memory map ................................................................................................................................10
5USB User Bootloader protocol .....................................................................................................11
5.1 Outgoing packet definition.................................................................................................11
5.2Data packet structure ........................................................................................................11
5.3 Host command list.............................................................................................................12
5.3.1 ERS_SN (Erase Sector Number) .........................................................................12
5.3.2 ERS_MC (Erase Macro).......................................................................................12
5.3.3 SET_DB (Set Data Block) ....................................................................................12
5.3.4 PGM_DB (Program Data Block)...........................................................................13
5.3.5 GET_CS (Get CheckSum) ...................................................................................13
6Bootloader programming procedure ............................................................................................14
7User Bootloader project ...............................................................................................................15
7.1 Bootloader project .............................................................................................................15
7.2 Bootloader project – hex to array ......................................................................................17
7.3 Application project .............................................................................................................19
8Example of User Bootloader for USB ..........................................................................................22
8.1 Building and running project..............................................................................................22
8.2 Prepare the Starter Kit ......................................................................................................23
8.2.1 Hardware components of the Starter Kit ..............................................................23
8.3 Set up the Starter Kit .........................................................................................................24
8.3.1 Set jumpers to control the Starter Kit ...................................................................24
8.4 Connect the Starter Kit to your PC....................................................................................25
8.4.1 PC connection via USB on the Starter Kit ............................................................25
8.5 Compile & firmware update as User Bootloader project ...................................................26
8.5.1 Run the Bootloader project...................................................................................26
8.5.2 Compiling the Bootloader & application project ...................................................27
8.5.3 Download the Bootloader .....................................................................................28
8.5.4 Update firmware as USB User Bootloader ...........................................................29
8.5.5 Check the updated application operation .............................................................31
Revision history .....................................................................................................................................32

A31G32x USB Bootloader quick guide List of figures
3
List of figures
Figure 1. A31G32x Starter Kit Board (Hardware) ...................................................................................6
Figure 2. A31G32x Shield Board (Hardware) .........................................................................................6
Figure 3. Compiler (Software) .................................................................................................................7
Figure 4. Reference Documents .............................................................................................................7
Figure 5. Window PC & Mini-B Cable .....................................................................................................8
Figure 6. ABOV Semiconductor Website ................................................................................................8
Figure 7. User Bootloader Environment and Concept ............................................................................9
Figure 8. A31G32x Flash Memory Map ................................................................................................10
Figure 9. Bootloader Programming Procedure .....................................................................................14
Figure 10. startup_(DeviceName)_bootkeil.s........................................................................................15
Figure 11. main.c...................................................................................................................................15
Figure 12. Example of A31G32x Keil Option for Target ........................................................................16
Figure 13. Bootloader Project – Step1..................................................................................................17
Figure 14. Bootloader Project – Step2..................................................................................................17
Figure 15. Bootloader Project – Step3..................................................................................................18
Figure 16. Bootloader Project – Step4..................................................................................................18
Figure 17. Add bootcode.c in Application Project – A31G32x...............................................................19
Figure 18. Example of Setting Options for Target in Application Project – A31G32x ...........................20
Figure 19. Example of bootcode.c File Option in Application Project – A31G32x ................................21
Figure 20. Starter Kit B/D ......................................................................................................................23
Figure 21. Starter Kit Jumper & Switch .................................................................................................24
Figure 22. Starter Kit and USB Connection ..........................................................................................25
Figure 23. USB Input Device at Device Manager .................................................................................25
Figure 24. Open “User_bootloader_for_USB” Project ..........................................................................26
Figure 25. Compile Result on uVision5 (User Bootloader for USB Project) .........................................27
Figure 26. Check to User Bootloader for USB Project Setting .............................................................28
Figure 27. Download User Bootloader for USB Project on A-Link........................................................28
Figure 28. Starter Kit B/D ......................................................................................................................29
Figure 29. Run QuickWriter (PC tool) for USB......................................................................................30
Figure 30. Check the Updated Application Operation...........................................................................31

List of tables A31G32x USB Bootloader quick guide
4
List of tables
Table 1. Command Packet Description.................................................................................................11
Table 2. Data Packet Description ..........................................................................................................11
Table 3. Operation Command Packet Description ................................................................................12

A31G32x USB Bootloader quick guide 1. Introduction
5
1Introduction
This document introduces a method to use USB User Bootloader, and offers an easy way to develop
the ABOV 32-bit Cortex-M0x MCUs. By reading through this document, you will learn how to operate
A31G32x USB User Bootloader with examples, step by step.
1. Starter Kit board has a CMSIS-DAP debugger called “A-Link”, which eliminates the need for
additional devices for MCU programming and debugging.
2. User Bootloader can update user application code of MCU flash through USB communication
between PC and MCU.
3. User Bootloader consists of bootloader project, application project and PC download S/W.

2. User requirements A31G32x USB Bootloader quick guide
6
2User requirements
2.1 Hardware
2.1.1 Starter Kit
Figure 1. A31G32x Starter Kit Board (Hardware)
2.1.2 Shield Board
Figure 2. A31G32x Shield Board (Hardware)

A31G32x USB Bootloader quick guide 2. User requirements
7
2.2 Software
1. Keil complier (uVision5)
2. Keil MDK5 software pack (including Starter Kit sample code) or EVK software
Figure 3. Compiler (Software)
2.3 Reference documents
1. Starter Kit Quick Guide
2. Starter Kit HW Manual
3. Starter Kit Schematic
4. Product User’s Manual
5. Example Code
Figure 4. Reference Documents

2. User requirements A31G32x USB Bootloader quick guide
8
2.4 System requirements
1. Windows PC (7, 8, 10)
2. USB mini-B type cable
Figure 5. Window PC & Mini-B Cable
2.5 ABOV website
For detailed information about corresponding software and documents, you can visit our website at
https://www.abovsemi.com.
Figure 6. ABOV Semiconductor Website

A31G32x USB Bootloader quick guide 3. User Bootloader environment & concept
9
3User Bootloader environment & concept
Figure 7. User Bootloader Environment and Concept
①Bootloader Project makes Boot code file in Keil environment.
②The application project has user code and boot code generated from the boot project.
③Program the hex file created in the application project to MCU.
④If a new application hex file is created, it can be downloaded through USB
⑤Perform download software on your computer.
⑥Connect the PC and the board where the application hex file is initially programmed. Download
to USB using the download software. And check the action.

4. Memory map A31G32x USB Bootloader quick guide
10
4Memory map
Flash Memory area Division
1. BOOT ZONE
①Boot code storage area to rewrite APPLICATION ZONE
②Re-write Impossible
③BOOT ZONE size : 4KB
2. APPLICATION ZONE
①User code area
②Re-write possible through Boot code
Figure 8. A31G32x Flash Memory Map
Table of contents
Other Abov Computer Hardware manuals
Popular Computer Hardware manuals by other brands

EMC2
EMC2 VNX Series Hardware Information Guide

Panasonic
Panasonic DV0PM20105 Operation manual

Mitsubishi Electric
Mitsubishi Electric Q81BD-J61BT11 user manual

Gigabyte
Gigabyte B660M DS3H AX DDR4 user manual

Raidon
Raidon iT2300 Quick installation guide

National Instruments
National Instruments PXI-8186 user manual




















