We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am trying to create a signal that will raise an input pin, hold it high for a certain amount of time and then lower it, whenever the CPU writes to a certain SFR. Here is my signal:
signal void p_delay(void){ while(1){ wwatch(OUTREG); PORT1I |= 0x02; swatch(0.00009); PORT1I &= ~0x02; } }
In the target program, I poll the input pin and write to the SFR only if it is low, like so:
if(P1 & 0x02 == 0) OUTREG = buff[i];
Before running the simulation, I start the signal p_delay(), along with several other signals simulating interrupts.
However, when my target program actually writes to OUTREG, I get a bunch of
p_delay() error 99: signal() already active
errors. OUTREG is setup in the ISD51.a51 file correctly, so I know that is not the problem. Any ideas on what is going on here?
are you really starting p_delay only once?
Can it be that you scripts try to start it multiple times?