This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28035: Stack Overflow Detection(SPRA820) Failed with 28035

Part Number: TMS320F28035
Other Parts Discussed in Thread: TMS320F28379D

Hello, experts

I am working on stack overflow detection refered to SPRA820 with NON-DSP/BIOS application software, but I cannot get into the RTOSINT. 

First, I configured the EVT0_CNTRL/MASK0/REF0 as the SPRA820 with the function STKOV_initSystemStack(). And I get the return value(0) which means the application software owns the watch point.

Then, I configured the PIE/IER and PIEVECT to configure the RTOSINT_ISR(It will turn on two LED).

I try to make a few functions nested when I give the DSP a command when it is running standalone. 

Finally, the DSP didn't goto the RTOSINT. 

I make a comparison between SPRA820 and SPRU430f on watch point registers.

There is a few conflicts, bit13(what is the function of this bit?), bit12-11, bit4-2. The register value is set to 0x080A in SPRA820, but in this issue reply, a TI engineer said it should be 0x084A(In the issue, the watch point1 is active, so the value for WP1 register is 0x081A in SPRA820, the TI engineer suggest change it to 0x085A). I also tried this configuration, but the result is also unsuccessful.

I wonder if there is a document giving the bits function of the EVTx_CNT(R)L register?

Can anyone help me on this function?

Thanks!

  • The link mentioned above is abnormal, the issue name is "TMS320F28379D: Software watchpoint", and the image shot is below

  • You might find some ideas in the attached code. I've used it in the past with 2812 devices and it used to work. I don't know how is it with newer devices.

    STK_Stack monitor.zip

  • Hi, Mitja

    I read your code it is almost the same as mine.

    I found the problem.

    I change my test method, when the DSP is running, I try to change a value which is under the address range of REF(WP0). The DSP would execute RTOSINT_isr.

    Whatever the EVT0_CNTRL is configured as 0x080A or 0x084A, the result is the same.

    But when I tried the testing method above(call a function occupied lots of stack), the program goes into ILLEGAL_isr. 

    Make a assumption, the function has some illegal operation. But it seems the WP0 is not as fast as ILLEGAL_isr.

    The conclusion is 28035 can realize the stack overflow detection of SPRA820

    But I am still confused about the bit definetion of EVT_CNTRL!

    Thanks for your reply.

  • Regarding the bits in EVT_CNTRL I can not help you.

    Regarding the code execution, I'd examine the stack and RPC value once in ILLEGAL_ISR to determine the source of the trap. It can be that stack overflow triggered RTOSINT and within RTOSINT the ILLEGAL_ISR trap was triggered or ILLEGAL_ISR trap was triggered in the testing function (seems more likely).

  • Those two documents are the only ones I know of that contain definitions on EVTx_CTRL bits. Since you're specifically doing stack overflow detection, I would follow the instructions in SPRA820. SPRU430 seems to be describing some other data logging use case.

    Whitney