Hi again Simon
Can you tell me more about under what circumstances you might get, or do see a
timeout?
Im not sure I can see how there could be a timeout in the inner part of the
loop (ie inside the while (!Timeout && remaining && (bcm2835_peri_read(status)
& BCM2835_BSC_S_TXD ))) unless the chip itself was broken?
So: do you only see the hang in the outer loop (ie after all the data has been
queued, and remaining is 0)? Or in the inner loop too?
Also, could you pls send the diff as a _unified_ diff or a _context_ diff,
suitable fo use by patch?
Cheers.
On Wednesday, 7 June 2023 13:37:31 AEST Simon Peacock wrote:
> The diff I've sent is rock solid. I've been testing most of the
> afternoon, not a single issue so far. I've seen a few warnings of I2C
> timeout, but without consequence.
>
> My only concern is in applications other than mine. You might be slightly
> better informed than I in this respect. I haven't necessarily thought thru
> all the possible consequences.
> Usually I would have a hardware timer that can be used. SYSTICK for
> example, this gets rid of CPU clock dependencies and I can failsafe at 10ms
> or 100ms for example, which would be well beyond normal operation.
>
> Simon