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.

CC3135: File System Corruption SL_ERROR_FS_CORRUPTED_ERR

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

Hello Team,

I have a customer who is interfacing the CC3135 with the STM32. No trouble at all. However, during the initialization sequence, error 4111 is returned. Everything is setup based on the guide (cc3135-programmers-guide-swru455h.pdf).

The code below was used. 

Customer comments & questions:

I tried to send commands to re-format the file system using sl_FsCtl() API  but start still fails with the same error.

Our use case for CC3135 is only to scan the SSIDs but will not be used for any other WIFI access point or endpoint (at least for now) Just fyi.”

1.       Can we use the CC3135 without the SPI flash?

2.       How can we fix the -4111 error?

Thank you for your help!

 

Cheers,

Fadi

 

Code:

 

                      lMode = sl_Start(0, 0, 0);

TRACE(TRACE_FLAG_ALWAYS," Start Mode %d", lMode);

if(lMode == SL_ERROR_FS_CORRUPTED_ERR)

{

_i32 slRetVal;

SlFsRetToFactoryCommand_t RetToFactoryCommand;

_i32 RetVal, ExtendedError;

 

TRACE(TRACE_FLAG_ALWAYS,"returning to factory image");

RetToFactoryCommand.Operation = SL_FS_FACTORY_RET_TO_DEFAULT;

slRetVal = sl_FsCtl( (SlFsCtl_e)SL_FS_CTL_RESTORE, 0, NULL , (_u8 *)&RetToFactoryCommand , sizeof(SlFsRetToFactoryCommand_t), NULL, 0 , NULL );

if ((_i32)slRetVal < 0)

{

//Pay attention, for this function the slRetVal is composed from Signed RetVal & extended error

RetVal = (_i16)slRetVal>> 16;

ExtendedError = (_u16)slRetVal& 0xFFFF;

TRACE(TRACE_FLAG_ALWAYS,"\tError SL_FS_FACTORY_RET_TO_IMAGE, 5d, %d\n", RetVal, ExtendedError);

return slRetVal;

}

TRACE(TRACE_FLAG_ALWAYS,"sl_FsCtl %d", slRetVal);

delayMs(60*1000);

//Reset

sl_Stop(0);

delayMs(1000);

lMode = sl_Start(0, 0, 0);

TRACE(TRACE_FLAG_ALWAYS," Start Mode %d", lMode);

}

 

 

Here is the logs:


0000:00:00: 00:00:03.165:  [POWER OFF WIFI CC3135] nHIB LOW, RST HIGH
0000:00:00: 00:00:03.188:  [POWER ON WIFI CC3135] RST LOW, nHIB HIGH

0000:00:00: 00:00:04.666:   cc3135-uart-rx: badccdab08001400
0000:00:00: 00:00:04.681:   driver read 8 bytes from cc3135 remaining 20
0000:00:00: 00:00:04.707:   cc3135-uart-rx: 2404040600000000   $
0000:00:00: 00:00:04.721:   driver read 8 bytes from cc3135 remaining 12
0000:00:00: 00:00:04.747:   cc3135-uart-rx: 888888880000003100000000          1
0000:00:00: 00:00:04.764:   driver read 12 bytes from cc3135 remaining 0
0000:00:00: 00:00:04.779:  sl_Start returned Mode -4111  sl_Start() returned -4111 (FS ERROR)


Trying to reset the File system to default (formatting??)
0000:00:00: 00:00:04.788: returning to factory image

0000:00:00: 00:00:04.799:  cc3135-uart-tx: ffeeddbb21433412       !C4
0000:00:00: 00:00:04.815:  cc3135-uart-tx: 4ba41400   K
0000:00:00: 00:00:04.829:  cc3135-uart-tx: 0000000000bc01080000000004000000
0000:00:00: 00:00:04.850:  cc3135-uart-tx: 02000000
0000:00:00: 00:00:05.128:   cc3135-uart-rx: badccdab4b241400       K$
0000:00:00: 00:00:05.143:   driver read 8 bytes from cc3135 remaining 20
0000:00:00: 00:00:05.169:   cc3135-uart-rx: 2304040600000000   #
0000:00:00: 00:00:05.183:   driver read 8 bytes from cc3135 remaining 12
0000:00:00: 00:00:05.209:   cc3135-uart-rx: 000000000000000000000000
0000:00:00: 00:00:05.226:   driver read 12 bytes from cc3135 remaining 0
0000:00:00: 00:00:05.241: sl_FsCtl 0


Starting the chip again

