17
1 SWRA551 – May 2017 Submit Documentation Feedback Copyright © 2017, Texas Instruments Incorporated AWR1642 Bootloader Flow Application Report SWRA551 – May 2017 AWR1642 Bootloader Flow Naveen N. ABSTRACT This application report describes the AWR1642 bootloader flow. Contents 1 Introduction ................................................................................................................... 2 2 Basic Bootloader Flow ..................................................................................................... 5 3 Security Enhancements in Bootloader ................................................................................... 9 4 Programming Serial Data Flash Over UART (Bootloader Service) .................................................. 13 List of Figures 1 Simplified Representation of AWR1642 Interconnect................................................................... 2 2 Flashing Mode of Bootloader............................................................................................... 3 3 Execution Mode of Bootloader ............................................................................................. 4 4 Basic Bootloader Flow Chart ............................................................................................... 5 5 Image Load Sequence ...................................................................................................... 6 6 ROM-Assisted Image Download Sequence .............................................................................. 7 7 Bootmode – SPI ............................................................................................................. 8 8 Hardware Infrastructure Used for Boot Security ......................................................................... 9 9 Key Management .......................................................................................................... 10 10 SDF Image Layout ......................................................................................................... 11 11 Secure Boot Flow .......................................................................................................... 12 12 Host ←→ AWR Device UART Communication ....................................................................... 15 13 Flashing Sequence......................................................................................................... 16 List of Tables 1 SOP Lines and Boot Modes................................................................................................ 2 2 Supported Commands and Format ...................................................................................... 14 Trademarks ARM, Cortex are registered trademarks of ARM Limited. Macronix is a registered trademark of Macronix International Co., Ltd. Spansion is a registered trademark of Spansion LLC. All other trademarks are the property of their respective owners.

AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Embed Size (px)

Citation preview

Page 1: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

1SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

Application ReportSWRA551–May 2017

AWR1642 Bootloader Flow

NaveenN.

ABSTRACTThis application report describes the AWR1642 bootloader flow.

Contents1 Introduction ................................................................................................................... 22 Basic Bootloader Flow ..................................................................................................... 53 Security Enhancements in Bootloader ................................................................................... 94 Programming Serial Data Flash Over UART (Bootloader Service).................................................. 13

List of Figures

1 Simplified Representation of AWR1642 Interconnect................................................................... 22 Flashing Mode of Bootloader............................................................................................... 33 Execution Mode of Bootloader ............................................................................................. 44 Basic Bootloader Flow Chart ............................................................................................... 55 Image Load Sequence ...................................................................................................... 66 ROM-Assisted Image Download Sequence.............................................................................. 77 Bootmode – SPI ............................................................................................................. 88 Hardware Infrastructure Used for Boot Security ......................................................................... 99 Key Management .......................................................................................................... 1010 SDF Image Layout ......................................................................................................... 1111 Secure Boot Flow .......................................................................................................... 1212 Host ← → AWR Device UART Communication ....................................................................... 1513 Flashing Sequence......................................................................................................... 16

List of Tables

1 SOP Lines and Boot Modes................................................................................................ 22 Supported Commands and Format ...................................................................................... 14

TrademarksARM, Cortex are registered trademarks of ARM Limited.Macronix is a registered trademark of Macronix International Co., Ltd.Spansion is a registered trademark of Spansion LLC.All other trademarks are the property of their respective owners.

Page 2: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Introduction www.ti.com

2 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

1 IntroductionThe AWR1642 device can be broadly split into three subsystems (see Figure 1), as follows:• Master subsystem: ARM® Cortex®-R4F and associated peripherals, hosts the user application• DSP subsystem: TI C674x and associated peripherals, hosts the user application• Radar/Millimetre Wave Block: Programmed using predefined message transactions specified by TI

(reference driver provided by TI)

Figure 1. Simplified Representation of AWR1642 Interconnect

User application components (R4F and DSP) are expected to be stored in the serial data flash (SDF)interfaced to the AWR1642 device over the quad serial peripheral interface (QSPI) interface.

Master subsystem is the first programmable block to get activated after the AWR1642 device reset isdeasserted. The bootloader of the AWR1642 device is hosted in the read-only memory (ROM) of themaster subsystem, and takes control immediately.

From this point onward, the AWR1642 bootloader can operate in two modes: flashing and execution

