vcu icon indicating copy to clipboard operation
vcu copied to clipboard

feat(safety): shutdown interrupt

Open t-bre opened this issue 3 years ago • 3 comments

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

t-bre avatar Oct 12 '22 01:10 t-bre

@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.

t-bre avatar Nov 18 '22 02:11 t-bre

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.

Scaniox avatar Nov 18 '22 10:11 Scaniox

Great thank you, I don't think there was any particular reason other than the pin being unused but we'll leave it there.

t-bre avatar Nov 18 '22 11:11 t-bre