My question is regarding good habbits of manipuating IO's.
In the freertos environment I'm toggling output bits as
(relevant code marked with ***)
while(....){
*** IO0CLR = ADDRESS_BUS; // Put address on bus
IO0SET = addr << ADDRESS_OFFSET;
IO0CLR = IOR; // IOR-signal low
value = (IO0PIN >> DATA_OFFSET) & 0xFF; // get low order byte from
data bus
IO0SET = IOR;
*** IO0SET = 1 << ADDRESS_OFFSET;
............................
}
During debugging I see proper CLR intr. execution at the begin of while(){}.
But somewhere in the middle first SET instruction is presuming the bits
are cleared.
But when watching IO register status there seems the bits are no longer
cleared.
Does it has sth to do with debugging, or RTOS ( which in fact doesn't
play with bits at all anywhere else)?