- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSOC5 LP MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ..."
Next select the Debugger device (KitProg, MiniProg3, MiniProg4, etc) with the selection of "Halt taarget on attach".
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 .
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi BiBi&Len
I learn a lot, so I think I will debug if it happen again, thank you both