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.

CC3135MOD: CC3135MOD

Part Number: CC3135MOD
Other Parts Discussed in Thread: CC3135, CC3100

I am working on CC3135MOD. I want to interface CC3135MOD with STM32L4 by UART protocol. I need guidance how I can start implementation of SDK, as I have seen CC3135SDK used only SPI in the functions. So please suggest how I can start implementation using UART? as I am new in TI Forum.  Please suggest reference documents, SDK etc. so that I can quick start further step of my development. 

  • Hi Sudeep,

    What is your reason for using UART? SPI is going to be much faster and simpler to work with. We even have a porting guide demonstrating how to use the CC31xx devices with STM32L4 over SPI: https://www.ti.com/lit/swra704

    If you must use UART, check out the section 19 Porting the Host Driver in the NWP Programmer's Guide, as well as section 3.4 Host Interface. We do not have any demos using UART at this time.

    Best regards,

    Sarah

  • Hi Sarah,

    Thank you for your valuable support. Actually you are right I should use SPI instead of UART because SDK's are available but please tell me if I don't have provision of HOST_INTR connection to HOST controller. Because my hardware is customized. I have available only pins HOST_SPI_CLK,HOST_SPI_DIN,HOST_SPI_DOUT,HOST_SPI_CS_N and HIB_N pin to use because which is connected to STM32L4. Can I use SDK as it is without HOST_INTR pin using SPI. Please suggest.  Give me reference link if any. Waiting for your response. Thanks once again.

  • Hi Sudeep,

    Yes, the interrupt (also referred to as IRQ) pin is required. This is used to alert the host MCU to an asynchronous event from the network processor. If you are not putting the host MCU in a low-power state though, you can use any available GPIO.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks for your reply. That's very helpful to me.  Actually I will design hardware what you have suggested to me. Actually in my current hardware CC3135 has already soldered and its IRQ pin is not available to connect any GPIO so may be I need to redesign my hardware to use SDK as it is. Meanwhile I need one more help from you, have you any available example based on UART ? if you have then please provide me for my reference. Thank you once again. 

  • Hi Sudeep,

    We do not currently have any UART examples available for CC3135.

    Best regards,

    Sarah

  • Hi Sarah,

    Can I use CC3100 UART example for the reference for CC3135 using necessary changes? 

  • Hi Sudeep,

    You can use it as a reference, but the CC3100 porting layer will not work as-is with the CC3135. Be aware that the RTOS/non-OS implementation has changed greatly.

    Best regards,

    Sarah

  • Thanks Sarah,

    Thanks for your guidance. It really great help for me. I will with UART by taken 3100 UART example as reference meanwhile I will also change my Hardware to use interface SPI so that I can use SDK's . Can you please tell me SPI and UART algorithm is same functionally? So that even if porting layer of CC3100 is different I can use functional logic reference of CC3135SDK  but will try using UART. Can I do that?

  • Hi Sudeep,

    Most of the porting layer is the same between SPI and UART, but pay attention to difference in how the IRQ handler is used. I may have forgotten to mention it before, but there is a lot more information in Appendix D of the NWP Programmer's Guide.

    Best regards,

    Sarah

  • Hi Sarah,

    As I told you I have started working on cc3135mod with SPI now. I am using stm32l4 series MCU. As I have read from porting guide 2.1 section it clearly mentioned that I should use  SimpleLink Wi-Fi CC32xx SDK for ARM M4 so I have read cc_pal.c, cc.pal.h and user.h file. 

    In porting guide it is given that to enable and disable I should use nHIB signal as below,

    void NwpPowerOn(void)

    {

    HAL_GPIO_WritePin(HOST_nHIB_PORT, HOST_nHIB_PIN, 1);

    }

    void NwpPowerOff(void)

    {

    HAL_GPIO_WritePin(HOST_nHIB_PORT, HOST_nHIB_PIN, 0);

    /* wait 10 msec */ HAL_Delay(10);

    }

    But in SDK I have seen logic is same but written in different way as below, 

    void NwpPowerOn(void)
    {
    /* bring the 1.32 eco out of reset */
    HWREG(NWP_SPARE_REG_5) &= ~NWP_SPARE_REG_5_SLSTOP;

    /* Clear host IRQ indication */
    HWREG(N2A_INT_ACK) = 1;

    /* NWP Wake-up */
    HWREG(WAKENWP) = WAKENWP_WAKEREQ;

    //UnMask Host Interrupt
    NwpUnMaskInterrupt();
    }


    void NwpPowerOff(void)
    {

    volatile unsigned long apps_int_sts_raw;
    volatile unsigned long sl_stop_ind = HWREG(NWP_SPARE_REG_5);
    volatile unsigned long nwp_lpds_wake_cfg = HWREG(NWP_LPDS_WAKEUPCFG);
    _SlTimeoutParams_t SlTimeoutInfo = {0};

    if((nwp_lpds_wake_cfg != NWP_LPDS_WAKEUPCFG_APPS2NWP) && /* Check for NWP POR condition - APPS2NWP is reset condition */
    !(sl_stop_ind & NWP_SPARE_REG_5_SLSTOP)) /* Check if sl_stop was executed */
    {
    HWREG(0xE000E104) = 0x200; /* Enable the out of band interrupt, this is not a wake-up source*/
    HWREG(A2N_INT_TRIG) = 0x1; /* Trigger out of band interrupt */
    HWREG(WAKENWP) = WAKENWP_WAKEREQ; /* Wake-up the NWP */

    _SlDrvStartMeasureTimeout(&SlTimeoutInfo, NWP_N2A_INT_ACK_TIMEOUT_MSEC);

    /* Wait for the A2N_INT_TRIG to be cleared by the NWP to indicate it's awake and ready for shutdown.
    * poll until APPs->NWP interrupt is cleared or timeout :
    * for service pack 3.1.99.1 or higher, this condition is fulfilled in less than 1 mSec.
    * Otherwise, in some cases it may require up to 3000 mSec of waiting. */

    apps_int_sts_raw = HWREG(A2N_INT_STS_RAW);
    while(!(apps_int_sts_raw & 0x1))
    {
    if(_SlDrvIsTimeoutExpired(&SlTimeoutInfo))
    {
    break;
    }
    apps_int_sts_raw = HWREG(A2N_INT_STS_RAW);
    }

    WAIT_NWP_SHUTDOWN_READY;
    }

    /* Clear Out of band interrupt, Acked by the NWP */
    HWREG(A2N_INT_STS_CLR) = 0x1;

    /* Mask Host Interrupt */
    NwpMaskInterrupt();

    /* Switch to PFM Mode */
    HWREG(ANA_DCDC_PARAMS0) &= ~ANA_DCDC_PARAMS0_PWMOVERRIDE;

    /* sl_stop ECO for PG1.32 devices */
    HWREG(NWP_SPARE_REG_5) |= NWP_SPARE_REG_5_SLSTOP;

    /* Wait for 20 uSec, which is the minimal time between on-off cycle */
    uSEC_DELAY(20);
    }

    Should I need to change that function in cc_pal.c file according to what GPIO I have set already for nHIB pin as mentioned in porting guide section 2.1 ?

  • I forgot to say I have just started work on Ti SDK so I want to use non RTOS platform if possible. 

  • Hi Sudeep,

    The porting layer in the CC32xx SDK is specific to the CC3220/CC323x application MCU power and reset management.

    Your porting layer is specific for your host application MCU. To turn on/off the CC31xx NWP, you should only need the nHib toggle according to the CC31xx datasheet specifications.

    Best regards,

    Sarah

  • Hi Sarah,

    Thank you. I understand it. Means I need to change only in  cc_pal.h, cc_pal.c and user.h for porting according to my MCU right?

  • Yes, that is correct.