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
57 stars 26 forks source link

Question: ReSync from SPI communication Error #295

Closed xuanlanghuang closed 6 months ago

xuanlanghuang commented 7 months ago

Your Question Ask your questions here. Is it possible to resync from a spi communication error? From WB user manual 9.2.3, It mentions " If the WHITE Beet Module SPI communication gets out of sync the WHITE Beet module needs to be reset."

But there is also a 10.2 Recovering from synchronization Error session talks about how to resync from a framing error.

Are these two talking about the same synchronization error? If they are, does sending Ping message on SPI require the Size exchange frame?

lho-stx commented 7 months ago

Hey @xuanlanghuang,

these are indeed two different use cases:

  1. framing sync error: please follow Whitebeet manual chapter 10.2
  2. SPI error: these are a bit more tricky and the official way to handle these scenario is to reset the Whitebeet. I will discuss if we improve this handling in a future release.

The ping message is also a normal framing message and therefore needs to have a size exchange frame beforehand.

Best regards, lho

xuanlanghuang commented 7 months ago

Hi Iho,

  1. How do we identify a framing sync error?
  2. Is it recommend sending and receiving to/from the WB at the same "size-exchange-->data exchange" sequence? We have some rare occasion that we have a non-zero size-exchange from both sides. 9.2.4 mentions we should use the larger values as the size for the next SPI transfer. If we padded the shorter size, will that create a SPI error?
lho-stx commented 7 months ago

Hey @xuanlanghuang,

I assume you are working on a custom host application?

  1. If you e.g. read from the Whitebeet and the framing header is no present
  2. It is possible to to a combined read/write, but there is no real benefit in this scenario. I would advise to do read and write separated. Yes you need to use the larger size, else you will get a framing sync error. Padding the data with shorter size should not be a problem

Do you have a specific use case which is failing? Are you able to create SPI log files following this guide?

Best regards, lho

xuanlanghuang commented 7 months ago

Hi Iho,

I will change the logic in our software to check if this still happening.

Thanks,

github-actions[bot] commented 7 months 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.

github-actions[bot] commented 6 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale. If your issue still persists, feel free to reopen!