Calling XC from C gives Resource dependency exception Topic is solved

All technical discussions and projects around startKIT
Post Reply
rebb
Member
Posts: 9
Joined: Thu Jun 25, 2015 12:14 pm

Calling XC from C gives Resource dependency exception

Post by rebb »

I have a small XC function which sends bits to 1-bit port in a loop like this:

void sendLSDjTick() {
for(ticks=0;ticks<8;ticks++) {
tmr :> tmr1;
// add delay to t, wait until timer reaches that value
tmr when timerafter (tmr1 + PERIOD) :> void;
x <: 0;
tmr :> tmr1;
// add delay to t, wait until timer reaches that value
tmr when timerafter (tmr1 + PERIOD) :> void;
x <: 1;
}
}

I am calculating samples in C and in every tick length in samples i call sendLSDjTick from my C code.
I am including this header in C file:

#ifndef UIHANDLER_H_
#define UIHANDLER_H_
void sendLSDjTick();
#endif /* UIHANDLER_H_ */

It gives me error, when calling sendLSDjTick:
xrun: Program received signal ET_RESOURCE_DEP, Resource dependency exception.
[Switching to tile[0] core[1]]

Any ideas what causes this? Or is there better way to handle ports from C?


View Solution
rebb
Member
Posts: 9
Joined: Thu Jun 25, 2015 12:14 pm

Post by rebb »

There was probably some shared resource between the cores, so i put the function inside channel_funcs and it works just fine. Thanks for the answer!
Post Reply