Our Application is the High Voltage side. So we added some protecting TVS diodes and Resistors only,
We are using CS+ for CA,CX Software.
The program can be downloaded to the MCU and it runs also. but after some use, it goes on one memory location,
We have redesigned our PCB, In our old PCB, the same program is still working properly.
We redefined some data segments as below.
MEMORY SELF_RAM : (0FEF00H, 00409H)
MEMORY RAM : (0FF30AH,00AF6H)
MEMORY RAM_SADDR : (0ffE00H,000FFH)
Our Memory Model type is Small Model(Code 64Bytes, Data 64Bytes)
Some times Stack Pointer stops at 0x1000 Location and some times it stops at 0xFFFF location.
Help me solve the problem. Thanks in Advance.
Good day, Unobtanium! How are things going for you? Do you have any progress on this? I hope you could wait for responses from experts regarding your inquiry. For the mean time, I found threads that might be useful to you. renesasrulz.com/.../locate-stack-start-and-end-address renesasrulz.com/.../stack-pointer-set-start-end-address renesasrulz.com/.../how-to-catch-value-of-sp-stack-pointer I hope that will help you a little. Best regards, Sai RenesasRulz Forum Moderator https://renesasrulz.com/ https://academy.renesas.com/ en-us.knowledgebase.renesas.com/
In reply to Sai:
Thank you for your reply. any of these does not solve my problem. I can wait but not for much time. we have to do this faster as our customers are facing problems.
In reply to Unobtanium:
From your information it is not possible to find the reason for the problem.
You said you redesigned the hardware. I assume you added some new functionality.
You say the old software is still working fine. So the software for the new added functionality causes the problems.
You mention the stack pointer is corrupted. It looks like the new software causes a memory corruption or you have a stack overflow modifying other data. It could be for example that with the new software you get bigger function nesting or interrupt nesting. This would require a bigger stack. If this is not provided the stack will overwrite data or data can modify the stack contents.
It may also that memory access via pointers (e.g. for buffers) causes problems if the pointer exceeds the buffer size.
When you use the debugger the stack size is different as the debugger requires additional bytes on the stack and the addresses cannot be compared directly.
In reply to FrankL: