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?
Calling XC from C gives Resource dependency exception Topic is solved
-
- Member
- Posts: 9
- Joined: Thu Jun 25, 2015 12:14 pm
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
-
- Member
- Posts: 9
- Joined: Thu Jun 25, 2015 12:14 pm
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!