Other Parts Discussed in Thread: EK-TM4C1294XL, SYSBIOS
Tool/software: TI-RTOS
Dear All,
I have simple configuration where one GPIO interrupt occurs when all three SPI ADCs (connected to three different SSIs) have their data ready. The GPIO interrupt is handled via Hwi which reads the data from the ADCs and then posts a Swi. There is also a small Clock function (3us) called every 50ms. The project is based on TI-RTOS Examples >> EK-TM4C1294XL Evaluation Kit >> Driver Examples >> TI Driver Examples >> Empty Examples >> Empty Project.
The Swi is properly posted and executed every time for a few seconds and then it just stops executing, while the ROV always shows it was posted (never shows idle after the fault). That is one scenario. The other is, it runs for a few seconds and then crashes:
ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1207: E_usageFault: INVPC: Invalid PC
Exception occurred in background thread at PC = 0x00000000.
Core 0: Exception occurred in ThreadType_Task.
Task name: {unknown-instance-name}, handle: 0x20002bf4.
Task stack base: 0x20003000.
Task stack size: 0x800.
If I don't use the Clock functions the first scenario never happens, only the second one (in other words, it crashes every time).
The system stack is 1024, so I believe, there is no overflow.
Idle stack is 2048, far above the peak stack usage (I checked in Hwi section of ROV).
LoggerStopMode reports no address (address N/A). Maybe that tells me something...
One interesting thing is that when I post the Swi from the Clock function (which is semantically incorrect), everything works fine. The Swi only blocks when posted from the Hwi, but Hwi continues to run as usual.
I would appreciate any help.
Thanks in advance,
Milan