0000:00:00: 00:01:05.248:  [POWER OFF WIFI CC3135] nHIB LOW, RST HIGH
0000:00:00: 00:01:06.273:  [POWER OFF WIFI CC3135] nHIB LOW, RST HIGH
0000:00:00: 00:01:06.296:  [POWER ON WIFI CC3135] RST LOW, nHIB HIGH
0000:00:00: 00:01:07.771:   cc3135-uart-rx: badccdab08001400
0000:00:00: 00:01:07.786:   driver read 8 bytes from cc3135 remaining 20
0000:00:00: 00:01:07.812:   cc3135-uart-rx: 2404040600000000   $
0000:00:00: 00:01:07.827:   driver read 8 bytes from cc3135 remaining 12
0000:00:00: 00:01:07.852:   cc3135-uart-rx: 888888880000003100000000          1
0000:00:00: 00:01:07.870:   driver read 12 bytes from cc3135 remaining 0
0000:00:00: 00:01:07.885:  sl_Start returned Mode -4111   sl_Start returned -4111 (FS ERROR)  

  • Hi Fadi,

    A serial flash is required for all CC3xxx devices. The device will not boot without the serial flash, as it is used for device configuration and firmware updates in the form of servicepacks.

    1. Are you using a CC3135 BoosterPack or a custom board?
    2. Is this a new error? Were you able to call sl_Start successfully before?
    3. Please try flashing a new image to the CC3135 containing only the latest servicepack. You can find an introduction to UniFlash ImageCreator here: http://dev.ti.com/tirex/explore/node?node=AOpXy8BVYJZzTZaGM-bGfA__s6qGmnm__LATEST

    Best regards,

    Sarah

  • Hello Sarah

    I just received feedback:

    1. It is a custom board (their board, first prototype)
    2. This is the first time they are using the chip, so they have never tried this before.
    3. What's needed to flash the chip? The chip is on their board. Can they do this from the host (STM32) via UART? or do we need to solder wireless to connect from a PC? in that case should we use UART or SPI? 

    I will also link the customer to the E2E for further inquiry.

    Thank you

    Cheers,

    Fadi

  • Hi Fadi,

    When using UniFlash ImageCreator, the CC3135 must be flashed using the UART interface. There are also other options to flash a gang image. Please see the CC3135 Production Line Guide: http://www.ti.com/lit/swra647

    The customer should go through the Hardware Design Checklist to be sure that they are meeting requirements for the device: http://www.ti.com/lit/zip/swru552

    The customer should also review the Serial Flash guide to be sure their serial flash meets requirements: http://www.ti.com/lit/swra613/

    Best regards,

    Sarah

  • Hi Sara/Fadi,

    I am on Windows 10, running the UniFlash.

    When I open UniFlash and select my chip (CC3135), It takes me to the image creator window where I select the bin file, but I could not find a place to choose the COM Port/UART port to program. can you tell me how can I program the CC3135 using the COM/Serial Port using UniFlash Tool?

    Regards,

    Hamsa

  • Further debugging this issue on my side:

    I tried to dslite as per swru469d.pdf ("uniflash programming tool guide")

    I get the following error:

    C:\ti\uniflash_5.0.0>dslite.bat --mode cc31xx device info --port COM25:
    Executing the following command:
    > C:\ti\uniflash_5.0.0\simplelink\imagecreator\bin\SLImageCreator.exe device info --port COM25:

    For more details and examples, please refer to the UniFlash Quick Start guide.

    Config file (cfg.json) doesn't exist, using defaults
    INFO:root:COM PORT COM25:
    Traceback (most recent call last):
    File "<string>", line 4586, in <module>
    File "<string>", line 4582, in main
    File "<string>", line 4554, in cmdline
    File "<string>", line 4228, in command_device_info
    File "<string>", line 1489, in connect_device
    File "W:\slutils\slutils.py", line 341, in get_ex_port
    File "u:\venv_ic\lib\site-packages\serial\serialwin32.py", line 38, in __init__
    File "u:\venv_ic\lib\site-packages\serial\serialutil.py", line 282, in __init__
    File "u:\venv_ic\lib\site-packages\serial\serialwin32.py", line 66, in open
    serial.serialutil.SerialException: could not open port 'COM25:': WindowsError(123, 'The filename, directory name, or volume label syntax is incorrect.')
    SLImageCreator returned -1

    C:\ti\uniflash_5.0.0>

  • A little more progress. After removing the col (:) from the COM port, the dslight started communicating with the chip. With serial port monitor, I see a byte 0x00 going to the device from dlite.bat and a byte 0x00 receiving back from the CC3135 but the dslite.bat timing out with the following message. Any idea?

    C:\ti\uniflash_5.0.0>dslite.bat --mode cc31xx device info --port COM25
    Executing the following command:
    > C:\ti\uniflash_5.0.0\simplelink\imagecreator\bin\SLImageCreator.exe device info --port COM25

    For more details and examples, please refer to the UniFlash Quick Start guide.

    Config file (cfg.json) doesn't exist, using defaults
    INFO:root:COM PORT COM25
    INFO:slbootloader.slbootloader:Connecting to device
    INFO:slbootloader.slbootloader:--- Please power off the device ---
    Press ENTER to continue
    INFO:slbootloader.slbootloader:Power off
    INFO:slbootloader.slbootloader:Set break signal
    INFO:slbootloader.slbootloader:--- Please power on the device ---
    INFO:slbootloader.slbootloader:Power on
    Traceback (most recent call last):
    File "<string>", line 4586, in <module>
    File "<string>", line 4582, in main
    File "<string>", line 4554, in cmdline
    File "<string>", line 4228, in command_device_info
    File "<string>", line 1495, in connect_device
    File "W:\slbootloader\slbootloader.py", line 406, in connect_with_reset
    File "W:\slbootloader\slbootloader.py", line 271, in _expect_ack
    File "W:\slbootloader\slbootloader.py", line 302, in _read_data
    slbootloader.slbootloader.BootLoaderError: Timeout reading data
    SLImageCreator returned -1

    C:\ti\uniflash_5.0.0>

  • Hello Hamsa,

    I noticed that you are using the newer version of Uniflash (5.0) from the execution path. Sarah can correct if I am wrong, but I think you need to use the previous version for CC3100 and CC3200 support.

    Full Guide for older UNIFLASH

    Quick Guide for older UNIFLASH

    Cheers,

    Fadi

  • Hi Fadi,

    I uninstalled version 5 and installed version version 3.4.1.

    Still the same issue. It does sends the first byte 0x00 (assuming it's the UARt line break) then it says it timed out waiting for response. I know it's receiving bytes from the uart monitor. Any idea?

    [15:44:35] Begin Format operation.

    [15:44:35] INFO: > Executing Operation: Connect
    [15:44:37] INFO: setting break signal
    [15:44:38] INFO: detecting FTDI for device reset
    [15:44:38] ERROR: No device USB ports were found
    [15:44:38] INFO: --- please restart the device ---
    [15:44:53] ERROR: ---reading ACK signal failed---
    [15:44:54] WARNING: ---seting break signal to false failed---
    [15:44:56] INFO: setting break signal
    [15:44:57] INFO: detecting FTDI for device reset
    [15:44:57] ERROR: No device USB ports were found
    [15:44:57] INFO: --- please restart the device ---
    [15:45:12] ERROR: ---reading ACK signal failed---
    [15:45:12] WARNING: ---seting break signal to false failed---
    [15:45:14] INFO: setting break signal
    [15:45:15] INFO: detecting FTDI for device reset
    [15:45:15] ERROR: No device USB ports were found
    [15:45:15] INFO: --- please restart the device ---
    [15:45:30] ERROR: ---reading ACK signal failed---
    [15:45:30] WARNING: ---seting break signal to false failed---
    [15:45:32] Cancelling current process <Format>, please wait...
    [15:45:32] INFO: setting break signal
    [15:45:33] INFO: detecting FTDI for device reset
    [15:45:33] ERROR: No device USB ports were found
    [15:45:33] INFO: --- please restart the device ---
    [15:45:33] INFO: Cancel button pressed
    [15:45:33] WARNING: ---seting break signal to false failed---
    [15:45:33] FATAL: --- Can't connect to device !! ---
    [15:45:34] FATAL: Error connecting to the device. Please check your COM port settings. Error code: -2
    [15:45:34] INFO: > Executing Operation: Disconnect

  • Hi Hamsa,

    The UniFlash ImageCreator tool GUI automatically detects the COM port when you click the Connect button. You can also set it from the command line as you've done, but you're seeing a timeout error. The timeout means that ImageCreator is not receiving a response from the device. You should go through the hardware design checklist that I linked to above and note any differences.

    Fadi, the customer is correct to use UniFlash 5.0 for the CC3135. CC3100 is our old first generation device.

    Best regards,

    Sarah

  • Hi Sara,

    Thanks for clarifying. I am back on Version 5 now.

    I finished reviewing the hardware checklist for 3135. Hardware design looks right. Also, we have already shared the schematic with TI for review before the first prototype was made.

    Our micro has controller over RST and nHIB.

    What is the correct sequence to put the chip into bootloader mode? I am reviewing your bootloader documenation but nowhere showing the wave forms for RST and nHIB to put the device into bootloader. Can you provide this?

    Regards,

    Hamsa

  • Hi Sarah / Fadi,

    Here is the MCU pin toggling to sequence that we are doing to set the CC3135 in bootloader mode, is this correct? Will this sequence would make the CC3135 goes into bootloader mode?

    // Note GPIO_CC_nHIB_Pin is nHIB pin

    // Note GPIO_CC_RST_Pin is nRST

    // Initial State // Shutdown/Reset
    HAL_GPIO_WritePin(GPIO_CC_nHIB_GPIO_Port, GPIO_CC_nHIB_Pin, GPIO_PIN_RESET);
    HAL_GPIO_WritePin(GPIO_CC_nRST_GPIO_Port, GPIO_CC_RST_Pin, GPIO_PIN_SET);

    // Wait a minute in reset state
    delayMs(1000);

    /* put CC3135 into bootloader mode*/
    HAL_GPIO_WritePin(GPIO_CC_nHIB_GPIO_Port, GPIO_CC_nHIB_Pin, GPIO_PIN_SET);
    HAL_GPIO_WritePin(GPIO_CC_RST_GPIO_Port, GPIO_CC_RST_Pin, GPIO_PIN_RESET);

    delayMs(220);

    HAL_GPIO_WritePin(GPIO_CC_RST_GPIO_Port, GPIO_CC_RST_Pin, GPIO_PIN_SET);

    Thanks,

    Hamsa

  • Hi Hamsa,

    If you did not format the serial flash before placing it on the board or flash the device afterwards, that is likely why you are seeing this error on sl_Start.

    To directly flash the CC3135 via UART, you need a USB to UART converter. The easiest way to do this is to use an emulator boosterpack: https://www.ti.com/tool/CC31XXEMUBOOST

    Do you have one? Or do you have a TI LaunchPad like a CC3220 or MSP432? Please see section 5.3 of the Production Line Guide for pin and configuration requirements.

    Alternatively, you can load a gang image directly to the serial flash. This gang image is designed to format the serial flash upon first boot.

    The CC3135 can be formatted by the host MCU via UART, but this requires additional action from the host MCU. Please see the Embedded Programming User's Guide: http://www.ti.com/lit/swpa231

    Best regards,

    Sarah

  • Hi Sarah,

    Thank you for your reply.

    I do have a Booterpack with me but never used it. I also have FTDI USB-2-UART converter with me. Let me know which one should I use.

    I have few question on that note:

    1. I like to pursue the UART to USB option now using the boosterpack, Do you have a pin diagram from booster pack to our target board (which pins on the booster pack should go to the CC3135 on our target board) for me?

    2. If we go with the gang image programming for the production manufacturing, which SPI flash adapter should we user / buy?

    Regards,

    Hamsa

  • Btw, 

    What I have is not an emulated booster pack but the BOOSTXL-CC3135 Rev A. Can I use that for the UART method? If so, I would still like to know the pin connections needed from the boosterpack to the CC3135 on our board.

    Thanks in advance,

    Hamsa

  • Hi Hamsa,

    Unfortunately, the CC3135 BP does not have an emulator on-board. You can use the FTDI converter, but since it does not have an automatic reset, you will have to toggle the nHib manually.

    Using UniFlash ImageCreator 5.0, create a CC3135 project, add the servicepack from the Wi-Fi plugin, then select Connect and you should see "Connecting, please wait". After about 5 seconds, briefly toggle nHib. Then select Burn and Program Image. When you see "Starting", wait about 3 seconds and toggle nHib again.

    Hopefully that gets you running for now so you can complete development.

    Best regards,

    Sarah

  • Thanks Sara. 

    I am having some trouble getting this sequence working, but I am confident that we are getting closer to get this done.

    I have one more question: What should be the nRST line state during this whole sequence?

    Regards,

    Hamsa

  • Hi Hamsa,

    You can toggle either nHib or nReset in this case, as long as the other signal stays high.

    nReset has some additional timing requirements related to first time power up, but that shouldn't apply here. (See section 5.17 of the datasheet.)

    Best regards,

    Sarah

  • Sarah,

    We got the spi chip flashed and working over the weekend. Thank you for your help. 

    Regards,

    Hamsa