The bootloader checks the state of the sense on power (SOP) I/Os – SOP lines driven externally forchoosing the specific mode (see Table 1).

Table 1. SOP Lines and Boot Modes

SOP2 (P13) SOP1 (P11) SOP0 (J13) Bootloader Mode and Operation

0 0 1Functional modeThe device bootloader loads the user application from the QSPI serial flash to theinternal RAM and switches the control to it.

1 0 1Flashing modeThe device bootloader spins in loop to allow flashing of the user application (or thedevice firmware patch – supplied by TI).

0 1 1Debug modeThe bootloader is bypassed and the R4F processor is halted. This lets the userconnect the emulator at a known point.

Page 3: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

www.ti.com Introduction

3SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

Flashing mode of the bootloader allows an external entity to load the customer application image to theSDF (see Figure 2).

Figure 2. Flashing Mode of Bootloader

Page 4: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Introduction www.ti.com

4 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

Execution (or functional) mode of the bootloader relocates the image stored in the SDF to the R4F andDSP memory subsystems. Toward the end of this process, the bootloader passes the R4F application ofthe control user. Unhalting (starting execution) of the DSP core is the responsibility of the user image (seeFigure 3).

Figure 3. Execution Mode of Bootloader

Key points• TI’s embedded bootloader can load one primary user image (could have content for both R4F and

DSP).• If the customer application requires handling of multiple images (factory programmed, back-up, and so

on), the customer must invest in a secondary bootloader.

Page 5: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

SOP mode

Download MultiCore image (BSS patch, MSS-DSS

application image) to SFLASH

Flash programCmd over UART

Device Managementover UART ± SOP5

Functional mode SOP4

Flash present

Load BSS patch image from SFLASH to program memory

(Secure Boot in case of HS devices)

Load MSS, DSS patch image from SFLASH to program memory

(Secure Boot in case of HS devices)

Command overSPI

Load BSS patch image over SPI to BSS program memory

Load MSS, DSS patch image over SPI to program memory

Eclipse the MSS ROM with RAM contents

MSS CPU reset

Begin execution from loaded MSS image

Wait Forever

Set up SPI.Generate a HostIRQ to indicate

bootup completion and await commands.

ROM Execution

RAM Execution

Device Initialization, APLL calibration

Generate MCU clock out (at XTAL/2)

Load BSS patch image over UART to program memory

Load MSS, DSS patch image over UART to program memory

(Secure Boot in case of HS devices)

Bootmode - UARTFlash Programming

Bootmode - SFLASH

Bootmode ± SPI

Boot over

UART Cmd

Yes

YesYes

The following sequence is on a per-command basis. The flow is captured here

No

No

No

www.ti.com Basic Bootloader Flow

5SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

2 Basic Bootloader FlowAt a high level, bootloader operation can be split into three phases (see Figure 4), as follows:• Device initialization: the bootloader uses built-in self test (BIST) engines for hardware diagnostics (for

example, RAM tests).• Setting up the root clock by starting the APLL. The root clock will be at 200 MHz.• Checking SOP lines to proceed with either the flashing or execution mode.

Figure 4. Basic Bootloader Flow Chart

Key points• In addition to the memories of the Radar subsystem, the bootloader loads to the following memories:

– MSS images – MSS TCMA and MSS TCMB (on AWR16xx ES1.0 samples, the load is restricted toMSS TCMA program memory)

– DSP images – L1, L2, and L3 memories (on AWR16xx ES1.0 samples, the load is restricted to L2and L3 memories)

Page 6: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Basic Bootloader Flow www.ti.com

6 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

2.1 Bootmode – SFLASH

2.1.1 Image Load SequenceIn functional mode, the bootloading of an image from the SDF is the first bootmode attempted by thebootloader (see Figure 5). This bootmode involves the following steps:1. Pinmux the QSPI pins of the AWR1642 device:

