Hi Tim and Jerson,
I'm working in 2 modes: Live mode and initialization mode. In live mode, the processor will wait endless untill he receives "ST" with instructions from the bus master. In initialization mode, he will look at his inputs and also looks if broadcast information is received on his RS485 bus.
I've tried your suggestions but he's still going into a endless loop when a spike arrived on the bus. It looks like when one bit arrives, the timeout value doesn't count untill a full byte is arrived. He only succeed to release (via timeout) when information flows again on the RS485 bus (and bytes are being received).
It seems that timeout only works when full bytes arrives. If a single bit (spike) arrives on the RS485 network, the debugin timeout statement is not working ...
Does serin2 works different than Debugin (-> timeout bit versus byte)?
Any other suggestions?
Many thanks guys !!
Wilbert




Bookmarks