sfuphantom / vcu-fw

Vehicle Control Unit - Firmware for the TMS570LS1227 written upon the freeRTOS v9 platform
5 stars 4 forks source link

Output relevant signals during a severe fault scenario #44

Open rafguevara14 opened 1 year ago

rafguevara14 commented 1 year ago

I'm being vague because there may be other things to consider, but I think we have to notify the SDC in this event.

  1. Define what a fault scenario is.
  2. Are there any other cases where we would shut down the car?
  3. Figure out what signal we should send
  4. Implementation

Make a comprehensive list of what triggers the VCU to send a fault

rafguevara14 commented 3 months ago

For testing, as discussed with @juliannesoriano20 , check that when any of the shutdown events are triggered, the logs or a voltage is seen on the pin.

If too hard to test with the pin, just check logs

juliannesoriano20 commented 3 months ago

Should VCU_FLT be kept high until the car is reset? I think it is good to keep VCU_FLT high whenever we have a fault, that way SDB is sure to act upon the signal. Then, only turn low once the car is reset and then we can set VCU_FLT low

rafguevara14 commented 3 months ago

Should VCU_FLT be kept high until the car is reset? I think it is good to keep VCU_FLT high whenever we have a fault, that way SDB is sure to act upon the signal. Then, only turn low once the car is reset and then we can set VCU_FLT low

I guess it depends on how the shutdown board is designed. Doublecheck if the shutdown board latches the signal based on this schematic.

image

Another issue is that we need to check if the reset signal is sent to the VCU.

rafguevara14 commented 3 months ago

So for now, you can assume we have the reset signal available for us and do what you suggested (turn vcu fault low on a reset). Make a comment in the code about this assumption (eg TODO: Clarify if we have reset signal)