Sevenstax / FreeV2G

Python based Host MPU Application for the use with 8DEVICES WHITE-BEET Embedded ISO15118 Module modules to realize IEC/ISO15118 and DIN70121 conform charging communication between electric vehicles (PEV) and elevtric vehicle supply equipment (EVSE). FreeV2G can e.g. been used with a Raspberry Pi.
Other
51 stars 25 forks source link

Spi Data Exchange frame Identifier error after some time #322

Open xuanlanghuang opened 4 weeks ago

xuanlanghuang commented 4 weeks ago

Before you post

Your Setup Platform: PEV Firmware Version: i.e. V01_00_07 Host Controller Interface: SPI Host: Own Implementation

Describe the bug Spi Data Exchange frame Identifier error after some time

To Reproduce This happen consistently after some time the PEV WB is running, the identifier of data exchange has a 0xD5 at the beginning and the whole message is shifted, this cause our logic to think the WB is out of sync and have an incomplete message the spi baudrate is 7,000,000

Logs image

spi-out-of-sync.zip (out of sync at 64.33s for the "wb_outofsync-64-33s" , and 2.188s for "wb_outofsync2-2-188s")

Additional context Add any other context about the problem here.

lho-stx commented 3 weeks ago

Hey @xuanlanghuang,

I tried to reproduce your issue, but had no luck. Are you using the WHITE Beet carrier board or do you have a custom Hardware? If you are using WHITE Beet PI carrier board, what is your host device? Do you experience glitches in any other part of the communication? I want to rule out the possibility that it is a problem related to the hardware (e.g. distorted signals). But if this is happening in the setup bytes only, then I need to investigate further. Maybe I'll send you a special debug firmware, because I am not able to reproduce the issue.

Best regards, lho

lho-stx commented 3 weeks ago

Hey @xuanlanghuang,

I checked the logs again and had a look into the timing. Between the CS going low and the first transmission are 10.5μs. In the WHITE Beet manual chapter 9.2.6 the minimum delay time is 20μs.

2024-06-14-093540_1920x1080_scrot

Please adapt your host implementation to wait at least 20μs before starting data transmission after asserting the CS line.

Best regards, lho

github-actions[bot] commented 6 days ago

This issue has been marked as stale because it has been open for 14 days with no activity. Please update this issue or it will be closed in the next 7 days.