herunterladen

Maxim > Design Support > Technical Documents > Application Notes > Optoelectronics > APP 5602
Keywords: I2C bootloader, I2C slave, in-system programming
APPLICATION NOTE 5602
In-System Programming Using I
2
C Bootloader Commands
By: Sanjay Jaroli
Jun 14, 2013
Abstract:
This application
note describes I²C bootloader commands supported by optical microcontrollers. The bootloader commands are executed
from functions in the utility ROM (UROM). The application note specifies the I²C master and I²C slave command response protocol, which
interacts with the I²C slave to execute the bootloader commands. It also describes various methods of in-system programming (ISP) using the I²C
slave bootloader commands.
Introduction
The DS4830 has a program segment known as utility ROM (UROM), which provides various system utility functions. This allows in-system
programming (ISP) using the I²C slave interface. The DS4830 reset vector is located in the utility ROM at address 8000h. Following each power-
on reset (POR), the DS4830 automatically starts execution from the utility ROM, which allows the ROM code to perform any necessary system
support functions.
The utility ROM provides the following utility functions.
Reset vector
Bootstrap function for system initialization
In-circuit debug
ISP using JTAG or I²C slave interface
In-System Programming Using the I²C Bootloader
The DS4830 has a special bit, I2C_SPE, which does not change on I²C soft reset or external reset. This bit is used to identify the I²C bootloader
function. The I2C_SPE bit is not writable in the application program; this bit can be written through UROM code only. The DS4830 has the
dedicated slave address 34h, which is always visible on the active I²C slave interface and cannot be disabled without disabling the I²C slave
interface. Slave address 34h is used to communicate directly with the UROM code. When the slave address 34h receives the Enter I²C
Bootloader command, it sets the I2C_SPE bit. On reset, the UROM code checks the I2C_SPE bit. If I2C_SPE is clear, code execution jumps to
the flash location 0000h in the application program. Otherwise, execution remains in UROM to execute utility functions. For more information, see
the In-System Programming section in the user guide 5484, “DS4830 Optical Microcontroller User’s Guide.”
Page 1 of 9