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.

Hardware flags in CC3200

Other Parts Discussed in Thread: CC3200

Hi guys,

I want to use a flag instead of the jumper (Vcc-p58) in HTTP server example in which I am able to switch between AP mode  and station mode by the value of this flag.(binary value) and I can store the value when the power goes off is that possible?

  • I don't see why not.  The way I would do this is create a file on the SFLASH that contains the value of your flag.  Then upon bootup, instead of reading the state of p58 to determine the operating mode, you open this file on the SFLASH and read its contents.  This is then used to determine the operating mode.  You can then use the webpage, serial port, or some other appropriate means to allow the user to re-configure this flag.  Simply open the file again, this time with write access, write the new state value, and then close the file again.  Since the file is stored in non-volatile SFLASH, the last configured state will be retained even if power is removed.

    Shawn

  • Hi Haitham,

     

    You don't need to configure the device in AP/STA mode every time after reboot. The network configuration parameters are stored on serial flash and device read these value during boot-up. For example, if the device is configured in AP mode once it will come up in AP mode after every boot unless reconfigured using API.

     

    If you need to store the flag parameter you can use the devices file system API to store it on serial flash. Please refer to 'file_operations' example of SDK.

     

    Regards,

    Ankur

  • Hi ankur,

    I know that I should remove the jumper every time when I want to go from AP to STA mode and reset my device and when I want to go from the STA mode to AP I should put the jumper and also reset the device so I decided to use a flag to avoid these hardware changes but as I have understood from your respond that I shouldn't do that is that right???

    Moreover I am trying to debug the "file operation" example but there is a problem the execute is cancelled and the orange led switch on every time I run the code.

  • Ankur1 said:
    You don't need to configure the device in AP/STA mode every time after reboot. The network configuration parameters are stored on serial flash and device read these value during boot-up

    Some example programs for CC3200 delete all profiles stored at Serial Flash upon initialization.

    I am not sure if AP or Station mode is stored in Serial Flash for use at next boot-up. So, far I have not seen any mention about that in the documents that I have read.

    - kel

  • Hi Haitham,

    In OTA and HTTP server example we sense the value on header pin P1.2 and configure the device in AP/STA mode. This is the way the example is implemented.
    For file_operation can you share some more details like where the application is getting stuck??? Are you getting any error while executing???

    Regards,
    Ankur

  • Hi Kel,

    In general all the API in in 'ConfigureSimpleLinkToDefaultState()' function used to configure the device in default states saves the configuration on serial flash.
    We will try to capture this information in the documentation.

    Thanks for the feedback.

    Regards,
    Ankur
  • Hi Haitham,

    I am closing this thread, if you have follow up query please open a new thread with link to this one for reference.

    Regards,
    Ankur