beautypg.com
DS4830 User’s Guide
7
22.2.1
– JTAG Bootloader Protocol ............................................................................................................................. 172
22.2.2
– I2C Bootloader Protocol ................................................................................................................................. 172
22.3
– Bootloader Commands ......................................................................................................................................... 173
22.3.1 - Command 00h
– No Operation ....................................................................................................................... 173
22.3.2 - Command 01h
– Exit Loader .......................................................................................................................... 173
22.3.3 - Command 02h
– Master Erase ....................................................................................................................... 173
22.3.4 - Command 03h
– Password Match ................................................................................................................. 174
22.3.5 - Command 04h
– Get Status ........................................................................................................................... 174
22.3.6 - Command 05h
– Get Supported Commands ................................................................................................. 175
22.3.7 - Command 06h
– Get Code Size ..................................................................................................................... 175
22.3.8 - Command 07h
– Get Data Size ...................................................................................................................... 175
22.3.9 - Command 08h
– Get Loader Version ............................................................................................................. 175
22.3.10 - Command 09h
– Get Utility ROM Version .................................................................................................... 175
22.3.11 - Command 10h
– Load Code ........................................................................................................................ 176
22.3.12 - Command 11h
– Load Data ......................................................................................................................... 176
22.3.13 - Command 20h
– Dump Code ....................................................................................................................... 176
22.3.14 - Command 21h
– Dump Data ........................................................................................................................ 177
22.3.15 - Command 30h
– CRC Code ......................................................................................................................... 177
22.3.16 - Command 31h
– CRC Data .......................................................................................................................... 177
22.3.17 - Command 40h
– Verify Code ....................................................................................................................... 177
22.3.18 - Command 41h
– Verify Data ........................................................................................................................ 177
22.3.19 - Command 50h
– Load and Verify Code ....................................................................................................... 178
22.3.20 - Command 51h
– Load and Verify Data ........................................................................................................ 178
22.3.21 - Command E0h
– Code Page Erase ............................................................................................................. 178
SECTION 23
– PROGRAMMING ....................................................................................................................................... 179
23.1
– Addressing Modes ................................................................................................................................................ 179
23.2
– Prefixing Operations ............................................................................................................................................. 179
23.3
– Reading and Writing Registers ............................................................................................................................. 179
23.3.1
– Loading an 8-bit register with an immediate value ........................................................................................ 180
23.3.2
– Loading a 16-bit register with a 16-bit immediate value ................................................................................ 180
23.3.3
– Moving values between registers of the same size ....................................................................................... 180
23.3.4
– Moving values between registers of different sizes ....................................................................................... 180
23.4
– Reading and Writing Register Bits ....................................................................................................................... 181
23.5
– Using the Arithmetic and Logic Unit ..................................................................................................................... 182
23.5.1
– Selecting the active accumulator ................................................................................................................... 182
23.5.2
– Enabling auto-increment and auto-decrement .............................................................................................. 182
23.5.3
– ALU operations using the active accumulator and a source ......................................................................... 184
23.5.4
– ALU operations using only the active accumulator........................................................................................ 184
23.5.5
– ALU bit operations using only the active accumulator ................................................................................... 184
23.5.6
– Example: Adding two four-byte numbers using auto-increment .................................................................... 184
23.6 - Processor Status Flag Operations ........................................................................................................................ 184
23.6.1 - Sign Flag ......................................................................................................................................................... 184