tobyjaffey/bus-ninja

hw_led auto-fading interferes with bus-querying

Closed this issue · 1 comments

Having some fairly arbitrary process running in the background possibly without user even knowing about it (for example, Arduino's led pin is apparently not correct) may lead to hard to understand failures and non-deterministic results. For example, it does interfere with SPI querying in my case, see below. With commented out calls to hw_led_* it all works reliably. Suggested fix: remove the hw_led_init() call during startup and hw_led_tick() in ISR.

[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0xE7
READ: 0x0xE7
READ: 0x0xE7
READ: 0x0xE7
READ: 0x0xE7
CS DISABLED
[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0xE0
READ: 0x0x00
READ: 0x0x00
READ: 0x0x00
READ: 0x0x00
CS DISABLED
[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0x0F
READ: 0x0x80
READ: 0x0x00
READ: 0x0x00
READ: 0x0x00
CS DISABLED
[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0xEF
READ: 0x0xFF
READ: 0x0xFF
READ: 0x0xFF
READ: 0x0xFF
CS DISABLED
[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0xF3
READ: 0x0xF3
READ: 0x0xFF
READ: 0x0x9F
READ: 0x0xE0
CS DISABLED
[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0xE7
READ: 0x0xE7
READ: 0x0xE7
READ: 0x0xE7
READ: 0x0xE7
CS DISABLED
[0x10 r:5]
CS ENABLED
WRITE: 0x10
READ: 0x0xFE
READ: 0x0x01
READ: 0x0xFF
READ: 0x0xFF
READ: 0x0x07
CS DISABLED

Merged your change to make it optional. 29c5430