Wire library bug - Crosstalk between peripherals
i have run real strange bug (feature?) in wire library. right now, i'm still in process of trying define i'm running into, curious if else has run this.
i have running 'radar' setup couple of pwm channels sweeping servo , vl53l0x sensor controlled i2c on pins 20 , 21. in separate sketches, send serial data out processing sketch or send data ssd1131 oled display through spi. both sketches share sweep , sensor routines.
the sketch oled display, connected spi port, run hours on end (the radar has 12 s sweep cycle). @ sometime (when not being watched) due locks , display goes blank. lockup cannot cleared reset button, have power cycle unit. can intermittent i2c connection cause lockup? (the sensor rotates , forth. have tried play sensor wiring trigger fault have not been successful). cound buffer overflow problem doesn't occur 1 incident result of multiple misses?
the second manifestation of bug stranger starts leave trail. other sketch sends sensor data out serial port processing. being lazy, leave oled display connected spi port though sketch doesn't use @ (this part of problem). after thirty minutes of running, blank oled comes life trash on screen... , system locks up. oled display library not loaded in sketch, issue twi subsystem spilling on
spi port, causing spit out random garbage.
while radar running, vl53l0x set continuous mode. pulls gpio line low when data ready read. due read signal , triggers interrupt. isr reads sensor data, updates servo position, sends data out serial port, , resets sensor interrupt. rinse , repeat. put in diagnostic led lights when isr entered , extinguished in main program loop. have yet see case unit locked , led lit, not excluding it.
something else mention vl53l0x data output asynchronous. specify timing budget , sensor takes budget mere guideline. time between successive data reads varies depending upon whether object in range (longer) or out of range (shorter). in both sketches, diagnostic led blinks showing i'm exiting isr time spare. while cycling, vl530l0x i2c traffic consists of 2 byte read , single byte write. read/write routines not have error checking incorporated, may needed in case.
again, right i'm trying define problem.
i have running 'radar' setup couple of pwm channels sweeping servo , vl53l0x sensor controlled i2c on pins 20 , 21. in separate sketches, send serial data out processing sketch or send data ssd1131 oled display through spi. both sketches share sweep , sensor routines.
the sketch oled display, connected spi port, run hours on end (the radar has 12 s sweep cycle). @ sometime (when not being watched) due locks , display goes blank. lockup cannot cleared reset button, have power cycle unit. can intermittent i2c connection cause lockup? (the sensor rotates , forth. have tried play sensor wiring trigger fault have not been successful). cound buffer overflow problem doesn't occur 1 incident result of multiple misses?
the second manifestation of bug stranger starts leave trail. other sketch sends sensor data out serial port processing. being lazy, leave oled display connected spi port though sketch doesn't use @ (this part of problem). after thirty minutes of running, blank oled comes life trash on screen... , system locks up. oled display library not loaded in sketch, issue twi subsystem spilling on
spi port, causing spit out random garbage.
while radar running, vl53l0x set continuous mode. pulls gpio line low when data ready read. due read signal , triggers interrupt. isr reads sensor data, updates servo position, sends data out serial port, , resets sensor interrupt. rinse , repeat. put in diagnostic led lights when isr entered , extinguished in main program loop. have yet see case unit locked , led lit, not excluding it.
something else mention vl53l0x data output asynchronous. specify timing budget , sensor takes budget mere guideline. time between successive data reads varies depending upon whether object in range (longer) or out of range (shorter). in both sketches, diagnostic led blinks showing i'm exiting isr time spare. while cycling, vl530l0x i2c traffic consists of 2 byte read , single byte write. read/write routines not have error checking incorporated, may needed in case.
again, right i'm trying define problem.
let's start doubt library has major bug that. i'm not familiar due.
couple of notes, if "lock up" can reset power cycle problem isn't in arduino in screen. might have entered incorrect mode when bug happened.
if spi isn't initialized spi pins floating. yeah, can pick sorts of random noise.
and radar stuff isn't interrupt.

couple of notes, if "lock up" can reset power cycle problem isn't in arduino in screen. might have entered incorrect mode when bug happened.
if spi isn't initialized spi pins floating. yeah, can pick sorts of random noise.
and radar stuff isn't interrupt.
an isr reads sensor data, updates servo position, sends data out serial port, , resets sensor interrupt.is lot isr , think can in loop

Arduino Forum > Using Arduino > Programming Questions > Wire library bug - Crosstalk between peripherals
arduino
Comments
Post a Comment