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