User's Manual

Page 26 of 28 A85xxE24A91 – Users Manual
Release Date: Dec 1
st
2010
Check SWR Proceed only if SWR matches required value (Reset device and Restart
programming again)
// For each flash page
for (int n = 0; n < 31; n++) {
// Write page data to the start of the available RAM area
SET_ADDR(0x6000, sw);
WRITE(0x400, data to be programmed into flash page n , sw);
/* While using the image generated by TI- Purepath Wireless Configurator, note that
the entire image file generated by PWC-TI is Intel_hex format. For programming 8520
module use only the data and discard additional data/information */
// Program the page
BL_FLASH_PROG_PAGE(RAM_ADDR = 0x6000, FLASH_ADDR = 0x8000+(n*0x400))
Check SWR Proceed only if SWR matches required value wait till the block is completely
transfered
}
// Verify the flash contents
BL_FLASH_VERIFY(BYTE_COUNT = value read from the HEX file );
/* The flash verify byte count data is 4 byte value stored from location &h 8010
within the image file */
Check SWR Proceed only if SWR matches required value (Reset device and Restart
programming again)
SYS_RESET()
// Done, perform SYS_RESET() to start the application
If the status word read fails immediately after execution of BOOT_RESET or BL_UNLOCK_SPI
then it is most likely due to the special SPI requirement during these instructions as MISO must
go low and then high after the SPI clock sequence as shown in the figure below.
If the SPI bus controller is unable to perform this wait, then use the SPI pins as GPIO’s and
manually program the bit sequences as described below for the BOOT_RESET().
Procedure for programming Boot_Reset()
1. Assert CSn Low and then clock the SCL with each negative edge of clock asset the logic
level to high or low on MOSI pin.
2. After sending &H B0 00 on MOSI pin. Wait till MISO pin goes high. Note: Status
check/update is done between MISO and CSn pin going high. If this time is not
sufficient. This will lead to error in SWR read value.
3. One BOOT_RESET is successful then switch to normal SPI operation mode.