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.

C6457 MPC bug?

Received the following question from customer, Aspect Sofware:

"Well, I have an issue with turning on MPC (Memory Protection Controller) on the C6457 running Bios 5 (I have all the latest & greatest updates via the update manager in CCS).

 I end up getting an exception as soon as I exit main(). It happens before any of my tasks run. In fact, it happens when initializing the CLK module in the BIOS startup stuff. Specifically, it goes out in the CLK_enableTimer() function. This is code that is created through the tcf file. I have not configured any CLK objects. The default setup is in place. I have attached my project (in fact, it’s a sample project from TI that runs 3 tasks under BIOS – all I did was turn on MPC). Specifically, in BIOS_init (see tskcfg.s62 generated file) the CLK_init call ends up calling CLK_enableTimer which runs with an illegal memory access (at location 0x 2AC0008).

Here’s the Exceptions from the system LOG:

,0,,TSK: ready TSK_idle (0xe1000c0c)

,1,,TSK: ready task0 (0xe1000c6c)

,2,,TSK: ready task1 (0xe1000ccc)

,3,,TSK: ready task2 (0xe1000d2c)

,4,,EXC_exceptionHandler: EFR=0x40000000

,5,,  NRP=0x807b74

,6,,  mode=supervisor

,7,,External exception:

,8,,DMC:

,9,,MPC exception @0x2ac0008

,10,,  MPFSR=0x120

,11,,  Faulted ID=0x1

,12,,  Supervisor Read violation

,13,,SYS abort called with message 'Run-time exception detected, aborting ...'

We end up in UTL_halt() after this happens.

I encountered the following statement from a ti support forum (http://e2e.ti.com/support/embedded/bios/f/355/t/101613.aspx#356897):

“James,

The address 0x2AC0008 is coming from the function CLK_enableTimer which power enables the timer for TCI6482 devices.  It looks like that isn't needed for your DM648 device.  What you can do to try to get around this problem is to define this exact function in a *.c file, make it an empty function and included as part of your project.  This should override the one defined in the BIOS library.

Judah'

This solution works for me as well. I tracked things down and the same assumption is being made in the tcf includes for the C6457 as for the DM648. This seems like an obvious bug in the tcf build environment where chips are being configured as equivalent to other chips, when obviously they are not. In this case the assumption makes it impossible to turn the MPC on as some of the auto-generated code from the tcf process violates memory requirements associated with the MPC.

 You’ll notice in the attached project’s tsk.c file there is a commented out function: CLK_enableTimer(). If you uncomment this then no exception happens and everything works fine (from what I can see).

Any idea when TI will release a fix for this (If they have, could you please point me to the specific release & package where it was fixed for the C6457)? I really don’t care to override an operating system function (essentially deleting it from the binary) as a fix. Seem like this could be fraught with other issues.

Task2.zip