vcu
vcu copied to clipboard
feat(safety): shutdown interrupt
Description
An interrupt triggered by the shutdown pin should cause the system to stop running in a safe way.
Requirements
- [x] Set up pin change interrupt in STM32CubeMX and re-generate code.
- [x] Create interrupt handler, make sure it is triggered by the pin change.
- [x] move ISR to where all the globals are (app_threadx.c)
- [x] add intermediary function for checking system is RTD before registering a critical fault
- [ ] Add testbench to allow shutdown to be triggered from user button pin, but only after the RTD procedure has completed.
- [ ] add stop functions to ts controller and driver control
- [ ] vcu shutdown function
@Scaniox do you know yet which pin the interrupt will be on? It would be good to know so I can add it to the schematic / PCB.
At the moment I have it assigned to PF1; that is just what was there from the previous implementation, and I'm working with it assuming there is some reason for it being that pin and haven't changed it.
Great thank you, I don't think there was any particular reason other than the pin being unused but we'll leave it there.