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.

RTOS/CC3220MODA: Detecting Brownout in CC3220

Genius 3100 points
Part Number: CC3220MODA
Other Parts Discussed in Thread: CC3200,

Tool/software: TI-RTOS

Team,

Is there any way to detect the brownout state of CC3220 through the software ?

I wish to save certain state information of my device (custom values inside my application) into a file, when there is a power outage. I have read about the brownout state and features in CC3220, however did not see any handlers or interfaces for the developer to do some programming.

Appreciate your support

Regards,

Zac

  • Hi Zac,

    I think there is not API for this suppose. Situation with CC3220 should be same as older CC3200: e2e.ti.com/.../556293

    Jan
  • Hi Jan,
    So there is no brown out detector circuit present in CC3220MODA?
    As per spec Its brownout voltage is 2.1V

    Regards,
    Zac
  • Hi Zac,

    In CC3220 is brownout detection circuits, but there is no user API for brownout detection (as is described at Shlomis answer in CC3200 link above).

    Yes, according data-sheet spec is Vbrownout 2.1V (SWAS035A chapter 4.8).

    Jan
  • Hi Jan,

    What does the brownout detection circuit do ? Does it perform automatic writes during a shutdown ? If so, what are the information written? Shlomis answer is about detecting a brownout reset after a reboot, however I am looking at how the system behaves during a brownout. Appreciate if you explain more about it.

    Thanks
    Zac
  • Hi,

    I haven't more information how brownout detection circuit works internally. Because I didn't search such kind of information. I know only information from datasheet.

    But I am almost 100% sure, when brownout is detected there is no write into flash (XIP of sFlash), because there is not enough time and energy do that. Do flash write operation in moment when you will have not enough energy is very bad idea.

    Jan
  • Hi Jan,
    I am not sure if your statement would be valid. As per datasheet, during brownout i.e when the voltage drops below 2.1V, the system will shut down most of its modules. This will extend the time for flash write/erase. Hence there could be a write or erase activity during a brownout, though it should be completed before the voltage reaches flash chip's minimum. I hope the flash memory used in CC3220MODA is Macronix MX25R3235FM1IL0 which has a minimum voltage of 1.65V.

    The question is, whether CC3220MODA has some inbuilt mechanism to avoid file corruption during a power failure ? or can the device automatically saves its state during a power failure ?

    Thanks
    Zac
  • Hi Zac,

    Please see www.ti.com/lit/an/swra515a/swra515a.pdf chapter 1.4.

    Jan
  • Hi Jan,

    I have already gone through these manuals. As mentioned earlier I am using CC3220MODA which uses Macronix MX25R3235FM1IL0 and has a minimum voltage of 1.65V. So technically the write operation can happen without corruption until 1.65V. However it is not very clear from the manuals on how the system behaves during a power outage. i.e since I have a range from 2.1V (brownout) to 1.65V (Vflash min), can the system ensures that the file won't be corrupted under most circumstances ?
    My scenario is, I am writing the some state information to the flash during a power outage and it seems to fail at time i.e the file gets corrupted intermittently. I understand that a bulk capacitor might resolve this, however is there any other easy way?

    Regards,
    Zac
  • Hi Zac,

    I think you should understand brownout and blackout detection as protection of unpredictable behaviour of MCU in case of power outage. Brownout detection does not guarantee that your flash will not be corrupted in case of power outage during sFlash write operation.

    I think best way how prevent sFLash corruption is detect power outage by MCU as is described at swra515a.

    Jan
  • Thanks Jan.
  • Hi Zac,

    As mentioned by Jan, there is no way for your application to detect that a brownout is occurring through software. Even if you could detect a brownout saving data by writing to flash is risky since this can result in flash corruption. You need to follow the provided guidance in swra515a to protect your serial flash from corruption in the case of a brownout.

    Regards,
    Michael