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.

TMS570LS0432 _undefined istruction triggered entering into interrupt routine

Other Parts Discussed in Thread: TMS570LS0432

Hi all,

I am using the TMS570LS0432 evaluation board. I am trying to use the SCI serial comunication peripheral in interrupt mode, but I have a problem when the interrup

routine sciHighLevelInterrupt is triggered.

Entering in this routine a precompiled instruction (FMXR) is executed, causing a jump to the  _undefined instruction into the Interrupt vector routine.

The execution remain there in a infinite loop because the undefine handler is disabled. 

I read in a forum thread that another guy had the same problem but with another processor type (TMS570LS2016).

The Ti support analysis and the relevant suggestion is reported below in red:

The problem ending up in _undefined or _prefetchAbort is,

that you use a library which supports the device floating-point (FPU),

but your code does not enable the FPU.

At the beginning of an interrupt routine a write to the FPU happens,

which causes the _undefined or _prefetchAbort,

if the FPU is disabled The easiest way to fix the issue

is to enable the FPU by calling the

following function at the beginning of _c_int00() in sys_startup..

;-------------------------------------------------------------------------------

; Enable VFP Unit

.def _coreEnableVfp_

.asmfunc

_coreEnableVfp_

mrc p15, #0x00, r0, c1, c0, #0x02

orr r0, r0, #0xF00000

mcr p15, #0x00, r0, c1, c0, #0x02

mov r0, #0x40000000

fmxr fpexc, r0

bx lr

.endasmfunc

 I am using the --Float_Support VFPv3D16 and I tryed to insert the suggested routine into my source code but the problem is still present.

When the CPU executes the fmxr fpexc, r0  instruction , the _undefined is triggered again.

Please could I have any further suggestion to fix my Issue ?

Thanks in advance for your support.

Best regards

Claudio

  • Hello Claudio,

    Most likely your issue is with using the floating point support. The TMS570LS0432 does not support floating point so you will need to use rtsv7R4_T_be_eabi.lib not the floating point support VFPv3D16 file. You can update this for your CCS project by right clicking on the project and selecting Properties-->General and then selecting the non floating point runtime support library from the drop down menu. If the file mentioned above is not listed, type it into the field and it will be auto  generated at the next build time.

  • Hello Chuck,

    I tried your suggestion and now my Sci interrupt routine works well.

    Thanks a lot for your very fast solution.

    Best regards

    Claudio