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.

CCS/CC1310: CC1310_LAUNCHXL_shutDownExtFlash() change PIN

Part Number: CC1310

Tool/software: Code Composer Studio

Hello Support Team,

i have a Problem with the CC1310_LAUNCHXL_shutDownExtFlash().

I want to shut down the external Flash in my application with this function.
My problem now is, that my colleague have made a mistake at our own designed Layout. 
The GPIO 20 is used, to power up the coil of our relai.

So when i activate the function  CC1310_LAUNCHXL_shutDownExtFlash(), the coil is powered up all the time, because the DIO20 is set High in the function.

PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI_FLASH_CS, 0);
uint8_t i;
for(i = 0; i < 8; i++){
PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI0_CLK, 0);
PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI0_MOSI, (byte >> (7 - i)) & 0x01);
PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI0_CLK, 1);
}
PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI_FLASH_CS, 1);

 


I have to shut down the external flash, because the current consumption is otherwise to high in sleep mode with out it.

Is there a solution, to turn off the external flash, with out using the DIO20?

Thank you very much!


Bester regards
Sini

  • Hello Sinisa,
    shutDownExtFlash() is a board specific function.
    You need to adopt this function to your own needs.
  • Hello Tom,

    Thank you for your answer.

    But how can i adopt this function to my own needs.

    Here are the functions which are standard:


    void CC1310_LAUNCHXL_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
    {
    PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI_FLASH_CS, 0);
    uint8_t i;
    for(i = 0; i < 8; i++){
    PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI0_CLK, 0);
    PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI0_MOSI, (byte >> (7 - i)) & 0x01);
    PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI0_CLK, 1);
    }
    PIN_setOutputValue(pinHandle, CC1310_LAUNCHXL_SPI_FLASH_CS, 1);
    }

    /*
    * ======== CC1310_LAUNCHXL_shutDownExtFlash ========
    */
    void CC1310_LAUNCHXL_shutDownExtFlash(void)
    {
    PIN_Config extFlashPinTable[] = {
    CC1310_LAUNCHXL_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_INPUT_DIS | PIN_DRVSTR_MED,
    CC1310_LAUNCHXL_SPI0_CLK | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_INPUT_DIS | PIN_DRVSTR_MED,
    CC1310_LAUNCHXL_SPI0_MOSI | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_INPUT_DIS | PIN_DRVSTR_MED,
    CC1310_LAUNCHXL_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN,
    PIN_TERMINATE
    };
    PIN_State extFlashPinState;
    PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);

    uint8_t extFlashStartup = 0xAB;
    uint8_t extFlashShutdown = 0xB9;

    CC1310_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashStartup);
    CC1310_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);

    PIN_close(extFlashPinHandle);
    }



    In this two functions, there is the GPIO "CC1310_LAUNCHXL_SPI_FLASH_CS" used.

    If i only change the CC1310_LAUNCHXL_SPI_FLASH_CS to a other GPIO, for example DIO1, then the External flash won't be shut down.

    Where do i have to change the settings, so that the external flash is not shut down bei die DIO20?
  • Sinisa,

    all depends on your own design.

    You have never mentioned SPI/GPIO resources you use in your own design so I do not know what should be changed or even checked.

    Sinisa Milanovic57 said:
    In this two functions, there is the GPIO "CC1310_LAUNCHXL_SPI_FLASH_CS" used.

    If you store some data, probably you would like to read this data. 
    Where is a third function you need to change?

    It is like with a car. Before you start a car you need to know how to stop it. 

  • Hello,

    i will try to explain my problem better.

    I have designed my own board. I do not use the SPI, so i thought i can take the GPIO20 (CC1310_LAUNCHXL_SPI_FLASH_CS) to power on the coil of my relai.

    The own designed board arrived yesterday, and i measured the powerconsumption in sleep-mode and i measured about 50mA.
    The problem is, that i also want to turn off the external Flash, with the function i posted before. This function use the DIO20 and set it at the end of the function to high. So the coil is permanent powered up and needs this 50mA i measured.

    So i wanted to ask, if there is now a other way, to turn of the external flash on my boards, without useing the DIO20.
    Otherwise, i would need to cut off the DIO20 connection of my board and solder the coil of my relai to an other Output.

    This is very complicated.

    Thank you very much for your help!
  • Sinisa Milanovic57 said:
    So i wanted to ask, if there is now a other way, to turn of the external flash on my boards, without useing the DIO20.
    Otherwise, i would need to cut off the DIO20 connection of my board and solder the coil of my relai to an other Output.

    TI design uses DIO20 to manage external flash. 
    Which DIOxx do you use to manage your flash?

  • Hello,

    I maybe forgot to say, that i am using the same design like the ti launchpad.

    So i have now cut off the DIO20 from my coil and soldered a other Output on it, and it works fine.


    Thank you for your support.