TI CC3100: programming serial FLASH with a simple FTDI adapter

Teodor Costachioiu
Feb 22, 2017 · 12 min read
Image for post
Image for post

Note: Now ESP8266 supports SSL too.

Image for post
Image for post
Simple FTDI programming of the CC3100 WiFi adapter
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

CC3100 WiFi adapter: testing the communication

Image for post
Image for post
CCS UniFlash: Selecting CC3100 chip
[10:47:51] Begin GetVersion operation.
[10:47:51] INFO: > Executing Operation: Connect
[10:47:53] INFO: setting break signal
[10:47:54] INFO: detecting FTDI for device reset
[10:47:54] ERROR: No device USB ports were found
[10:47:54] INFO: --- please restart the device ---
Image for post
Image for post
CC3100 — push the button when the red error line appears in the console
[10:47:56] INFO: connection succeeded
[10:47:56] INFO: getting storage list
[10:47:56] INFO: > Executing Operation: GetVersion
[10:47:56] INFO: reading version info
[10:47:56] INFO: > Bootloader version: 2.0.4.0
[10:47:56] INFO: > Executing Operation: Disconnect
[10:47:56] Operation GetVersion returned.
[10:49:55] Begin ListFileSystem operation.
[10:49:56] INFO: > Executing Operation: Connect
[10:49:58] INFO: setting break signal
[10:49:59] INFO: detecting FTDI for device reset
[10:49:59] ERROR: No device USB ports were found
[10:49:59] INFO: --- please restart the device ---
[10:50:00] INFO: connection succeeded
[10:50:00] INFO: getting storage list
[10:50:00] INFO: > Executing Operation: Init
[10:50:00] INFO: reading version info
[10:50:00] INFO: DEVICE CC3100 ES1.33
[10:50:00] INFO: reading version info
[10:50:02] INFO: > Executing Operation: ListFileSystem
[10:50:02] INFO: extracting file system information...
[10:50:02] INFO: Serial Flash block size: 4096 bytes
[10:50:02] INFO: Serial Flash capacity: 256 blocks

[10:50:02] INFO: file start size fail total size filename
[10:50:02] INFO: index block [BLKs] safe [BLKs]
[10:50:02] INFO: ----------------------------------------------------------------------------
[10:50:02] INFO: N/A 0 5 N/A 5 FATFS
[10:50:02] INFO: 4 5 33 yes 66 /sys/servicepack.ucf
[10:50:02] INFO: 6 71 5 yes 10 /tmp/phy.cal
[10:50:02] INFO: 7 81 1 yes 2 /sys/stacfg.ini
[10:50:02] INFO: 8 83 2 yes 4 /sys/pref.net
[10:50:02] INFO: 9 87 1 yes 2 /sys/ipcfg.ini
[10:50:02] INFO: 10 89 1 yes 2 /sys/mode.cfg
[10:50:02] INFO: 11 91 1 yes 2 /sys/pmcfg.ini
[10:50:02] INFO: 12 93 1 yes 2 /sys/mdns.cfg
[10:50:02] INFO: 13 95 1 yes 2 /sys/ap.cfg
[10:50:02] INFO: 14 97 1 yes 2 /sys/devname.cfg
[10:50:02] INFO:


[10:50:02] INFO: Flash usage
[10:50:02] INFO: -------------------------
[10:50:02] INFO: used space: 99 blocks
[10:50:02] INFO: free space: 157 blocks
[10:50:02] INFO: memory hole: [99-255]
[10:50:02] INFO: > Executing Operation: Disconnect
[10:50:02] Operation ListFileSystem returned.

CC3100 — firmware upgrade

