CAN controller clock and slow CAN bitrates

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: CAN controller clock and slow CAN bitrates

Postby ESP_igrr » Wed Jun 14, 2017 10:30 am

There doesn't seem to be a solution which can be used simultaneously with WiFi and BT.
With regards to lowering the APB frequency, we will have a solution for this, but currently this is not supported because CPU frequency would be lowered to the same value, and FreeRTOS as well as timekeeping functions expect certain constant values of CPU frequency and APB frequency. We will have a solution for dynamic changing of APB/CPU clocks in the next major version (3.0).

hwmaier
Posts: 31
Joined: Sun May 28, 2017 7:30 am

Re: CAN controller clock and slow CAN bitrates

Postby hwmaier » Wed Jun 14, 2017 10:41 am

Would the Ethernet still work with lowered APB Clock ? I would expect it as the clock comes from an external source.

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: CAN controller clock and slow CAN bitrates

Postby ESP_igrr » Wed Jun 14, 2017 1:04 pm

For Ethernet in 100Mbps mode, lowest APB clock frequency can be 50MHz. For 10Mbps, lowest is 5 MHz.

hwmaier
Posts: 31
Joined: Sun May 28, 2017 7:30 am

Re: CAN controller clock and slow CAN bitrates

Postby hwmaier » Wed Jun 14, 2017 1:18 pm

Thanks to both rudi and ESP_igrr for all the info and clarifications provided in this thread.

n0b0dy
Posts: 1
Joined: Sun Dec 23, 2018 7:45 pm

Re: CAN controller clock and slow CAN bitrates

Postby n0b0dy » Sun Dec 23, 2018 7:50 pm

Is there still no way using the device with 20k bps?

caleres
Posts: 1
Joined: Sat Mar 13, 2021 4:49 am

Re: CAN controller clock and slow CAN bitrates

Postby caleres » Sat Mar 13, 2021 4:59 am

Starting with revision 2 of the ESP32 there is a way to configure lower can baud rates; for the newer chips the function of bit 4 of the interrupt enable register changes from "enable wakeup interrupt" to "divide BRP by 2". Here is a pull request to the openvehicles project that allows use of 33.333K, 50K, and 83.333K baud:

Testing was done with a V3 ESP32-WROVER.

Who is online

Users browsing this forum: No registered users and 36 guests