cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 6

ms360
New Contributor

Hi!

I'm trying to use the backup registers (BREG) on PSOC6/CY8CPROTO-062-4343W to set a value before rebooting. 

Documentation on this topic is either elusive, or light. 

I started here in section 3.3.5 - https://www.cypress.com/file/385936/download 

I found a declaration of a struct BACKUP_V1_Type, which contains 64 bytes of BREG in cyip_backup.h.
There's no detail how to use it tho. Doesn't look like it contains register addresses at all, and just a data structure. 

I found a register address for BREG on another PSOC platform in a technical reference manual, but it is not retaining any information when I use CY_SET_REG32 and CY_GET_REG32. Can someone point me to the information? Maybe the TRM for the platform I'm using? 

Thanks!

0 Likes
1 Solution
Raj_JC
Moderator
Moderator

Hi @ms360,

BACKUP registers retain their contents even when the main supply (VDDD) is off as long as the backup supply (VBACKUP) is present. BACKUP registers can also be used to store information that must be retained when the device enters Hibernate mode.

So to test the retention of the BACKUP registers I entered into hibernate and verified that BACKUP_BREG0 at Address: 0x40271000 retains the memory after entering and coming out of the hibernate mode.

The address for the backup registers is available in the PSoC 6 MCU: CY8C62x6, CY8C62x7 Registers TRM.

As mentioned earlier if you turn off the supply or reset the device every stored data will be lost. At least VBACKUP should be available for the backup domain.

Please, let us know if further clarification is required.

Thank you

Best Regards

Raj Chaudhari

View solution in original post

0 Likes
2 Replies
Raj_JC
Moderator
Moderator

Hi @ms360,

BACKUP registers retain their contents even when the main supply (VDDD) is off as long as the backup supply (VBACKUP) is present. BACKUP registers can also be used to store information that must be retained when the device enters Hibernate mode.

So to test the retention of the BACKUP registers I entered into hibernate and verified that BACKUP_BREG0 at Address: 0x40271000 retains the memory after entering and coming out of the hibernate mode.

The address for the backup registers is available in the PSoC 6 MCU: CY8C62x6, CY8C62x7 Registers TRM.

As mentioned earlier if you turn off the supply or reset the device every stored data will be lost. At least VBACKUP should be available for the backup domain.

Please, let us know if further clarification is required.

Thank you

Best Regards

Raj Chaudhari

View solution in original post

0 Likes
ms360
New Contributor

Thanks Raj!

I have it working in debug mode, the value is retained if I tell the debugger to reset.
When I try it standalone, and hit the reset button on CY8CPROTO-062-4343W, the value is not retained. 

VBACKUP is connected and measures 3.3V. Does this not work with a hard reset? 


0 Likes
Top labels