Image for post
Image for post
[10:53:10] Begin Format operation.
[10:53:11] INFO: > Executing Operation: Connect
[10:53:13] INFO: setting break signal
[10:53:14] INFO: detecting FTDI for device reset
[10:53:14] ERROR: No device USB ports were found
[10:53:14] INFO: --- please restart the device ---
[10:53:27] ERROR: ---reading ACK signal failed---
[10:53:27] WARNING: ---seting break signal to false failed---
[10:53:29] INFO: setting break signal
[10:53:30] INFO: detecting FTDI for device reset
[10:53:30] ERROR: No device USB ports were found
[10:53:30] INFO: --- please restart the device ---
[10:53:31] INFO: connection succeeded
[10:53:31] INFO: getting storage list
[10:53:31] INFO: > Executing Operation: Init
[10:53:31] INFO: reading version info
[10:53:31] INFO: DEVICE CC3100 ES1.33
[10:53:31] INFO: reading version info
[10:53:33] INFO: > Executing Operation: Format
[10:53:33] INFO: Erase storage SFLASH
[10:53:34] INFO: erase storage succeeded
[10:53:34] INFO: erase storage completed
[10:53:34] INFO: > Executing Operation: Disconnect
[10:53:34] Operation Format returned.
[10:54:42] Begin ServicePackProgramming operation.
[10:54:42] INFO: > Executing Operation: Connect
[10:54:44] INFO: setting break signal
[10:54:45] INFO: detecting FTDI for device reset
[10:54:45] ERROR: No device USB ports were found
[10:54:45] INFO: --- please restart the device ---
[10:54:49] INFO: connection succeeded
[10:54:49] INFO: getting storage list
[10:54:49] INFO: > Executing Operation: ServicePackProgramming
[10:54:49] INFO: Path to the service pack file: C:/ti/CC3100_CC3200_ServicePack_1.0.1.6-2.7.0.0/servicepack_1.0.1.6-2.7.0.0.bin
[10:54:49] INFO: reading version info
[10:54:49] INFO: CC3100R Device detected.
[10:54:49] INFO: NWP/MAC/PHY Version from Service Pack:
[10:54:49] INFO: NWP Patch version: 2.5.99.8
[10:54:49] INFO: MAC Patch version: 1.4.0.1
[10:54:49] INFO: PHY Patch version: 1.0.3.34
[10:54:49] INFO: reading version info
[10:54:49] INFO: DEVICE CC3100 ES1.33
[10:54:49] INFO: reading version info
[10:54:51] INFO: Downloading file "/sys/servicepack.ucf" with size 28236
[10:54:54] INFO:

New Token is 0x6B1B696F
[10:54:54] INFO: Download complete
[10:54:54] INFO: > Executing Operation: Disconnect
[10:54:54] Operation ServicePackProgramming returned.
[10:57:48] Begin ListFileSystem operation.
[10:57:48] INFO: > Executing Operation: Connect
[10:57:50] INFO: setting break signal
[10:57:51] INFO: detecting FTDI for device reset
[10:57:51] ERROR: No device USB ports were found
[10:57:51] INFO: --- please restart the device ---
[10:57:53] INFO: connection succeeded
[10:57:53] INFO: getting storage list
[10:57:53] INFO: > Executing Operation: Init
[10:57:53] INFO: reading version info
[10:57:53] INFO: DEVICE CC3100 ES1.33
[10:57:53] INFO: reading version info
[10:57:55] INFO: > Executing Operation: ListFileSystem
[10:57:55] INFO: extracting file system information...
[10:57:55] INFO: Serial Flash block size: 4096 bytes
[10:57:55] INFO: Serial Flash capacity: 256 blocks

[10:57:55] INFO: file start size fail total size filename
[10:57:55] INFO: index block [BLKs] safe [BLKs]
[10:57:55] INFO: ----------------------------------------------------------------------------
[10:57:55] INFO: N/A 0 5 N/A 5 FATFS
[10:57:55] INFO: 4 5 5 yes 10 /tmp/phy.cal
[10:57:55] INFO: 6 15 33 yes 66 /sys/servicepack.ucf
[10:57:55] INFO:


[10:57:55] INFO: Flash usage
[10:57:55] INFO: -------------------------
[10:57:55] INFO: used space: 81 blocks
[10:57:55] INFO: free space: 175 blocks
[10:57:55] INFO: memory hole: [81-255]
[10:57:55] INFO: > Executing Operation: Disconnect
[10:57:55] Operation ListFileSystem returned.

