[SOLVED] Programming and Debugging using J-Link with TI CC3220S Module

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Programming and Debugging using J-Link with TI CC3220S Module

    Hello,

    I'm trying to develop a path forward to program and debug the TI CC3220S module built into a Murata module (LBWA1ZZ1KR), and am seeking some advice. I would like to develop a solution that can be used during development as well as make strides towards a scheme that can support production, possibly leveraging a Segger Flasher tool.

    The two options for programming the device:
    • Program the attached SPI flash directly (Not a good option)
    • Program the SPI flash through the CC3220S via its UART


    Programming the SPI flash directly may not be an option, as the Murata module may not allow proper access to the required pins. The alternative of programming through the UART seems like the most feasible option.

    To put the device in a mode where it is programmable via the UART requires Sense on Power-up (SOP) pins being set in a specific way. (CC3220x Datasheet - Functional Configurations)

    The CC3220S supports both SWD and JTAG debugging, but only the UARTLOAD_FUNCTIONAL_4WJ (JTAG) supports loading and debugging without changing the state of the SOP pins between programming and debugging. This is significant, because the VCOM on the J-Link could be used program the device via its UART, but my understanding is that the VCOM shares pins with JTAG programming mode.

    So, I think this leaves me with a couple of options, both of which seem to require writing J-Link Scripts to work properly.

    The first would be if the device was in UARTLOAD_FUNCTIONAL_4WJ mode:
    • Have the J-Link reset the module (or manually do this)
    • Use the VCOM to send a UART break to the device to make it enter UARTLOAD mode before it times out
    • Load the firmware with TI's UniFlash through the VCOM UART interface
    • Reset the CC3220S and attach in JTAG mode for debugging

    One caveat for this config is the VCOM Tx pin must be configured to a pin that isn't the JTAG's TDI pin.

    The second would be if the device was in FUNCTIONAL_2WJ mode during debug:
    • Script the J-Link to set the SOP pins to the UARTLOAD configuration
    • Reset the CC3220S to enter UARTLOAD mode
    • Load the firmware with TI's UniFlash through the VCOM UART interface
    • Script the J-Link to set the SOP pins to the FUNCTIONAL_2WJ configuration
    • Reset the CC3220S and attach in SWD mode for debugging

    The 2 Wire mode is preferable to save a bit of board space required by additional debug pins, but it's certainly not a necessity that 2 Wire mode is used. (Especially if it makes things easier.)

    Maybe there's an easier solution that I've overlooked. It seems in whatever way I approach this, due to the configuration of the Flash/Device/Module architecture, it may require some J-Link scripting. Is there some advice or insight anyone can offer to start me down the right path with the least risk? How has Segger conceived of programming and debugging of the CC3220S module? Am I way off the rails?

    Thank you very much!

    -Tom

    The post was edited 7 times, last by tom_bresson ().

  • Sorry to reply to my own post. I changed my username and I can no longer edit the OP.

    I found out from MuRata that you can program the SPI flash directly on their module, if the CC3220S is held in the reset state while doing so. This may provide an additional way to load software on the the module.

    -Tom
  • Hello Tom,

    external SPI with that target device is currently not supported automatically.
    But we offer an open Flash loader interface so you can write the Flash loader yourself and add support that way.
    wiki.segger.com/Adding_Support_for_New_Devices
    That way you could simply use the SPI Flash loader you have written which you then can use with all J-Link related software tools and you don't have to hassle with script files.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.