r-map / rmap

rete monitoraggio ambientale partecipativo documentation at https://doc.rmap.cc
https://rmap.cc
52 stars 43 forks source link

firmware: i2c fail #357

Closed pat1 closed 2 years ago

pat1 commented 2 years ago

master board:

#2021-11-23T21:20:00 N: JSON <-- {"B12101":29463,"B13003":46}
#2021-11-23T21:20:00 N: JSON <-- {"B12101":29459,"B13003":46}
#2021-11-23T21:20:00 N: JSON <-- {"B12101":29459,"B13003":46}
#2021-11-23T21:20:00 N: JSON <-- {"B12101":29460,"B13003":47}
#2021-11-23T21:20:00 N: JSON <-- {"B13011":0}
#2021-11-23T21:20:00 N: JSON <-- {"B25192":null,"B25025":null,"B25194":null}
#2021-11-23T21:21:00 N: Next acquisition scheduled at: 21:24:0
#2021-11-23T21:21:00 N: Sensors reading...
#2021-11-23T21:21:00 E: th get... [ FAIL ]
#2021-11-23T21:23:00 N: JSON <-- {"B12101":29459,"B13003":46}
#2021-11-23T21:23:00 N: JSON <-- {"B12101":29459,"B13003":46}
#2021-11-23T21:23:00 N: JSON <-- {"B12101":29459,"B13003":46}
#2021-11-23T21:23:00 N: JSON <-- {"B12101":29460,"B13003":47}
#2021-11-23T21:23:00 N: JSON <-- {"B13011":0}
#2021-11-23T21:23:00 N: JSON <-- {"B25192":null,"B25025":null,"B25194":null}
#2021-11-23T21:24:00 N: Next acquisition scheduled at: 21:27:0
#2021-11-23T21:24:00 N: Sensors reading...
#2021-11-23T21:24:00 E: th get... [ FAIL ]

i2c-th board:

#    372664 : N: T-SMP: 29432
#    372664 : N: T-IST: 29435
#    372664 : N: T-MIN: 29432
#    372664 : N: T-MED: 29433
#    372664 : N: T-MAX: 29435
#    372664 : N: H-SMP: 46
#    372664 : N: H-IST: 46
#    372664 : N: H-MIN: 46
#    372664 : N: H-MED: 46
#    372664 : N: H-MAX: 46
#    372664 : N: R<-
#    375801 : E: hyt2x1 prepare... [ FAIL ]
#    376018 : E: hyt2x1 prepare... [ FAIL ]
#    376432 : N: R->
#    376432 : N: T-SMP: 29434
#    376432 : N: T-IST: 29435
#    376432 : N: T-MIN: 29432
#    376432 : N: T-MED: 29433
#    376432 : N: T-MAX: 29435
#    376432 : N: H-SMP: 46
#    376432 : N: H-IST: 46
#    376432 : N: H-MIN: 46
#    376432 : N: H-MED: 46
#    376432 : N: H-MAX: 46
#    376432 : N: R<-
#    465268 : N: T-SMP: 29428
#    465268 : N: T-IST: 29430
#    465268 : N: T-MIN: 29427
#    465268 : N: T-MED: 29428
#    465268 : N: T-MAX: 29430
#    465268 : N: H-SMP: 46
#    465268 : N: H-IST: 46
#    465268 : N: H-MIN: 46
#    465268 : N: H-MED: 46
#    465268 : N: H-MAX: 46
#    465268 : N: R<-
#    465281 : E: Restart I2C BUS
#    468617 : N: R->
#    468617 : N: T-SMP: 29428
#    468617 : N: T-IST: 29430
#    468617 : N: T-MIN: 29427
#    468617 : N: T-MED: 29428
#    468617 : N: T-MAX: 29430
#    468617 : N: H-SMP: 46
#    468617 : N: H-IST: 46
#    468617 : N: H-MIN: 46
#    468617 : N: H-MED: 46
#    468617 : N: H-MAX: 46
#    468617 : N: R<-
pat1 commented 2 years ago

Using test we get errors! https://github.com/r-map/rmap/tree/master/platformio/test/i2c_multimaster

mar 30 nov 2021, 18:23:54, CET F: Start i2c-multimaster firmware version: 1
mar 30 nov 2021, 18:24:03, CET E: Wire error 5
mar 30 nov 2021, 18:24:05, CET E: Wire error 5
mar 30 nov 2021, 18:24:26, CET E: Wire error 5
mar 30 nov 2021, 18:24:26, CET E: Wire error 5
mar 30 nov 2021, 18:24:42, CET E: Wire error 5
mar 30 nov 2021, 18:25:03, CET E: Wire error 5
mar 30 nov 2021, 18:25:09, CET E: Wire error 5
mar 30 nov 2021, 18:25:16, CET E: Wire error 5
mar 30 nov 2021, 18:25:26, CET E: Wire error 5
mar 30 nov 2021, 18:25:39, CET E: Wire error 5
mar 30 nov 2021, 18:25:53, CET E: Wire error 5
mar 30 nov 2021, 18:25:53, CET E: I2C bus error. Could not clear
mar 30 nov 2021, 18:25:53, CET E: SCL clock line held low
mar 30 nov 2021, 18:25:57, CET E: Wire error 5
pat1 commented 2 years ago

commit https://github.com/r-map/ArduinoCore-avr/commit/234b37c5d7fe116489deeda82477b974326a282b solve 99.9% of errors on tests.