Reconfiguring the CC3100 click

Image for post
Image for post
CC3100 changing configurations
[11:02:26] Begin Program operation.
[11:02:27] INFO: > Executing Operation: Connect
[11:02:29] INFO: setting break signal
[11:02:30] INFO: detecting FTDI for device reset
[11:02:30] ERROR: No device USB ports were found
[11:02:30] INFO: --- please restart the device ---
[11:02:32] INFO: connection succeeded
[11:02:32] INFO: getting storage list
[11:02:32] INFO: > Executing Operation: Init
[11:02:32] INFO: reading version info
[11:02:32] INFO: DEVICE CC3100 ES1.33
[11:02:32] INFO: reading version info
[11:02:34] INFO: > Executing Operation: Program
[11:02:34] INFO: > File name: /sys/mcuimg.bin, Update: false, Erase: false
[11:02:34] INFO: > File name: /cert/ca.pem, Update: false, Erase: false
[11:02:34] INFO: > File name: /cert/client.pem, Update: false, Erase: false
[11:02:34] INFO: > File name: /cert/private.key, Update: false, Erase: false
[11:02:34] INFO: > File name: /sys/macadd.bin, Update: false, Erase: true
[11:02:34] INFO: > Erase File: /sys/macadd.bin
[11:02:34] INFO: erasing file "/sys/macadd.bin"
[11:02:34] INFO: deleting file "/sys/macadd.bin"
[11:02:34] INFO: erase file completed
[11:02:34] INFO: > File name: /sys/mode.cfg, Update: true, Erase: false
[11:02:34] INFO: > Size of file = 80
[11:02:34] INFO: > Update File: /sys/mode.cfg
[11:02:34] INFO: Downloading file "/sys/mode.cfg" with size 80
[11:02:35] INFO:

New Token is 0x0
[11:02:35] INFO: Download complete
[11:02:35] INFO: Verifying Data...
[11:02:35] INFO: get file
[11:02:35] INFO: Done. Reading 80 bytes
[11:02:35] INFO:

Verification OK
[11:02:36] INFO: > Updated Token value: 0x0
[11:02:36] INFO: > File name: /sys/ipcfg.ini, Update: true, Erase: false
[11:02:36] INFO: > Size of file = 200
[11:02:36] INFO: > Update File: /sys/ipcfg.ini
[11:02:36] INFO: Downloading file "/sys/ipcfg.ini" with size 200
[11:02:36] INFO:

New Token is 0x0
[11:02:36] INFO: Download complete
[11:02:36] INFO: Verifying Data...
[11:02:36] INFO: get file
[11:02:36] INFO: Done. Reading 200 bytes
[11:02:36] INFO:

Verification OK
[11:02:37] INFO: > Updated Token value: 0x0
[11:02:37] INFO: > File name: /sys/ap.cfg, Update: true, Erase: false
[11:02:37] INFO: > Size of file = 126
[11:02:37] INFO: > Update File: /sys/ap.cfg
[11:02:37] INFO: Downloading file "/sys/ap.cfg" with size 126
[11:02:37] INFO:

New Token is 0x0
[11:02:37] INFO: Download complete
[11:02:37] INFO: Verifying Data...
[11:02:37] INFO: get file
[11:02:37] INFO: Done. Reading 126 bytes
[11:02:37] INFO:

Verification OK
[11:02:38] INFO: > Updated Token value: 0x0
[11:02:38] INFO: > File name: /sys/devname.cfg, Update: true, Erase: false
[11:02:38] INFO: > Size of file = 79
[11:02:38] INFO: > Update File: /sys/devname.cfg
[11:02:38] INFO: Downloading file "/sys/devname.cfg" with size 79
[11:02:38] INFO:

New Token is 0x0
[11:02:38] INFO: Download complete
[11:02:38] INFO: Verifying Data...
[11:02:38] INFO: get file
[11:02:39] INFO: Done. Reading 79 bytes
[11:02:39] INFO:

