This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3130: Help required with programming external flash

Part Number: CC3130
Other Parts Discussed in Thread: UNIFLASH, CC3100, CC3200

We have a custom board with CC3130 and attached Adesto AT25DF321A flash memory.

I have an FTDI UART from PC to the CC3130's UART and I can communicate with the 3130 after putting it into Bootloader mode.

I am using Uniflash v3.4 (and also dslite.bat command line from a Uniflash 8.0.0 installation). Uniflash can connect to the 3130 and read its Bootloader version as 4, 0, 0, 5.

However, I cannot program the sFlash memory. I see no activity on the 3130<->flash SPI bus apart from some start-up noise when nHIB is toggled low/high to reset the chip when prompted by Uniflash.

A Uniflash operation like 'Program' or 'Format' does a 'Get Storage List' (response 0x84) and 'Get Version Information' (twice - response both times is BL 0x05,0x00,0x00,0x04 and Chip Type 0x00,0x1B,0x00,0x00 as sent over the UART).

Then Uniflash tries operation 0x21, which isn't in my document SWPA231–January 2019. The 3130 replies NAK:

(Uniflash sends 0x00,0x13,0x96,0x21,0x00,0x00,0xBF,0x98,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x01. CC3130 replies 0x00,0x33 (NAK)).

Uniflash sends blocks of TEST_IMG data and the 3130 ACKs them all but Uniflash ends by reporting:

[17:13:56] DEBUG: Error -63 : Wrong signature
[17:13:56] DEBUG: Update result: -63

At no time during the UART interaction is there anything on the SPI bus.

I attach the following Salae trace which shows the SPI lines (top 4 lines), nHIB and the UART Tx/Rx (as seen by the PC).

 

After the nHIB toggle, there is some random noise on the SPI bus but no more SPI traffic as the UART commands/responses proceed.

Here's the Uniflash debug output:

[17:47:15] Begin Format operation.
[17:47:16] INFO: > Executing Operation: Connect
[17:47:16] DEBUG: waiting and clearing uart rx buffer
[17:47:18] INFO: setting break signal
[17:47:18] DEBUG: wait for ack
[17:47:19] DEBUG: UART timeout
[17:47:19] DEBUG: --- COM Port timeout on ACK read
[17:47:19] INFO: detecting FTDI for device reset
[17:47:19] DEBUG: got 2 devices connected
[17:47:19] DEBUG: Device 0: , SN:
[17:47:19] DEBUG: Device 1: , SN:
[17:47:19] ERROR: No device USB ports were found
[17:47:19] INFO: --- please restart the device ---
[17:47:19] DEBUG: wait for ack
[17:47:22] INFO: connection succeeded
[17:47:22] INFO: getting storage list
[17:47:22] DEBUG: wait for ack
[17:47:22] INFO: > Executing Operation: Init
[17:47:22] INFO: reading version info
[17:47:22] DEBUG: wait for ack
[17:47:22] INFO: DEVICE CC3100 ES1.21
[17:47:22] INFO: reading version info
[17:47:22] DEBUG: wait for ack
[17:47:22] DEBUG: Bootloader version is 4, 0, 0, 5
[17:47:22] DEBUG: Bootloader with old API, using legacy upgrade
[17:47:23] DEBUG: Downloading file TEST_IMG with size 49048
[17:47:23] DEBUG: sending start download command
[17:47:23] DEBUG: wait for ack
[17:47:38] DEBUG: UART timeout
[17:47:38] DEBUG: --- COM Port timeout on ACK read
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: send chunk legacy
[17:47:38] DEBUG: wait for ack
[17:47:38] INFO: download complete
[17:47:38] DEBUG: status request
[17:47:38] DEBUG: wait for ack
[17:47:38] DEBUG: Error -63 : Wrong signature
[17:47:38] DEBUG: Update result: -63
[17:47:39] DEBUG: wait for ack
[17:47:54] DEBUG: UART timeout
[17:47:54] DEBUG: --- COM Port timeout on ACK read
[17:47:54] FATAL: Error loading the bootloader. Error code: -3
[17:47:54] INFO: > Executing Operation: Disconnect
[17:47:54] DEBUG: disconnecting from device . . .
[17:47:54] DEBUG: wait for ack
[17:47:54] Operation Format returned.

My questions are:

1.What is Bootloader command 0x21 and where is it documented?

2. Why is the CC3130 responding NAK to this command?

3. Why can't I Program/Format the serial flash?

Thanks in advance. More information can be supplied if required.

  • Hey Duncan,

    Are you able to replicate such on a launchpad? Have you done a schematic comparison of your board and a launchpad?

  • Hi,

    Uniflash version 3.4 is not compatible with CC3130 devices. Version 3.4 is compatible with CC3100 and CC3200 devices only. Please use latest version for CC3130 device.

    Jan

  • Thanks for the help. I managed to use Uniflash 8.0.0 by starting it from Windows command line using

    dslite.bat --mode cc31xx gui_cfg --port COM4

    The web-page version of Uniflash did then connect to my CC3130 over UART and I was able to apply the Service Pack and config.

    Uniflash 8.0.0 used as a standalone app still always refuses to connect to the CC3130, perhaps because there is no ability to specify the COM port.