Help! PSoC62 DeepSleep result in HardFault

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
viking_xie
Level 1
Level 1
First reply posted First question asked Welcome!

I'm usingCY8CKIT-62-WIFI_BT board and PDL v3.1.4.

When wakeup from deep sleep the code at line 2883 of file "cy_syspm.c" will trigger hardfault.

while(0U == _FLD2VAL(IPC_STRUCT_ACQUIRE_SUCCESS, REG_IPC_STRUCT_ACQUIRE(CY_IPC_STRUCT_PTR(CY_IPC_CHAN_DDFT))))

I attached to the running target, I found the wrong value in  struct "cy_device"

cy_device->ipcBase is not 0x40230000 but 0x00000000

cy_device->ipcStructSize is not 0x0020 but 0xFFFF

So the macro "CY_IPC_STRUCT_PTR(CY_IPC_CHAN_DDFT)" result an access to a wrong address.

I moved this macro to the location before __WFI(), see the picture below, it works.

viking_xie_0-1621924520121.png

But I have no idea whether thers is still something wrong.

I don't  why it read a wrong values from flash (cy_device pointed a area in flash).

I dumped the flash by programmer, I found the flash data is correct.

Who can tell me what's going on.

 

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @viking_xie

Can you please check these discussions and let me know if it helps - 

deep sleep being blocked by IPC 

Updating PDL syspm Driver for Hard Fault Problem – KBA229335

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
2 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @viking_xie

Can you please check these discussions and let me know if it helps - 

deep sleep being blocked by IPC 

Updating PDL syspm Driver for Hard Fault Problem – KBA229335

Thanks and Regards,
Rakshith M B
0 Likes

Thanks for reply. The solution your mentianed is the same to mine. I have learned the reason from upper link. Thank you very much.

0 Likes