Verification OK
[11:02:40] INFO: > Updated Token value: 0x0
[11:02:40] INFO: > File name: /sys/mdns.cfg, Update: true, Erase: false
[11:02:40] INFO: > Size of file = 2016
[11:02:40] INFO: > Update File: /sys/mdns.cfg
[11:02:40] INFO: Downloading file "/sys/mdns.cfg" with size 2016
[11:02:40] INFO:

New Token is 0x0
[11:02:40] INFO: Download complete
[11:02:40] INFO: Verifying Data...
[11:02:40] INFO: get file
[11:02:40] INFO: Done. Reading 2016 bytes
[11:02:40] INFO:

Verification OK
[11:02:41] INFO: > Updated Token value: 0x0
[11:02:41] INFO: > File name: /sys/dhcpsrv.cfg, Update: true, Erase: false
[11:02:41] INFO: > Size of file = 32
[11:02:41] INFO: > Update File: /sys/dhcpsrv.cfg
[11:02:41] INFO: Downloading file "/sys/dhcpsrv.cfg" with size 32
[11:02:41] INFO:

New Token is 0x0
[11:02:41] INFO: Download complete
[11:02:41] INFO: Verifying Data...
[11:02:41] INFO: get file
[11:02:41] INFO: Done. Reading 32 bytes
[11:02:41] INFO:

Verification OK
[11:02:42] INFO: > Updated Token value: 0x0
[11:02:42] INFO: > File name: /sys/httpsrv.cfg, Update: true, Erase: false
[11:02:42] INFO: > Size of file = 88
[11:02:42] INFO: > Update File: /sys/httpsrv.cfg
[11:02:42] INFO: Downloading file "/sys/httpsrv.cfg" with size 88
[11:02:42] INFO:

New Token is 0x0
[11:02:42] INFO: Download complete
[11:02:42] INFO: Verifying Data...
[11:02:42] INFO: get file
[11:02:42] INFO: Done. Reading 88 bytes
[11:02:42] INFO:

Verification OK
[11:02:43] INFO: > Updated Token value: 0x0
[11:02:43] INFO: > File name: /sys/pref.net, Update: true, Erase: false
[11:02:43] INFO: > Size of file = 3696
[11:02:43] INFO: > Update File: /sys/pref.net
[11:02:43] INFO: Downloading file "/sys/pref.net" with size 3696
[11:02:44] INFO:

New Token is 0xB6C289A0
[11:02:44] INFO: Download complete
[11:02:44] INFO: > Updated Token value: 0xb6c289a0
[11:02:44] INFO: > File name: /sys/smartconfigkeys.cfg, Update: true, Erase: false
[11:02:44] INFO: > Size of file = 80
[11:02:44] INFO: > Update File: /sys/smartconfigkeys.cfg
[11:02:44] INFO: Downloading file "/sys/smartconfigkeys.cfg" with size 80
[11:02:44] INFO:

New Token is 0xB7B446C4
[11:02:44] INFO: Download complete
[11:02:44] INFO: > Updated Token value: 0xb7b446c4
[11:02:44] INFO: > File name: /sys/stacfg.ini, Update: true, Erase: false
[11:02:44] INFO: > Size of file = 104
[11:02:44] INFO: > Update File: /sys/stacfg.ini
[11:02:44] INFO: Downloading file "/sys/stacfg.ini" with size 104
[11:02:44] INFO:

New Token is 0x0
[11:02:44] INFO: Download complete
[11:02:44] INFO: Verifying Data...
[11:02:44] INFO: get file
[11:02:44] INFO: Done. Reading 104 bytes
[11:02:44] INFO:

Verification OK
[11:02:45] INFO: > Updated Token value: 0x0
[11:02:45] INFO: > File name: /sys/p2p.cfg, Update: true, Erase: false
[11:02:45] INFO: > Size of file = 21
[11:02:45] INFO: > Update File: /sys/p2p.cfg
[11:02:45] INFO: Downloading file "/sys/p2p.cfg" with size 21
[11:02:46] INFO:

