-
1. Re: A dead loop Bug
bob.marlowe Nov 26, 2015 6:01 AM (in response to 58013216_1409526)There is an infinite loop which is called when a hardware error occurs. Bad address, writing to code, executing protected areas, oscillator start fails and a couple of other reasons, all depend on the project. Best would be, because you are obviously in prototype design phase, to use a kitprog or a miniprog3 to debug your board and check the call stack to see what the cause is.
Bob
-
2. Re: A dead loop Bug
58013216_1409526 Nov 26, 2015 9:19 PM (in response to bob.marlowe)Thanks Bob! Can u show me some guides how can I use "the call stack"?
-
3. Re: A dead loop Bug
58013216_1409526 Nov 26, 2015 11:23 PM (in response to bob.marlowe)My output display as following,
Error 'SWD error NACK' received while attempting to read memory 0xE000EDF0-0xE000EDF4
Error 'SWD error NACK' received while attempting to read all registers
Error: dbg.M0051: The connection to the device has been lost. -
4. Re: A dead loop Bug
bob.marlowe Nov 27, 2015 1:39 AM (in response to 58013216_1409526)Is your program designed for SWD Debugging? cydwr-file->System->Debug Select?
Assuming you have triple-checked your soldering and not forgotten the needed caps for the power lines...
Consider posting your schematics and project here, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.or
Create a support case (top of this page-> Design Support) Cypress will keep those information confidential.
Bob
-
5. Re: A dead loop Bug
58013216_1409526 Nov 29, 2015 8:50 PM (in response to 58013216_1409526)Yes, my program designed for SWD Debugging. Can u tell me all the reasons of entering into the infinite loop, so that I can check my design one by one. -
6. Re: A dead loop Bug
58013216_1409526 Nov 30, 2015 12:36 AM (in response to 58013216_1409526)Hi, Bob. My "Call Stack" 's log as following
Level Function
0 IntDefaultHandler()
1 <signal handler called>()
2 ClockSetup()
3 GetEvent()
4 GetSystemStatus()
5 main()
I found "ClockSetup()" appear almost every "Call Stack". Why "ClockSetup()" appear? I don't call this application.
-
7. Re: A dead loop Bug
bob.marlowe Nov 30, 2015 3:50 AM (in response to 58013216_1409526)To keep this discussion shorter, can you post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. Some info about clock generation (Xtal?) can help. Call stack looks like a required clock does not start.Bob
-
8. Re: A dead loop Bug
58013216_1409526 Nov 30, 2015 4:59 AM (in response to 58013216_1409526)Hi, Bob. Attachment is my project, thanks very much for reviewing!
-
Ebrush.cywrk_.Archive01.zip 540.9 K
-
-
9. Re: A dead loop Bug
bob.marlowe Nov 30, 2015 6:46 AM (in response to 58013216_1409526)You use a BLE chip, but as for now you do not use the radio. I would suggest that your problem might have to do with the 24MHz crystal. Since you do not use it, try to remove it from the high-speed clock definitions (only) and see if something changes.
Bob
-
10. Re: A dead loop Bug
bob.marlowe Dec 1, 2015 3:13 AM (in response to 58013216_1409526)Some additional info:
Is Pin P2[3] unconnected (floating) and not connected to GND or Vcc
You get an undefined "abs" because you did not #include stdlib.h which will reveal two other errors.
OpAmp property should be set to "Internal only"
Bob
-
11. Re: A dead loop Bug
58013216_1409526 Nov 30, 2015 10:51 PM (in response to bob.marlowe)Thanks Bob! P2[3] is used as OpAmp's Output pin and I configed the OpAmp gain through it. So I set OpAmp as "Output to Pin" -
12. Re: A dead loop Bug
58013216_1409526 Nov 30, 2015 10:55 PM (in response to bob.marlowe)Do u mean that I should disable the "ECO" clock in lable "High Frequency Clocks" ? -