[Ovmsdev] OVMS Poller module/singleton

Simon Ehlen ovms at highteq.de
Sun Jan 26 20:58:10 HKT 2025


Hi Michael,

I tried your first suggestion, but after this change the OVMS no longer boots at all.

cnf1=0xc3; cnf2=0xaa; cnf3=0x85;

What is the easiest way to select the firmware on the second partition? Is there a way via the SD card or do I have to connect the OVMS with USB?

Cheers,
Simon

Am 26.01.2025 um 12:51 schrieb Michael Balzer via OvmsDev:
> Simon,
>
> Am 25.01.25 um 21:00 schrieb Simon Ehlen via OvmsDev:
>> Are adjustments/improvements also necessary at 125KBPS for CAN2/3?
>
> I've had a look at SAE J2284-1 for the 125 kbit timing, and it seems for this speed, the esp-idf, the mcp_can lib and our current driver are outside the spec.
>
> SAE recommends a sync jump width of 3 for low (nq=8) and 4 for higher resolutions, and single sampling at 62.5% (range 58.3…69.2%).
>
> The esp-idf driver would use a SJW of 3 (would better be 4 as nq=20) and single sampling at 80% (very late). The Arduino lib uses SJW=2 (too low) and triple sampling at 75% (late).
>
> Our current driver uses a SJW of 1 (much too low) and triple sampling at 56.25% (too early):
>     case CAN_SPEED_125KBPS:
>       cnf1=0x03; cnf2=0xf0; cnf3=0x86;
>       // BRP=3, PRSEG=1, PS1=7, PS2=7, SJW=1, BTLMODE=1, SAM=1, SOF=1, WAKFIL=0 → Sample 3x at 9/16 = 56,25%
>
> (Note: the current comment in the source is incorrect, the tq values need each to be read as +1)
>
> Possible SAE solutions for the MCP2515:
>
> a)
>     case CAN_SPEED_125KBPS:
>       // SAE J2284-1:
>       // BRP=3, PRSEG=3, PS1=6, PS2=6, SJW=4, BTLMODE=1, SAM=0, SOF=1, WAKFIL=0 → Sample point at 10/16 = 62.5%
>       cnf1=0xc3; cnf2=0xaa; cnf3=0x85;
> b)
>     case CAN_SPEED_125KBPS:
>       // SAE J2284-1:
>       // BRP=3, PRSEG=3, PS1=7, PS2=5, SJW=4, BTLMODE=1, SAM=0, SOF=1, WAKFIL=0 → Sample point at 11/16 = 68.8%
>       cnf1=0xc3; cnf2=0xb2; cnf3=0x84;
>
> Please try.
>
> Btw, if anyone would like to experiment: the Microchip timing calculator needs to be set to 16 MHz (that's our MCP2515 clock), and you need to add 0x80 to the cnf3 byte generated (that's the SOF flag, cannot be set in the UI).
>
> Regards,
> Michael
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev



More information about the OvmsDev mailing list