| ??? 11/19/07 13:51 Read: times |
#147187 - Stack overflow checking method |
Hi guys,
it's been a long time I didn't have any trouble with the 8051, now here I am again (but I kept reading your posting and have to admire you do a super job). I am having a strange problem - it seems something with the UART interrupt. Simple when returning from the UART interrupt vector in one specific moment it seems the PC is not set to the adress where the program was interrupted. As I said it seems because I can't realy verify it though using C (if you had any idea how to check this please tell me). This fenomen happens only when I have 3 other interrupt sources active and I keep sending/receiving very fast data from the serial port. Anyway I was supposing it is a stack overflow problem. So what I did is at the start of my program I filled the stack area (DATA+IDATA) with constant value, and when the program is returning from the interrupt I check the last few memory values of the IDATA. When I see the constat there I suppose the STACK didn't get sofar, so I suppose it is not a STACK overflow. My question is is such test enough to say I have no stack overflow? The chip is an ASIC based on the 8052 core (with lot of peripherals insid), the SW is an API library which. any ideas are welcome to track down this problem thanx Attila p.s. I read Jan's great advices in the thread http://www.8052.com/forum/read.phtml?id=145008, and also verified the code according shared variables, reetrant functions, etc. but nothing helped sofar. |
| Topic | Author | Date |
| Stack overflow checking method | 01/01/70 00:00 | |
| stack overflow check | 01/01/70 00:00 | |
| KISS - would be nice to have but.. | 01/01/70 00:00 | |
| long interrupts are not taboo... | 01/01/70 00:00 | |
| stack overflow | 01/01/70 00:00 | |
Problem found no stack overflow ... | 01/01/70 00:00 |



