Hi,
I'm new to TI-RTOS. I'm using version tirtos_simplelink_2_13_00_06 on a CC2650DK. My code used to work fine, however since a few days exceptions occur. In a large project, that uses a lot of memory, this error occurred every time I ran the code:
"Cortex_M3_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.222.0)
Cortex_M3_0: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging"
I copied the code to a smaller project, where at the same positions in code, an exception was thrown instead of the error above. It is always caused by sin / cos function calls but sinf / cosf seem to work. It is also caused when calling the SPI transfer function, sometimes even at an if statement.
I used ROV to get a closer look at the exception, but it didn't really help. Here is the information I got from there:
Decoded exception,
Decoded,Hard Fault: FORCED: BUSFAULT: PRECISERR.Data Access Error. Address = 0xcc007f65
Exception context,
$addr,0x20001ae4
$type,ti.sysbios.family.arm.m3.Hwi.ExcContext
threadType,ti.sysbios.BIOS.ThreadType_Task
threadHandle,0x20002838
threadStack,0x20001520
threadStackSize,2048
r0,0xc008001
r1,0xffffffa1
r2,0x0
r3,0xdd008001
r4,0xffffff54
r5,0xe147ae15
r6,0xcc008001
r7,0xffffff64
r8,0xffffffff
r9,0xffffffff
r10,0xffffffff
r11,0xffffffff
r12,0x2
sp,0x20001bb0
lr,0x3445
pc,0x8d90
psr,0x21000000
ICSR,0x400803
MMFSR,0x0
BFSR,0x82
UFSR,0x0
HFSR,0x40000000
DFSR,0x1
MMAR,0xcc007f65
BFAR,0xcc007f65
AFSR,0x0
Exception call stack,
0 <symbol is not available>,PC = 0x00008D90 FP = 0x20001BB0
No matter where the exception is caused, the Data Access Error address stays the same. PC points into $Tramp$TT$L$PI$$ti_sysbios_family_arm_m3_Hwi_construct(). $addr seems to change depending on where the error was caused, but I can't really make sense of where it points to.
The exception also occurs when the code runs without debugging. I already tried increasing stack and heap for both the BIOS and the task, but that didn't help.
I can't remember changing anything besides implementing a new function, which currently isn't in use, since the code worked.
I could replace all sin / cos with sinf / cosf, but I need to use SPI. So how can this problem be solved? Is there a way I can find the exact cause of the exception?
Thanks in advance and best regards,
Manuel