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.

CC3220MODA: HIB_RETENTION_REGISTER details

Part Number: CC3220MODA
Other Parts Discussed in Thread: CC3200

Hi,

I'm trying to store something before entering hibernation and I was able to find an example.

The function setHibRetentionReg is used in demo code and this function accesses HIB_RETENTION_REGISTER which is 0x4402FC20.

It looks like this 4Bytes register can retain value during hibernation but I can't find any reference about this.

I couldn't find any comment from datasheet, reference manual, PMF wiki-ti..

Can I have some details about that? (or link)

Thanks,

  • Hi YunJung,

    The CC3220 retains 2 x 32-bit registers in hibernate mode. You can find details in the CC3220 Technical Reference Manual.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks for the reply.

    The reason why I said that I couldn't find details is that (Reference Manual) and (WiKi-TI) explains there are 2X32bit registers

    while demo code accesses only 1 32bit register. There is no possibility to access more than 1X32bit in that code.

    And WiKi-TI explains that these 2X32bit registers are not available if the RTC is enabled but it seems working well on my test.

    So I thought that demo code and reference manual describes different things.

    Can I have more specific info for below things?

    1. Is 2X32bit registers available regardless of RTC? If it is not available with RTC, does that mean retention register uses RTC count register?
    2. Does the demo code implement these retention registers? If so, any reason that demo code use only 1 register? (CC3220 power_measurement demo, platform.c, setHibRetentionReg function)
    3. The ref manual states PRCMOCRRegisterWrite/Read functions to use 2X32bit registers which are not used in the demo. Is there clear indication of using retention registers?

    Regards,

    Yun

  • One more thing I have, the function below (from demo) has uint32_t parameter but actually I was able to store only 1 byte.

    void setHibRetentionReg(uint32_t val)

    Mem size of below address is 1 byte.
    #define HIB_RETENTION_REGISTER          (0x4402FC20)
    Am I looking at wrong example?
    Thanks!
  • Update

    The way that demo code does can only have 1 byte access and PRCMOCRRegisterRead/Write functions can use 2X32bit registers as described in reference manual.

    But it is still weird that retention register(index 0) can't retain bit.31, bit.1 and bit.2. (Write 0xFFFFFFFF -> get 0x7FFFFFF9)

    (Index 1 register is fine)

    In the wiki, 2X32bit registers are not available if RTC is enabled but actually it looks working regardless of the RTC.

    So clarifying two things will be perfect.

    1. bit 1,2 and 31 problem as mentioned above
    2. Is it ok to use 2X32bit registers with RTC. (works well in my test, wiki page said not available)

  • Hi Yun,

    Do you have the RTC enabled as a wake source?

    CC3200 used the power management framework, while CC3220 replaces that with the TI Drivers power policy, although the underlying driverlib is similar. Unfortunately, it looks like there are some confusing references left over. I will clarify and request fixes to the documentation.

    Based on the description for PRCMOCRRegisterWrite (in source/ti/devices/cc32xx/driverlib/prcm.c), there should be bits reserved for the user application even when using the RTC as a wake source. The remaining register is not inaccessible, just may be overwritten.

    Best regards,

    Sarah

  • Hi Sarah,

    I tested retention registers with RTC again and I was able to see it is working as stated in the code (prcm.c).

    (14bits are available with RTC)

    It was my mistake that I said 2X32bit was working regardless of the RTC. 

    When I set a current timestamp, register 1 and upper 2bytes of register 0 was overwritten.

    Clear! Thanks.

    Regards,

    Yun