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

EGD will never wait for the EMCY timeout #58

Open
d-loret opened this issue Oct 27, 2022 · 2 comments
Open

EGD will never wait for the EMCY timeout #58

d-loret opened this issue Oct 27, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@d-loret
Copy link
Collaborator

d-loret commented Oct 27, 2022

In the JSD_EGD_STATE_MACHINE_STATE_FAULT state of the EGD driver, the portion of the code that handles the case of the EMCY error not received within a defined timeout will never execute. This is because the previous state, JSD_EGD_STATE_MACHINE_STATE_FAULT_REACTION_ACTIVE sets the controlword to JSD_EGD_STATE_MACHINE_CONTROLWORD_FAULT_RESET. Hence, once the driver's state machine enters JSD_EGD_STATE_MACHINE_STATE_FAULT, if the error is not in the queue yet, the code will try to execute the wait, but that same cycle the drive will transition out of FAULT because of the value of the controlword set by JSD_EGD_STATE_MACHINE_STATE_FAULT_REACTION_ACTIVE in the previous cycle.

In summary, this code will never execute because of this line.

@d-loret d-loret added the bug Something isn't working label Oct 27, 2022
@d-loret
Copy link
Collaborator Author

d-loret commented Oct 27, 2022

@alex-brinkman, I think it is a bug, but let me know if you think otherwise. Seems that the solution would be to make the JSD_EGD_STATE_MACHINE_STATE_FAULT_REACTION_ACTIVE a no-op.

@d-loret
Copy link
Collaborator Author

d-loret commented Jan 13, 2023

@alex-brinkman, pinging back on this issue as I am revisiting some portions of the fault handling code. I think we need to get rid of the line resetting the fault in JSD_EGD_STATE_MACHINE_STATE_FAULT_REACTION_ACTIVE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants