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.

CC1310: How to control pin state when entering sleep?

Part Number: CC1310
Other Parts Discussed in Thread: CSD, CC1190

Hi!

Is there any callback from the TI 15.4 MAC stack or TI-RTOS that allows the application to change the state of a pin before entering sleep, and then the state coming out of sleep?

Use case: I'm trying to connect CC1310 to the external PA 'SKY66420-11', which has a shutdown pin (CSD).

I'm trying to figure out how I can map CC1310's RF core signals (LNA enable, PA enable) to the input signals of SKY66420 (CSD, CTX, CPS, as in table below). We don't use Transmit bypass; so only need to consider the modes of Shutdown, LNA, and Transmit.

They don't directly map. Any ideas?

  • Hello Eugene PEng,

    Have looked at this reference design?

    file:///C:/Users/a0226081/Downloads/swra528_CC1310%20Skyworks%20433MHz%20PA%20Reference%20Design.pdf

    [Edit]: http://www.ti.com/lit/an/swra528/swra528.pdf


    I think this would help

    Regards,
    AB

  • Hi AB,

    The reference design uses SmartRF studio to configure the pin configuration to the frontend.

    But I don't use SmartRF studio. I use a SimpleLink application. How can I do that?

    In the example SimpleLink applications, the code in board_palna.c configures the pins that interfaces with CC1190 as the frontend.

    But it's not clear how I can modify it for SKY66420-11, especially around how I can set the CSD pin to low when the application enters idle (or sleep).

    More thoughts or ideas?

    Thanks,

    Eugene

  • Hello

    If you look at our application code, there is a folder called PALNA, in this code you will find code for configuring the RF core signals to a external LNA/PA. You can use this as reference on how to set pins controlled by the RF core when sleepin/idle.


    Regards,
    AB
  • Hi AB,

    That wasn't very helpful. As I mentioned, I already found board_palna.c, and I don't see how I can configure the pin state during idle/sleep.

    I pasted the code below. I see the code using the pin table to set the initial state, and also connect the pin to RF core signals.

    Can you help point out how I can configure the idle/sleep state?

    static PIN_Config palnaPinTable[] =
        {
            Board_CC1190_HGM | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL
                | PIN_DRVSTR_MAX, /* High Gain Mode by Default */
            Board_CC1190_LNA | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL
                | PIN_DRVSTR_MAX, /* LNA Off by Default */
            Board_CC1190_PA  | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL
                | PIN_DRVSTR_MAX, /* PA Off by Default */	
            PIN_TERMINATE /* Terminate list     */
        };
    
    /* PA/LNA pin state */
    static PIN_State palnaPinState;
    
    /* PA/LNA Pin Handle */
    static PIN_Handle palnaPinHandle;
    
    /*!
     Initialize PA/LNA
    
     Public function defined in board_palna.h
     */
    void Board_Palna_initialize(uint32_t hgm)
    {
    	if (hgm)
    	{
    	    CC13x0_LAUNCHXL_rfDisableCallback();
    
    		if (!palnaPinHandle)
    		{
    			/* Open PA/LNA PIN driver */
    			palnaPinHandle = PIN_open(&palnaPinState, palnaPinTable);
    			
    			/* Set IO muxing for RFC GPOs */
    			PINCC26XX_setMux(palnaPinHandle, Board_CC1190_LNA, IOC_PORT_RFC_GPO0);
    			PINCC26XX_setMux(palnaPinHandle, Board_CC1190_PA, IOC_PORT_RFC_GPO1);
    		}
    		
    		PIN_setOutputValue(palnaPinHandle, Board_CC1190_HGM, (hgm & 1));
    			
    	}
    }

  • Hello Eugene,

    The important pin configuration lines are these:

    /* Set IO muxing for RFC GPOs */
    PINCC26XX_setMux(palnaPinHandle, Board_CC1190_LNA, IOC_PORT_RFC_GPO0);
    PINCC26XX_setMux(palnaPinHandle, Board_CC1190_PA, IOC_PORT_RFC_GPO1);

    These are handled by the RF core. You do not need to worry, when the core is asleep, they will be OFF. When the core is transmitting they will be ON, When the core is Receiving, they will be in the Receiving configuration,

    If you read p. 985 of the technical reference manual, you will understand how the routed signals behave. e2e.ti.com/.../782857

    These threads will also help you understand how they work:
    e2e.ti.com/.../582833
    e2e.ti.com/.../2445326
    e2e.ti.com/.../2253189
    e2e.ti.com/.../613645

    And these training material that we provide as our SDK release will also help you:
    dev.ti.com/.../

    Regards,
    AB
  • Hi AB,

    Thanks for all the links.

    The challenge I have with the Skyworks front-end (that differs from CC190) is that the CSD pin must be on for both Tx and Rx. You can see from the truth table I attached above.

    The RF core's GPO0 pin is enabled only for Rx and GPO1 pin is enabled only for Tx. How can I map the CSD pin to the RF core signals so that it is enabled for both Tx and Rx?

    I see from another thread that is possible to map a RF core signal to multiple pins.

    But can a pin be mapped to multiple RF core signals (in my case, map CSD to both RFC_GPO0 and RFC_GPO1)?

    Thanks,

    Eugene

  • Hello Eugene,

    Can you put a NAND gate in front of both TX and RX signals and route the result to the CSD pin?

    Regards,
    AB
  • Hi AB,

    The PCB design has already been completed, and I am trying not to change it.

    Which comes back to my original question: is it possible to control the state of a pin when entering sleep?

    If I cannot map the CSD pin (which is like a global enable for the frontend) to the RF core signals, I could maybe control it manually in the application. But then I would need a way to disable it when entering sleep, and then enable it when waking up. Is there a way to do that?

    Thanks,

    Eugene

  • Hi Eugene,

    In the latest SDK there is a global RF driver callback available. This can be configured in the _fxns.c board file (CC1310_LAUNCHXL_fxns.c for example).

    Regards,
    Fredrik
  • Thanks Fredrik!

    Seems like I can set a global callback in the RFCC26XX_HWAttrsV2 struct in the board file.

    And register for the events RF_GlobalEventRadioSetup and RF_GlobalEventRadioPowerDown

    {
    ...
    ...
    .globalCallback = &myIoControlFxn,
    .globalEventMask = (RF_GlobalEventRadioSetup | RF_GlobalEventRadioPowerDown)
    }

    Then in the callback to enable or disable the frontend based on whether the radio is powering on or powering down.

    void myIoControlFxn (RF_Handle client, RF_GlobalEvent events, void *arg)
    {
    if (events & RF_GlobalEventRadioSetup)
    {
    // Set "EN" pin high statically
    PINCC26XX_setOutputValue(PIN_x, 1);
    }
    else if (e & RF_GlobalEventRadioPowerDown )
    {
    // Set EN pin low
    PINCC26XX_setOutputValue(PIN_x, 1);
    }
    }