SWRU577 July   2021 CC3100 , CC3200

 

  1.   Trademarks
  2. 1Introduction
  3. 2Embedded Programming Schemes
  4. 3Setup
  5. 4Bootloader Protocol
    1. 4.1 Overview
    2. 4.2 General Message Format
    3. 4.3 Commands
      1. 4.3.1 Get Status
      2. 4.3.2 Get Storage List
      3. 4.3.3 Raw Storage Write
      4. 4.3.4 Get Version Info
      5. 4.3.5 Raw Storage Erase
      6. 4.3.6 Get Storage Info
      7. 4.3.7 Execute From RAM
      8. 4.3.8 Switch UART to APPS MCU
      9. 4.3.9 FS Programming
    4. 4.4 Responses
      1. 4.4.1 Ack
      2. 4.4.2 Nack
      3. 4.4.3 Last Status
      4. 4.4.4 Storage List
      5. 4.4.5 Storage Info
      6. 4.4.6 Version Info
  6. 5Embedded Programming Procedure
    1. 5.1 Overview
    2. 5.2 High-Level Flow Diagram
    3. 5.3 Image Programming in Detail
      1. 5.3.1 Step 1: Target Connection
      2. 5.3.2 Step 2: Target Detection
      3. 5.3.3 Step 3: MUX UART to the Network Processor
      4. 5.3.4 Step 4: Get SRAM Storage Info
      5. 5.3.5 Step 9: Raw Storage Erase – SFLASH
      6. 5.3.6 Step 10: Raw Storage Write – SFLASH
      7. 5.3.7 Step 11: FS Programming
      8. 5.3.8 Step 12: Device Reset

Step 10: Raw Storage Write – SFLASH

Programming the SFLASH is done in chunks. The chunk size is 4096 bytes (4KB).

It is important to note that the image must be programmed in two phases. First, the image is programmed from offset 8 to the end. Then, program the first 8 bytes. This is mandatory since the first 8 bytes is a header that indicates to the bootloader that the image is valid. If the programming procedure is aborted for any reason such as an unexpected power failure the presence of a valid header will make the device unresponsive, as it will try to extract the corrupt image. As such, the 8 byte header must be programmed last.

  1. The main processor sends the Raw Storage Write command in 4KB chunks. The first chunk starts at offset 8.
  2. The CC3100 or CC3200 device responds with an Ack.
  3. The main processor sends the Get Status command.
  4. The CC3100 or CC3200 device responds with an Ack followed a 4-byte response. Only the 4th byte should be inspected; 0x40 means success whereas 0x4A indicates an error.
  5. The main processor sends an Ack response.
  6. Repeat Steps 1 to 5 as needed until the data is completely written.
  7. The first 8 bytes of data are written at offset 0 using steps 1-5 to complete the programming of the entire contents of the image.

Figure 5-8 shows the SFLASH programming procedure in a zoomed-out pane. As observed, the procedure is divided into three separate programming instances.

GUID-C96345AC-7189-4EF2-A08B-1F26866A81E2-low.png Figure 5-8 Raw Storage Write to SFLASH (Zoomed Out)