Suddenly can't work, but it can work after just redownload code on CY8C5888FNI-LP214

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

cross mob
MoHo_4705901
Level 1
Level 1
5 sign-ins First reply posted First question asked

Suddenly the CY8C5888FNI-LP214  can't work(can't UART, IO ,MDIO, just have SWD function), even though I tried to power up  several times. But I just download the code for MCU, then it get work normally, I didn't change any setting environment. I have least 2 PCS modules having this problem. So I want to know the root cause urgently.

0 Likes
1 Solution

Hello MoHo.

I checked your schematic.  It looks good!  I couldn't verify the pin numbers as I don't have a datasheet with that part number.  Otherwise, it's okay.

So, if you write to EEPROM (not emEEPROM), there are some house keeping things you need to do.  Otherwise strange things can happen.

Here's an EEPROM thread Len and I (coincidently) contributed to.  There are several good Cypress weblinks that you may find interesting there.
Solved: EEPROM programming - Cypress Developer Community
The 5LP Device Programming Specification (in above link) is a very good source of information for programming FLASH and EEPROM.

And more specifically, a link talking about reading the Die Temperature before writing to EEPROM.
Solved: EEPROM write problem - Cypress Developer Community

I seem to recall, we should not write to EEPROM Row0.  Creator stores some information there.  I haven't found the community discussion on this topic, but it's there somewhere.

Len has provided you with a good method to get into the Debug mode without disturbing the PSoC.

Let us know what you find.

View solution in original post

0 Likes
6 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

I suggest you go through the design checklist:
PSoC 3 and PSoC 5LP Hardware Design Considerations (cypress.com)

Most people do not properly connect Vccd pins, or, other power supply related issues.

There could be s/w bugs.  Re-Flashing sometimes fixes the issue until the bug pops up again.

 

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

MoHo,

How long does it take to 'hang' after a reload of firmware?

As BiBi indicated, you should check the checklist for HW issues.

You said you still have SWD for debugging.   When it hangs, you can Pause the execution of code and see where it stops.

There are other debugging info available like the Stack.

Since a power cycle doesn't seem to fix the 'hang' condition, it's probably related to HW.  

Are you using the PSOC5 EEPROM?

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
MoHo_4705901
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi BiBi&Len

Thanks for your quick feedback.

1. How long does it take to 'hang' after a reload of firmware?

Moky: It become normal, it  don't take to "hang"

2. As BiBi indicated, you should check the checklist for HW issues.

Moky: Yeah, I designed it according to the  hardware consideration, please check the attached  schematic

3. You said you still have SWD for debugging.   When it hangs, you can Pause the execution of code and see where it stops.

Moky: Because it change to normal after re-download  code, so there is no chance to debug with SWD

4. Are you using the PSOC5 EEPROM?

Yeah when initializing the Module(MCU), do store the data to PSOC5 EEPROM

This phenomenon is so strange, will impact the quality of product, so please tell me if you need me to provide any document or information, thanks.

 

 

0 Likes

Moky,

3. You said you still have SWD for debugging.   When it hangs, you can Pause the execution of code and see where it stops.

Moky: Because it change to normal after re-download  code, so there is no chance to debug with SWD

If you still have the programmer/debugger tool still attached to the Target system when this strange behavior occurs, you can force the CPU into debug mode WITHOUT reprogramming.

While the target is running and exhibits the strange behavior, select "Debug/Attach to Running Target ..."

Len_CONSULTRON_0-1619437309305.png

Next select the Debugger device (KitProg, MiniProg3, MiniProg4, etc) with the selection of "Halt taarget on attach".

Len_CONSULTRON_1-1619437425959.png

Once the target SWD acquires the target, it will be in debug mode halted on some code (in C or assembly).   You can now examine where it stopped and place breakpoints at logical places in your project.  Additionally other Debug tools are available including "Call Stack" Local and Global variable watchs and a memory examine window.

Hopefully this helps to find out where the fault is without a reprogram or reset.  

If needed, you can force a reset Len_CONSULTRON_2-1619437717344.png.

Len
"Engineering is an Art. The Art of Compromise."

Hello MoHo.

I checked your schematic.  It looks good!  I couldn't verify the pin numbers as I don't have a datasheet with that part number.  Otherwise, it's okay.

So, if you write to EEPROM (not emEEPROM), there are some house keeping things you need to do.  Otherwise strange things can happen.

Here's an EEPROM thread Len and I (coincidently) contributed to.  There are several good Cypress weblinks that you may find interesting there.
Solved: EEPROM programming - Cypress Developer Community
The 5LP Device Programming Specification (in above link) is a very good source of information for programming FLASH and EEPROM.

And more specifically, a link talking about reading the Die Temperature before writing to EEPROM.
Solved: EEPROM write problem - Cypress Developer Community

I seem to recall, we should not write to EEPROM Row0.  Creator stores some information there.  I haven't found the community discussion on this topic, but it's there somewhere.

Len has provided you with a good method to get into the Debug mode without disturbing the PSoC.

Let us know what you find.

0 Likes
MoHo_4705901
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi BiBi&Len

I learn a lot, so I think I will debug if it happen again, thank you both

 

0 Likes