Hello there!
The arm Port has a bug, I Noticed that hardware context
switching is broken, To workaround I alwais used
posTaskSleep(1); and task switching worked, but today
I finaly decided to fix it, I Worked in parallel using win32
port for comparing variables and behaivour and arm
emulated (using AXD).
I uesd as base the Arm PID7 adaption I posted some
time ago, as i need it for my cam project :)
So the bug seem to reside in: arch_arm_asm.s
Look for:
p_pos_intContextSwitch
LDR r0,=posCurrentTask_g
LDR r0,[r0]
B _osThreadSwitchTo
And Replace with:
p_pos_intContextSwitch
LDR r0,=posNextTask_g
LDR r0,[r0]
B _osThreadSwitchTo
The problem was that in R0 Jun Li loaded the CURRENT
task and not the Next one , so picos switched alwais
the same task, hanging on the current.
executing a posTaskSeep , made picos enter the "is
any slepeeng tasks there?" question, and so context
switch worked.
also the Demo application made by dennis (the one that
prints out P1 P2 etc etc hanged , now it works well.
Bye ...