first mc33810 SPI communication is not happy #6733

only:hellen154hyundai_f7
This commit is contained in:
rusefi 2024-07-20 22:55:03 -04:00
parent ee48d8a932
commit d44bb8d3f8
2 changed files with 4 additions and 0 deletions

View File

@ -195,6 +195,7 @@ static void configureInputs() {
}
void waitForSlowAdc(uint32_t lastAdcCounter) {
// note that having ADC reading is one thing while having new sensor API is a totally different thing!
// todo: use sync.objects?
while (slowAdcConversionCount <= lastAdcCounter) {
chThdSleepMilliseconds(1);

View File

@ -585,6 +585,9 @@ static THD_FUNCTION(mc33810_driver_thread, p) {
chRegSetThreadName(DRIVER_NAME);
chThdSleepMilliseconds(60); // let's wait BatteryVoltage to appear. TODO: more proper way of synchronization with BatteryVoltage!
while (true) {
msg_t msg = chSemWaitTimeout(&mc33810_wake, TIME_MS2I(MC33810_POLL_INTERVAL_MS));