Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plc chip reset to ev_slac #804

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SebaLukas
Copy link
Contributor

Describe your changes

The reset function from the Evse ported to the Ev.

Issue ticket number and link

The Ev Slac module lacks the function to reset the PLC chip after each session

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@SebaLukas
Copy link
Contributor Author

The test with real HW is missing

@corneliusclaussen
Copy link
Contributor

check out this draft PR:

#809

It is not ready for merging yet because of a hardcoded 10s delay after reset, but it changes the sections in EvseSlac that you copied over to EvSlac in this PR. Maybe you can change it to be more similar to #809, then it will work with both QCA and Lumissil.

@SebaLukas
Copy link
Contributor Author

Thx for the suggestion. I will have a look 👍

@SebaLukas SebaLukas force-pushed the feat/adding-ev-slac-plc-reset branch from d406f5f to 8ee216f Compare August 2, 2024 05:46
@SebaLukas
Copy link
Contributor Author

I took a closer look at #809. As I understand it, I'm adding a 10s delay after the Lumissil reset. Until we have found a better method for the Lumissil.
The new NMK state does not need the EV, as the network is only joined in the matched state.

@SebaLukas SebaLukas force-pushed the feat/adding-ev-slac-plc-reset branch from d22f9a9 to 11ddc2c Compare August 2, 2024 06:56
@SebaLukas SebaLukas force-pushed the feat/adding-ev-slac-plc-reset branch from 4fb6e11 to 572bfa8 Compare August 23, 2024 05:43
@lategoodbye
Copy link

lategoodbye commented Aug 23, 2024

Hi, could you please give a short motivation of this change?

There are several methods to trigger a reset of the PLC. The chose one here has the best independence from hardware & kernel, but it's also the most unreliable way to do because it needs a working firmware. Another downside is the involved complexity.

@SebaLukas
Copy link
Contributor Author

Hi :)

As the QCA sometimes has problems joining the network, it always needs a soft reset after each charging session. This is solved using this method. As far as I know, we cannot reset the QCA via the HW pin on Linux.

On the Evse side, the reset is implemented in the same way and has worked very well since it was added. That's why I simply ported it to the EV side.

What would the other methods look like?

@lategoodbye
Copy link

lategoodbye commented Sep 2, 2024

Hi,
i understand. The QCA700x has Reset-GPIOs which could be pulled from userspace (Linux Mainline QCA7000 driver doesn't support reset handling itself), but sure it's possible there are bad hardware designs which doesn't connect the reset line.

The qcaspi driver support a reset via SPI commands, which is more low level than a reset via MME. This solution doesn't work in case the QCA7000 is connected via UART, but i never saw in a real Embedded Linux product with this. Unfortunately there is currently no way to trigger this reset from userspace, but Linux ethtool generally provides such a userspace API. Recently i started to work on this feature. Here is a draft based on top of Linux 6.10.

The big advantage of the ethtool API it is generic interface. AFAIK the Vertexcom MSE102x doesn't provide SPI commands to trigger a reset, so there is a low chance to adapt it for this driver.

@corneliusclaussen
Copy link
Contributor

I think we should add reset via GPIO as well (in a separate PR) as an option for boards that have this pin connected to the Linux board (also for the EVSE side)

Adding support for lumissil with adding a timeout after reset

Signed-off-by: Sebastian Lukas <[email protected]>
@SebaLukas
Copy link
Contributor Author

This is on hold because the feature getting the info which chips is installed is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants