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.

TMS320F28388D: E_hardFault when using Timer on F2838D CM core

Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSBIOS, C2000WARE

Tool/software:

Hello,

We are trying to activate Hardware Timers (so-called CPU Timers) on the F2838D board, CM core. They work fine on the C28 core, but fail on the CM core.

We are running SysBios 6.83.00.18, XDCTools 3.61.02.27, and C2000Ware_3_04_00_00 (for driverlib).

In baremetal, through driverlib and without pulling up sysbios, it does seem to work. However, as soon as we try to run a Timer through SysBios and using the ti.sysbios.family.arm.f2838x.Timer module, we immediately run into the following:

ti.sysbios.family.arm.m3.Hwi: line 1166: E_hardFault: FORCED

ti.sysbios.family.arm.m3.Hwi: line 1247: E_busFault: PRECISERR: Immediate Bus Fault, exact addr known, address: ffffffff

Exception occurred in background thread at PC = 0x0020349a

Followed by a dump of the registers R0-R15, PSR, ICSR, MMFSR, BFSR, UFSR, HFSR, DFSR, MMAR, BFAR, AFSR.

 

The above errors always occur In different variations based on the specific tests we try to run, but the hardFault: FORCED is a constant. Sometimes the busFault is PRECISERR, sometimes it is IMPRECISERR, sometimes the address is 0, sometimes it’s some other known address, sometimes it’s F.

 

So far, we have tried:

-        Configuring a Timer through .cfg

-        Configuring a Timer through C code, before BIOS_start()

-        Configuring a Timer within a BIOS Task

-        Using all modules provided by sysbios: m3.Timer, lm3.Timer, lm4.Timer, f2838x.Timer, hal.Timer (Looking into the Timer.c files, I see that f2838x.Timer is the only one where the correct CPU Timer registers are defined anyway (0x40084000/10/20), so we’ve focused most of our efforts there)

-        Trying any and all combinations of Timer_Params parameters

-        Trying both Timer_construct and Timer_create (although we want to avoid the Heap so we would rely on Timer_construct)

 

Using Timer_create instead of Timer_construct does result in a different behaviour, whereby the params.runMode turns into some garbled value (e.g. “:” or “.”) as soon as it is passed to the “Timer_Instance_init” syscall. However, we do pass the correct runMode to the create function, and indeed it does appear correct at runtime, until it tries to pass it on to the init call. And yes, we have tried to use a static, globally scoped Timer_params variable.

 

I have also tried to configure and use a Clock, with the ti.sysbios.knl.Clock module, but we run into the same type of error. It seems that any attempt to interface sysbios with the CPU Timer peripherals results in a hardfault. Seeing as how they do work in baremetal, I can only surmise that, somehow, sysbios is messing up some initial configuration during either the boot or the pre-boot phase.

I have also tried enabling all Interrupts and enabling all peripherals manually before BIOS_start(), to no avail.

Any help would be appreciated as we are currently completely blocked on this matter.

  • Hi Dylan,

    The expert is currently out of office and will get back to you as soon as they are available. In the meantime, let me try to connect you with another expert.

    Best Regards,

    Aishwarya

  • Hello, thanks for your patience. Are you still experiencing this issue ?Do example projects give you the same error? For example if you import the "swi" example which uses the Clock module, does it work okay or exhibit the same behavior?

    Unfortunately SYS/BIOS is no longer supported, so we're limited in what help we can provide here. If you're able to, we recommend migrating to FreeRTOS instead.

    Whitney