Note switching the tasks around with timer_task first or removing the [combine] stops the exception.
Am I missing something obvious?
Code: Select all
#include <platform.h>
on tile[0] : in port p_enc = XS1_PORT_4C;
[[combinable]]
void timer_task ()
{
timer tmr_test;
unsigned testValue;
tmr_test :> testValue;
while (1)
{
select
{
case tmr_test when timerafter (testValue) :> void:
testValue += 100000000;
break;
}
}
}
[[combinable]]
void port_task ()
{
unsigned port_state;
while(1)
{
select
{
case p_enc when pinsneq(port_state) :> port_state:
break;
}
}
}
int main ( )
{
par
{
on tile[0]:
{
[[combine]]
par
{
port_task ();
timer_task ();
}
}
}
return 0;
}