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.

CC3120: Question on Direct SPI programming for CC3120RNMA

Part Number: CC3120
Other Parts Discussed in Thread: UNIFLASH

Dear support,

Based on Application Note "CC3120 Production Line Guide" SWRA569 there are two possibilities to program the exetrnal serial memory connected to CC3120: Direct SPI and UART via Bootloader.

We have decided to program it via "Direct SPI" programming on pins of serial memory. For us this the faster solution since our ISP tool programmer already supports the SPI serial memory.

But we have a problem:

If we readback a programmed board (via UART bootloader) and then with the same content we program a second board via Direct SPI, the second board doesn't work. If we program the first board via Direct SPI it works. It seams that the content depends of the board.. Is it possible? Is this a right behaviour? In case how can we program the memory via Direct SPI using a generic ISP programmer? 

Can you also give me the programming specification for UART via bootloader, in case the Direct SPI programming is not possible using a universal ISP programmer like ours WriteNow! 

Thanks & Best Regards,

--Pietro Poletto

www.algocraft.com

  • Hi,

    This workflow cannot work because CC31xx/CC32xx devices have cloning protection.

    You need to prepare binary image by Uniflash software and this image you can use 3rd party SPI flash programmer. Do not forgot erase whole SPI flash before programming.

    Jan

  • Hi Jan,

    Thank your for your fast reply.

    So UniFlash generates a different binary image for the serial memory for every boards? 

    Is there any possibility to program the memory via SPI directly without use the UniFlash utility?

    Our customer need to program several boards in automatic way, starting from a binary file or an image file becasue the programmer is also connected to an ATE (Automatic Test system). 

    If via Direct SPI is not possible, do we have the same problem if we use the UART bootloader?

    Thanks

    Best regards,

    --Pietro

  • Hi Pietro,

    So UniFlash generates a different binary image for the serial memory for every boards?

    No. You upload image into sFlash by UART or by SPI flash programmer. After that step is image unpacked by device itself and filesystem is created. After unpacking you cannot copy content of SPI flash from one to other device.

    Is there any possibility to program the memory via SPI directly without use the UniFlash utility?

    Yes, you can use host API sl_FsProgram(). You will transfer image prepared by Unilfash into your host MCU somehow. Host MCU will use this sl_ API and program CC3120 device by yourself via SPI.

    If via Direct SPI is not possible, do we have the same problem if we use the UART bootloader?

    Sorry I don't understand your question. You have three ways for production programming:

    • direct programming SPI flash chip via 3rd party programmer
    • programming via UART bootlaoder (Uniflash GUI or Uniflash CLI or Embedded programming)
    • programming from host MCU via host interface (SPI or UART) via API sl_FsProgram()

    Jan

  • Hi Jan,

    Correct me if I'm wrong because the board maufacturer and me don't have the know-how about this device. 

    Usually we program the device starting from a binary/source file generated by compiler and it's enough to duplicate it into the memory.

    So the right step is to receive the image file generated by UniFlash and then program this image directly to serial memory erasing the chip before.

    Then automatically the CC3120 unpack the image and it start to work.

    Is it OK?

    Thanks

    --Pietro

  • Hi Pietro,

    Yes, that is correct.

    Be aware that unpacking and creating filesystem can take a while according size of image.

    Jan

  • Hi Jan,

    Thank you for your great support!

    Best Regards,

    --Pietro