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.

RTOS/TM4C1294NCPDT: ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I am using TI-RTOS for TM4C1294 microcontroller.

Software uses hardware interrupt for SPI and UART with SWI, USB communication and 4 timers(1sec,250ms,100ms, 1ms).

Added web server functionality to project using TI-RTOS NDK. Webserver works by itself but with my current application code it seem to have some issue.

If I block majority of application code from running (blocking idle loop) then web-server works just fine.

Tried increasing stack for stack to 0x10000 just to see if stack overflowing somehow but did not help.  Please see the error below.

Look like to me I have some sort of race condition or priority conflict to assess resources.   Please see the error below.

[CORTEX_M4_0] Starting the FatSD USB Copy example
Using MAC address in flash
Service Status: DHCPC    : Enabled  :          : 000
Service Status: HTTP     : Enabled  :          : 000
Service Status: DHCPC    : Enabled  : Running  : 000
ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
ti.sysbios.family.arm.m3.Hwi: line 1172: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: 20202024
Exception occurred in background thread at PC = 0x0004b552.
Core 0: Exception occurred in ThreadType_Swi.
Swi name: {unknown-instance-name}, handle: 0x20027be0.
Swi stack base: 0x20016f30.
Swi stack size: 0x10000.
R0 = 0x200128d4  R8  = 0x00000000
R1 = 0x00000000  R9  = 0x00000000
R2 = 0x20027f28  R10 = 0x00000000
R3 = 0x20202020  R11 = 0xffffffff
R4 = 0x200128d4  R12 = 0x000498b1
R5 = 0x000003e7  SP(R13) = 0x20026ea0
R6 = 0x00000003  LR(R14) = 0x00041827
R7 = 0x200128e6  PC(R15) = 0x0004b552
PSR = 0x41000000
ICSR = 0x00423803
MMFSR = 0x00
BFSR = 0x82
UFSR = 0x0000
HFSR = 0x40000000
DFSR = 0x00000001
MMAR = 0x20202024
BFAR = 0x20202024
AFSR = 0x00000000
Terminating execution...

  • Hi Tushar,
    Can you bring up ROV and look at Task -> Detailed to check the task stacks?
    Best regards,
    Janet
  • Here is the screen shot.

    Thanks for direction. I had Idle stack over-flowing. It was set to 512. I increased to 2048 and It seems to work fine for 30 second and got anther hard fault. But this time for some unknown task at line 5. Here is screen shot and error.

    Starting the FatSD USB Copy example
    Using MAC address in flash
    Service Status: DHCPC    : Enabled  :          : 000
    Service Status: HTTP     : Enabled  :          : 000
    Service Status: DHCPC    : Enabled  : Running  : 000
    Network Added: If-1:10.40.149.66
    Service Status: DHCPC    : Enabled  : Running  : 017
    uld not allocate memory.
    00014.155 out of memory: handle=0x0, size=536946436
    00014.155 SBNew: Buffer OOM
    00047.100 TcpTimeoutRexmt: Retransmit Timeout
    ti.sysbios.family.arm.m3.Hwi: line 1095: E_hardFault: FORCED
    ti.sysbios.family.arm.m3.Hwi: line 1172: E_busFault: IMPRECISERR: Delayed Bus Fault, exact addr unknown, address: e000ed38
    Exception occurred in background thread at PC = 0x0002efb0.
    Core 0: Exception occurred in ThreadType_Task.
    Task name: {unknown-instance-name}, handle: 0x20028110.
    Task stack base: 0x200131a0.
    Task stack size: 0x800.
    R0 = 0x00000000  R8  = 0xffffffff
    R1 = 0x00000000  R9  = 0xffffffff
    R2 = 0x0004ec21  R10 = 0xffffffff
    R3 = 0x0002760d  R11 = 0xffffffff
    R4 = 0x00000001  R12 = 0x00000007
    R5 = 0x00027614  SP(R13) = 0x20013960
    R6 = 0x0005bf18  LR(R14) = 0x00027b67
    R7 = 0x0005bf10  PC(R15) = 0x0002efb0
    PSR = 0x01000000
    ICSR = 0x00423803
    MMFSR = 0x00
    BFSR = 0x04
    UFSR = 0x0000
    HFSR = 0x40000000
    DFSR = 0x00000001
    MMAR = 0xe000ed34
    BFAR = 0xe000ed38
    AFSR = 0x00000000
    Terminating execution...

  • Hi Tushar,
    It looks like you have Ethernet Logging enabled. That may be the problem, since the version of UIA shipped with TI-RTOS for Tiva has bugs in the Ethernet transport. Can you change the LoggingSetup.loggerType to LoggerType_STOPMODE, and remove references to LoggerRunMode and ti.uia.runtime.ServiceMgr from your .cfg file?
    The task that you see in ROV with the red box is probably a task that has not yet been constructed, judging by its stack size of 0. This is not a problem.
    Best regards,
    Janet
  • Thanks Janet. I found ti.uia.runtime.ServiceMgr was used but I did not find anything for LoggingSetup.loggerType and references to LoggerRunMode.

    I removed below line and it worked with out any problem.

    //var ServiceMgr = xdc.useModule('ti.uia.runtime.ServiceMgr');

    Thanks for your help. For curiosity what lead you to that(ServiceMgr) conclusion ?

  • Hi Tushar,
    I'm not sure why you would have ServiceMgr in the .cfg file. Did you use the GUI configuration tool? I'm glad to hear it's working now.
    Best regards,
    Janet
  • No I used configuration (cfg) file from the example TIRTOS_httpServer and transfer my application to it.