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 11: FS Programming

The next step is the actual programming of the image to the SFLASH. Programming is applied in chunks of 4096 bytes. The image can be either unencrypted or encrypted with a 16-byte symmetric key.

  • If the image is unencrypted, the key size is irrelevant and uses a length of 0.
  • If the image is encrypted, the key size must be 16 bytes. The key buffer precedes the data chunk.

In both cases, flags are for future use and must be 0. The procedure for programming the SFLASH follows:

  1. The main processor sends the FS Programming command in chunks of 4096 bytes. The user must provide the following elements in order:
    1. Key size (in bytes for an encrypted image) must be 16, otherwise 0.
    2. Chunk size (in bytes) must be 4096, except for the last chunk, which may be smaller according to the residue from the total size.
    3. Flags must be 0.
    4. Key buffer
    5. Data buffer
  2. The CC3100 or CC3200 device responds with an Ack followed by a 4-byte response indicating the accumulated number of bytes received. The status for the last chunk must be 0 to indicate successful programming, otherwise, a negative status is returned.
  3. Steps 1 and 2 repeat until the entire image is programmed.
  4. The image gets extracted and the file system is created.

Figure 5-9 shows the programming procedure in a zoomed-out pane. The last status code is 0 to indicate a successful programming and is delayed in time to reflect the period of image extraction.

GUID-24C166F6-4F47-441A-AFA7-8A1DDD5F5C7B-low.png Figure 5-9 FS Programming (Zoomed Out)

Figure 5-10 shows the programming procedure in a zoomed-in pane for an unencrypted image.

GUID-F95ADF91-E1A9-435B-94AF-B64B8AC94EE3-low.png Figure 5-10 FS Programming of Unencrypted Image (Zoom In)

Figure 5-11 shows the programming procedure in a zoomed-in pane for an encrypted image.

GUID-3F293F26-C555-4527-9D6E-7AC79C4C71F7-low.png Figure 5-11 FS Programming of Encrypted Image (Zoomed In)