New Token is 0x0
[11:02:46] INFO: Download complete
[11:02:46] INFO: Verifying Data...
[11:02:46] INFO: get file
[11:02:46] INFO: Done. Reading 21 bytes
[11:02:46] INFO:

Verification OK
[11:02:47] INFO: > Updated Token value: 0x0
[11:02:47] INFO: > File name: /sys/pmcfg.ini, Update: true, Erase: false
[11:02:47] INFO: > Size of file = 10
[11:02:47] INFO: > Update File: /sys/pmcfg.ini
[11:02:47] INFO: Downloading file "/sys/pmcfg.ini" with size 10
[11:02:47] INFO:

New Token is 0x0
[11:02:47] INFO: Download complete
[11:02:47] INFO: Verifying Data...
[11:02:47] INFO: get file
[11:02:47] INFO: Done. Reading 10 bytes
[11:02:47] INFO:

Verification OK
[11:02:48] INFO: > Updated Token value: 0x0
[11:02:48] INFO: > Executing Operation: Disconnect
[11:02:48] Operation Program returned.
[11:04:57] Begin ListFileSystem operation.
[11:04:57] INFO: > Executing Operation: Connect
[11:04:59] INFO: setting break signal
[11:05:00] INFO: detecting FTDI for device reset
[11:05:00] ERROR: No device USB ports were found
[11:05:00] INFO: --- please restart the device ---
[11:05:03] INFO: connection succeeded
[11:05:03] INFO: getting storage list
[11:05:03] INFO: > Executing Operation: Init
[11:05:03] INFO: reading version info
[11:05:03] INFO: DEVICE CC3100 ES1.33
[11:05:03] INFO: reading version info
[11:05:05] INFO: > Executing Operation: ListFileSystem
[11:05:05] INFO: extracting file system information...
[11:05:05] INFO: Serial Flash block size: 4096 bytes
[11:05:05] INFO: Serial Flash capacity: 256 blocks

[11:05:05] INFO: file start size fail total size filename
[11:05:05] INFO: index block [BLKs] safe [BLKs]
[11:05:05] INFO: ----------------------------------------------------------------------------
[11:05:05] INFO: N/A 0 5 N/A 5 FATFS
[11:05:05] INFO: 4 5 5 yes 10 /tmp/phy.cal
[11:05:05] INFO: 6 15 33 yes 66 /sys/servicepack.ucf
[11:05:05] INFO: 7 81 1 yes 2 /sys/mode.cfg
[11:05:05] INFO: 8 83 1 yes 2 /sys/ipcfg.ini
[11:05:05] INFO: 9 85 1 yes 2 /sys/ap.cfg
[11:05:05] INFO: 10 87 1 yes 2 /sys/devname.cfg
[11:05:05] INFO: 11 89 1 yes 2 /sys/mdns.cfg
[11:05:05] INFO: 12 91 1 yes 2 /sys/dhcpsrv.cfg
[11:05:05] INFO: 13 93 1 yes 2 /sys/httpsrv.cfg
[11:05:05] INFO: 14 95 2 yes 4 /sys/pref.net
[11:05:05] INFO: 15 99 1 yes 2 /sys/smartconfigkeys.cfg
[11:05:05] INFO: 16 101 1 yes 2 /sys/stacfg.ini
[11:05:05] INFO: 17 103 1 yes 2 /sys/p2p.cfg
[11:05:05] INFO: 18 105 1 yes 2 /sys/pmcfg.ini
[11:05:05] INFO:


[11:05:05] INFO: Flash usage
[11:05:05] INFO: -------------------------
[11:05:05] INFO: used space: 107 blocks
[11:05:05] INFO: free space: 149 blocks
[11:05:05] INFO: memory hole: [107-255]
[11:05:05] INFO: > Executing Operation: Disconnect
[11:05:05] Operation ListFileSystem returned.

Electronza

DIY electronics projects and more

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store