2024-10-18 02:55 AM
I'm using Nucleo32-F303K8. I'm running low on pins and can't upgrade to a bigger MCU. I was thinking of using NRST pin as an E-Stop. Would that be a good idea? The GPIO pins would be externally driven low or high while under and after the reset, especially on UART2. Looking at the diagrams in the reference manual I think it'd be ok, but I'm still unsure.
Solved! Go to Solution.
2024-10-18 02:00 PM
If this is for some machine like CNC machines (lathes, milling machines, etc.) or other things that can cause bodily harm, your ESTOP needs to cut power to whatever motors or high-voltage elements exist, independently from any signals from your MCU. Basic safety regulation require the EStop to happen without software intervention. Typically EStop cuts power to a relay that then cuts power to the motors. It may also send a signal to the MCU, but you cannot rely solely on the MCU to halt the machine. For example, if somehow the clock into the STM32 were to fail (damaged part, flaky solder joint,etc.) , I don't know that NRST will actually reset the chip.
Also keep in mind that SOME of the STM32 pins are driven low or high on reset, not tri-stated.
2024-10-18 03:11 AM - edited 2024-10-18 03:11 AM
What do you mean by, "an E-Stop" ?
Have you already repurposed the SWD lines?
2024-10-18 03:17 AM - edited 2024-10-18 03:19 AM
E-Stop means emergency stop, a big red normally closed button that when pressed has to stop a device from operating. I've already accounted for the internall pull-up on NRST and the need for external pull-down, the siulation showed that everything is fine.
I'm using Nucleo32 board and SWD lines are not on the goldpin connectors, so I can't get to them.
2024-10-18 02:00 PM
If this is for some machine like CNC machines (lathes, milling machines, etc.) or other things that can cause bodily harm, your ESTOP needs to cut power to whatever motors or high-voltage elements exist, independently from any signals from your MCU. Basic safety regulation require the EStop to happen without software intervention. Typically EStop cuts power to a relay that then cuts power to the motors. It may also send a signal to the MCU, but you cannot rely solely on the MCU to halt the machine. For example, if somehow the clock into the STM32 were to fail (damaged part, flaky solder joint,etc.) , I don't know that NRST will actually reset the chip.
Also keep in mind that SOME of the STM32 pins are driven low or high on reset, not tri-stated.
2024-10-21 01:42 AM
It's a college project with thin budget, but you're completely right. There's no way around it, and a false stop could be even worse that no stop