Other Parts Discussed in Thread: C2000WARE
Hi Champion,
Do we have a flag or regiseter in F280049 can check whether stack overflow?
Thanks!
BR
Joe
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.
Hi Champion,
Do we have a flag or regiseter in F280049 can check whether stack overflow?
Thanks!
BR
Joe
Hi Joe, Stephan,
Chapter 11.5.1 of the F28004x TRM outlines the programming sequence to configure the ERAD Comparator unit (register name: ERAD_HWBP_REGS) as a hardware watchpoint. The one difference between the programming sequence for debug vs application mode is that the global owner should be set to application. Otherwise, the same ERAD registers being configured by the JavaScript file should instead be configured by register writes (like register writes for other C2000 peripherals) in the customer’s application code. This can be configured to generate RTOSINT. Let me know if I clarify on the steps in the programming sequence. The ERAD register header files can also be found in C2000Ware:
Driverlib header: C:\ti\c2000\C2000Ware_1_00_05_00\driverlib\f28004x\driverlib\inc\hw_erad.h
Bit-field device support header: C:\ti\c2000\C2000Ware_1_00_05_00\device_support\f28004x\headers\include\f28004x_erad.h
Regards,
Elizabeth
Here are my results so far:
Setting up stack overflow detection for the application via ERAD works basically the same as via watchpoint in the C28x Analysis Block.
The only problem is the GLBL_OWNER when debugger is connected - it is not possible for the application to gain ownership in this case. GLBL_OWNER stays at 2 (debugger). It can be changed to 0 or 1 (owner=application) via debugger, but not via application code. HWBP_MASK and HWBP_REF can't be set via application if GLBL_OWNER==2. This prevents stack overflow detection via application code when debugger is connected.
This is different to the stack overflow detection via watchpoint in the C28x Analysis Block.