• [QSPI[0]: Ball R13• QSPI[1]: Ball N12• QSPI[2]: Ball R14• QSPI[3]: Ball P12• QSPI_CLK: Ball R12• QSPI_CS_N: Ball P11

2. QSPI is set up to operate at (system clock / 5) = (200/5) = 40 MHz.3. The SFLASH discoverable parameters (SFDP) command is issued to retrieve the JEDEC compliant

response, which includes information regarding the SFLASH capabilities and command set. When theSFDP response is received, the information is used to communicate with the SDF and further interpretthe contents and load the images.

Figure 5. Image Load Sequence

Key points• The ROM bootloader performs the read from the SDF, based on the highest capability mode (quad,

dual, or single) as published by the SDF in response to the SFDP command.• For SDF variants that support quad mode, the quad mode commands are issued; if the quad enable

(QE) bit is not set, the communication will fail. In such cases, the load flow assumes that the QE bit inthe SDF is already set.

• Fallback images: the bootloader supports loading of images from the following locations as a fallbackmechanism if one of the images is corrupted in the SDF. The locations of the images are:– META IMG1(SDF offset – 0x0)– META IMG2(SDF offset – 0x80000)– META IMG3(SDF offset – 0x100000)– META IMG4(SDF offset – 0x180000)

See the Image Creator user guide available in the mmWave SDK release for image format details.

Page 7: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

www.ti.com Basic Bootloader Flow

7SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

2.1.2 ROM-Assisted Image Download SequenceThe ROM-assisted image download sequence is entered by placing the device in flashing mode. SeeSection 4, for further details on the handshake with an external host to receive the image. Figure 6 showsthe communication with the SDF.

Figure 6. ROM-Assisted Image Download Sequence

Key points• The ROM-assisted download should work with all flash variants that allow for memory-mapped mode

and Page program command (0x2), with one dummy byte and 24-bit addressing.• Setting the QE bit varies from one SDF vendor to another. The ROM bootloader supports setting the

QE bit for Spansion® and Macronix® variants (certain specific part variants only) in this flow.• In addition to a checksum-based integrity check for every packet received over the UART, a CRC32-

based integrity check is performed over the complete image. The CRC32 is computed incrementally asthe packets are received and written to the SDF.

2.2 Bootmode – SPIIn functional mode, if and only if the detection of the SDF fails (concluded by an invalid response to theSFDP command over the QSPI lines), the bootloader enters the SPI-based bootloading mode. This modeinvolves the following steps:1. Pinmux the SPI pins of the AWR1642 device:

• SPI_MOSI: Ball D13• SPI_MISO: Ball E14• SPI_CLK: Ball E13• SPI_CS_N: Ball C13• SPI_HOST_INTR: Ball P13

2. Follow the Communication Protocol as defined in the Radar Interface Control document, tocommunicate with an external host to receive the images to be loaded as message packets over theSPI.

3. Once the loading of all images is complete, the ROM is eclipsed and execution control is transferred tothe loaded application in MSS TCMA.

Page 8: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Device External host

AR_AE_DEV_MSSPOWERUPDONE_SB

MSS ROMBootup completion

AR_DEV_FILE_DOWNLOAD_SB(REM_CHUNKS (N-1), FILE_TYPE,

FILE_LENGTH and MetaImage (1/N))

AR_ACK_MSG

AR_DEV_FILE_DOWNLOAD_SB(REM_CHUNKS (N-2),MetaImage (2/N))

AR_ACK_MSG

AR_DEV_FILE_DOWNLOAD_SB(REM_CHUNKS (0),MetaImage (N/N))

AR_ACK_MSG

AR_AE_MSS_BOOTERRORSTATUS_SB(Indication of bootup status)

Bootloading over SPI

Image download over SPI

In case of no errors,Eclipse of ROM and

handoff to application

Application Execution

Basic Bootloader Flow www.ti.com

8 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

Figure 7 shows the handshake with the external host.

Figure 7. Bootmode – SPI

Page 9: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

www.ti.com Security Enhancements in Bootloader

9SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

3 Security Enhancements in BootloaderThe AWR1642 device is also available with security enhancements (referred to as high security or HSdevice). One of the key features of the HS device is secure boot. At a high level, this feature attends tothe two following capabilities:• Take over protection: support for asymmetric-key-based authentication. The bootloader has the

capability of authenticating an image signed with a customer key.• IP Protection: symmetric-key-based encryption and decryption support. The customer image is not kept

as plain text in the SDF.

3.1 Hardware InfrastructureThe key hardware enabler in the HS device (see Figure 8) is the capability of the device to do thefollowing:• Allow burning of customer keys• Provide hardware accelerators for cryptographic operations (AES, public key accelerator, and more)

Figure 8. Hardware Infrastructure Used for Boot Security

Page 10: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Security Enhancements in Bootloader www.ti.com

10 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

3.2 Secure BootBefore exploring the secure boot flow, two important concepts must be introduced, as follows.

3.2.1 Key ManagementFigure 9 shows the key management concept.1. HS devices are shipped with preburnt TI keys.2. TI provides an embedded tool (signed with a TI key) to customers to burn their keys.3. When the keys are burned, customers can create their image (see Section 3.2.2) using an image

creation tool (provided as a reference by TI).4. During this process, the customer image would be signed (and encrypted if required).5. Using the flashing tool from TI (provided as reference), this image would be burnt on the SDF using

flashing mode of the bootloader (transfer is over UART).

Figure 9. Key Management

Page 11: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Certificate

META Header

Image

Customer Image 1

SFLASH Contents

Image

Asymmetric-key-based authentication and symmetric key-based

confidentiality

Memory region in SFLASH managed by BootROM (for Secure Boot)

EncryptedImage encryption info in certificate extension field

TI Image (Patch)+

Customer Image

Image

Asymmetric-key-based authentication

Contains:x� Number of filesx� Certificate header, certificate offsetx� Image offsetx� CRC of the meta header

Certificate file

Signature

Extension Fields

Public Key

Certificate file

Signature

Extension Fields

Public Key

TI Image (Patch)

Customer Image

www.ti.com Security Enhancements in Bootloader

11SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

3.2.2 Secure ImageFigure 10 shows the reference layout of the secure image as stored in the SDF.

Figure 10. SDF Image Layout

Part of the SDF that is managed by the ROM bootloader is determined by the image header. The primaryimage would consist of customer application components (R4F and DSP), and possibly with a TI-providedROM patch for the Radar Block along with a certificate. The rest of the SDF could be managed by thecustomer application.

Page 12: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

AUTHENTICATION (CERTIFICATE SOURCE VERIFICATION)Public Key Hash verification

AUTHENTICATION (CERTIFICATE VERIFICATION)Certificate signature verification algorithm

SOFTWARE ANTI-ROLLBACK CHECK(Ensures dated software does not run on newer devices)

TEST PORT ENABLEMENT CHECK(Enters the mode when hash of MSS image is empty)

IMAGE CONFIDENTIALITY(Decrypt the image, if required, using the key specified in the

certificate)

AUTHENTICATION - IMAGE INTEGRITY(Ensure the hash of the image matches with the one in certificate)

Enable test ports(Image unencrypted or

encrypted using absolute keys)

Secure boot done

HS Device Bootup

Secure boot failed

Fail

Fail

Fail

Fail

Pass

Pass

Pass

Pass

Not enabled

Security Enhancements in Bootloader www.ti.com

12 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

3.2.3 Secure Boot FlowFigure 11 shows the secure boot flow at a high level.

Figure 11. Secure Boot Flow

Page 13: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

www.ti.com Security Enhancements in Bootloader

13SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

3.3 Note on Field Returns and Debugging With the HS Device• AWR1642 HS devices are shipped with all debug interfaces (namely JTAG and Trace) disabled.• The hardware has the capability to provide options to the authenticated user application to enable

JTAG. This is the responsibility of the customer.• If such a device, or rather a printed-circuit board with an HS device, is received by TI for debugging,

the standard flow is to deploy a test mode (selected by SOP lines), where before opening the debuginterfaces, SDF and RAM instances are completely erased (to protect the customer IP).

4 Programming Serial Data Flash Over UART (Bootloader Service)The AWR1642 device from TI can be configured to operate as an autonomous radar sensor. In thisconfiguration, the user application and TI firmware patches are hosted in an SDF interfaced to theAWR1642 over the QSPI port.

SDF programming supports downloading meta images that are a combination of four components, asfollows:• User application image for R4F (master subsystem)• User application image for C674 (DSP subsystem)• TI Radar Block patches• Certificates in DER format; these apply to HS devices

The flash programmer connects to the device over UART. Specifics are as follows:• MSS_UARTA of the AWR1642 device:

– RX: Ball N4– TX: Ball N5

• Baud rate: 115200• Packet size: 256 bytes

4.1 Binary File FormatThe target binary file is composed of the following sections:• Header• Certificate• R4F application• DSP application• TI Radar Block patch

The mmWave SDK package for the AWR1642 device from TI includes the Image Creator utility, whichconstruct the complete image with the previously listed components.

4.2 Flash Programming Sequence1. Boot the device in SOP 5 mode (see Table 1).2. Open the UniFlash tool (as listed in the mmWave SDK for AWR1642).3. Connect to the device over the UARTA com port (the device expects a UART break signal – this is

generated by the UniFlash tool).4. Flash the desired images <META_IMAGE1/ META_IMAGE2/ META_IMAGE3/ META_IMAGE4>

Page 14: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Programming Serial Data Flash Over UART (Bootloader Service) www.ti.com

14 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

4.3 Supported Commands and FormatTable 2 lists the supported commands and format.

Table 2. Supported Commands and Format

Command CommandID

Description Fields

PING 0x20 The device responds with ACK

OPEN FILE 0x21 Command that gives details about the type offile being downloaded

File size: total file size being downloaded.File type: META IMG1(4), META IMG2(5),META IMG3(6), and META IMG4(7)

WRITE FILE toSFLASH 0x24 Command that gives the content of the file to

write to SFLASH

WRITE FILE to RAM 0x26 Command that gives the content of the fileand the file is directly written to RAM

CLOSE FILE 0x22 Command that indicates the end-of-filedownload

File type: META IMG1(4), META IMG2(5),META IMG3(6), and META IMG4(7)

GET STATUS 0x23Command that requests the status of theprevious command. The device responds withthe status of the previous command issued.

ERASE DEVICE 0x28 Command to erase the contents of theSFALSH

GET VERSION 0x2FCommand that requests the version of theROM. Device responds with the versioninformation.

ACK response 0xCC Response from the device

Page 15: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

SYNC(0xAA) LENGTH

CHECKSUM

PAYLOAD

2 bytes(length -2) bytes

Max size: (256 ± 2) bytes

0xAA 0x13CHECKSUM

0x21 FILE SIZE FILE TYPE RESERVED

2 bytes 4 bytes 4 bytes 8 bytes

0xAA LENGTHCHECKSUM

0x24

2 bytes

PAYLOAD

(length -2) bytesMax size: (256 ± 2) bytes

0xAA 0x7CHECKSUM

0x22

2 bytes

FILE TYPE

4 bytes

0xAA 0x3 0x20 0x20

2 bytes

0xAA 0x3 0x28 0x28

2 bytes

0xAA 0x3 0x23 0x23

0xAA 0x3 0x2F 0x2F

GENERIC COMMAND STRUCTURE

OPENCOMMAND

WRITE TO FLASHCOMMAND

CLOSECOMMAND

PINGCOMMAND

ERASECOMMAND

GET STATUSCOMMAND

GET VERSIONCOMMAND

LENGTHCHECKSUM

PAYLOAD

2 bytes(length -2) bytes

Max size: (256 ± 2) bytes

0x4 0xCC 0x00CC

2 bytes 2 bytes

0x3CHECKSUM

STATUS

2 bytes

0xE 0xCC

2 bytes

ROM VERSION INFORMATION

RESERVED

4 bytes 8 bytes

GENERIC RESPONSE STRUCTURE

ACK RESPONSE

STATUS RESPONSE

VERSION RESPONSE

HOST COMMANDS TO Device

Device RESPONSE TO HOST

0xAA LENGTHCHECKSUM

0x26

2 bytes

PAYLOAD

(length -2) bytesMax size: (256 ± 2) bytes

WRITE TO RAMCOMMAND

1 byte 1 byte

1 byte 1 byte 1 byte

1 byte 1 byte 1 byte

1 byte1 byte1 byte

1 byte 1 byte 1 byte

1 byte1 byte1 byte

1 byte 1 byte 1 byte

2 bytes 1 byte 1 byte1 byte

2 bytes 1 byte 1 byte1 byte

1 byte

1 byte

1 byte 1 byte

1 byte

www.ti.com Programming Serial Data Flash Over UART (Bootloader Service)

15SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

Figure 12 the supported commands that can be issued to the AWR device during the flash programmingprocess and the various responses from the AWR device.

Figure 12. Host ← → AWR Device UART Communication

Page 16: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

Device External host

UART Break

BootupWait for UART Break

WRITE Command (MetaImage (1/N))

ACK_MSG

WRITE Command (MetaImage (2/N))

ACK_MSG

WRITE Command (MetaImage (N/N))

ACK_MSG

Writing to SFLASH,Compute CRC per

packet

Image download over UART

ACK_MSG

OPEN Command

ACK_MSG

CLOSE Command

ACK_MSG/NACK_MSG

Ensure the CRC matches

Programming Serial Data Flash Over UART (Bootloader Service) www.ti.com

16 SWRA551–May 2017Submit Documentation Feedback

Copyright © 2017, Texas Instruments Incorporated

AWR1642 Bootloader Flow

4.4 Flashing SequenceFigure 13 shows the flash programming sequence. The initial handshake starts with a UART break issuedby the external host. This break is followed by the command sequence in Figure 13.

Figure 13. Flashing Sequence

Bootmode – UART: The bootloading over the UART also follows the same sequence as previouslymentioned (WRITE command – 0x26). The META IMAGE received over the UART is interpreted andloaded to the appropriate memories. Once the bootloading is complete, the ROM is eclipsed andexecution control is passed to the application residing in MSS TCMA. The META IMAGE should not havethe CRC32 appended (unlike the image to be flashed).

Page 17: AWR1642 Bootloader Flow - TI.com · AWR1642 Bootloader Flow 1 Introduction The AWR1642 device can be broadly split into three subsystems ... • For SDF variants that support quad

IMPORTANT NOTICE FOR TI DESIGN INFORMATION AND RESOURCES

Texas Instruments Incorporated (‘TI”) technical, application or other design advice, services or information, including, but not limited to,reference designs and materials relating to evaluation modules, (collectively, “TI Resources”) are intended to assist designers who aredeveloping applications that incorporate TI products; by downloading, accessing or using any particular TI Resource in any way, you(individually or, if you are acting on behalf of a company, your company) agree to use it solely for this purpose and subject to the terms ofthis Notice.TI’s provision of TI Resources does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TIproducts, and no additional obligations or liabilities arise from TI providing such TI Resources. TI reserves the right to make corrections,enhancements, improvements and other changes to its TI Resources.You understand and agree that you remain responsible for using your independent analysis, evaluation and judgment in designing yourapplications and that you have full and exclusive responsibility to assure the safety of your applications and compliance of your applications(and of all TI products used in or for your applications) with all applicable regulations, laws and other applicable requirements. Yourepresent that, with respect to your applications, you have all the necessary expertise to create and implement safeguards that (1)anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen the likelihood of failures thatmight cause harm and take appropriate actions. You agree that prior to using or distributing any applications that include TI products, youwill thoroughly test such applications and the functionality of such TI products as used in such applications. TI has not conducted anytesting other than that specifically described in the published documentation for a particular TI Resource.You are authorized to use, copy and modify any individual TI Resource only in connection with the development of applications that includethe TI product(s) identified in such TI Resource. NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TOANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY OR INTELLECTUAL PROPERTYRIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, orother intellectual property right relating to any combination, machine, or process in which TI products or services are used. Informationregarding or referencing third-party products or services does not constitute a license to use such products or services, or a warranty orendorsement thereof. Use of TI Resources may require a license from a third party under the patents or other intellectual property of thethird party, or a license from TI under the patents or other intellectual property of TI.TI RESOURCES ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMS ALL OTHER WARRANTIES ORREPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING TI RESOURCES OR USE THEREOF, INCLUDING BUT NOT LIMITED TOACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILURE WARRANTY AND ANY IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUALPROPERTY RIGHTS.TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY CLAIM, INCLUDING BUT NOTLIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS EVEN IFDESCRIBED IN TI RESOURCES OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL,COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITH ORARISING OUT OF TI RESOURCES OR USE THEREOF, AND REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THEPOSSIBILITY OF SUCH DAMAGES.You agree to fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of your non-compliance with the terms and provisions of this Notice.This Notice applies to TI Resources. Additional terms apply to the use and purchase of certain types of materials, TI products and services.These include; without limitation, TI’s standard terms for semiconductor products http://www.ti.com/sc/docs/stdterms.htm), evaluationmodules, and samples (http://www.ti.com/sc/docs/sampterms.htm).

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2017, Texas Instruments Incorporated