This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

executing some debug/simulation functions when certain project function starts

I have function that reads status from GPIO port and stores it in local variable and then return that value.

unsigned int ulStatusRead(void)
{
    unsigned int ulStatus;
    ulStatus = readPort(PORTx);
    return ulStatus;
}

I need to write signal function that changes PORTx pins to some value when it is about to be read by ulStatusRead function so that ulStatus variable contains this value.

I tried the following, but without success:

signal void status(void)
{
    rwatch(ulStatusRead);
    PORTx = someValue;
}

I don't want to watch reads from PORTx as it is read in another locations.

Any help please ?