Low power mode for OBD co-processor

Inquiry and support for Freematics products
Post Reply
lauka
Posts: 6
Joined: Sun Oct 27, 2019 8:13 pm

Low power mode for OBD co-processor

Post by lauka »

As the OBD port power is always on, I want to have my ONE+ in low power mode when the engine is not running to save the battery.

I have managed to get the current consumption down to 14 mA. It seems that the co-processor goes in to some low power mode roughly 20 seconds after the boot, if the FreematicsESP32::begin() is not called. I have not managed to get the processor back to low power mode after calling the begin(). The only way I have found to work is to enter deep sleep mode for the ESP32. After the ESP32 wakes up the co processor also seems to reset and go to low power mode after 20 seconds.

I have tried calling the FreematicsESP32::resetLink() and manually toggling the PIN_LINK_RESET, but I can't get it to work.
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Low power mode for OBD co-processor

Post by stanley »

If you use model A, the link between co-processor and ESP32 is SPI. After ESP32 wakes up from deep sleep, SPI might need to be re-initialized. You can try call begin() again.
lauka
Posts: 6
Joined: Sun Oct 27, 2019 8:13 pm

Re: Low power mode for OBD co-processor

Post by lauka »

The issue in my case was that when the ESP32 wakes up from light sleep it somehow triggers the SPI waking up the co-processor.

Using following config for the sleep fixed the issue:
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_OFF);

The important option is ESP_PD_DOMAIN_RTC_PERIPH turned ON.
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: Low power mode for OBD co-processor

Post by stanley »

Thanks for this information!
Post Reply