Other Parts Discussed in Thread: SYSBIOS
Hi,
I have a task function which does a Semaphore_pend() and a Clock Swi handler which does a Semaphore_post() as follows:
void clock_isr()
{
Semaphore_post(sem);
}
void task_func()
{
while(1) {
Semaphore_pend(sem, BIOS_WAIT_FOREVER);
}
}
This works fine. When I use the debugger, I see that Semaphore_post() and Semaphore_pend() are called alternatively.
Now, I change my code so that instead of having the Semaphore_pend() in the task function directly, I have it in some other function called by the task function as follows:
void clock_isr()
{
Semaphore_post(sem);
}
void test()
{
while(1) {
Semaphore_pend(sem, BIOS_WAIT_FOREVER);
}
}
void task_func()
{
test();
}
In this case, I get the following data abort error:
ndle: 0x8001fb68.
Swi stack base: 0x8001d2c8.
Swi stack size: 0x2000.
R0 = 0x8001fb98 R8 = 0x8001d024
R1 = 0x00000000 R9 = 0x8001d238
R2 = 0x6000011f R10 = 0x00000006
R3 = 0x80019260 R11 = 0x8001d020
R4 = 0x00000000 R12 = 0x00000000
R5 = 0x00000000 SP(R13) = 0x8001f1c8
R6 = 0x00000001 LR(R14) = 0x8000b070
R7 = 0x8001fbb8 PC(R15) = 0x8000ab28
PSR = 0xa000019f
ti.sysbios.family.arm.exc.Exception: line 176: E_dataAbort: pc = 0x8000ab28, lr = 0x8000b070.
xdc.runtime.Error.raise: terminating execution
Can anyone point out why this is happening ?
Thanks !

