Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

Code.py UART TX buffer can overflow if DRV8825 fault, but FaultSensitive=False #40

Closed Short-bus closed 7 months ago

Short-bus commented 7 months ago

If the Tiny2040 is receives a 'fault' signal from a DRV8825 board AND the parameter FaultSensitive = False a crash can occur. Crash is caused by repeated log messages about the fault pin. FaultSensitive=True will cause the routine to quit immediately, But FaultSensitive=False will allow it to continue and keep raising the error with each step. This condition can occur if FaultSensitive=False and the Tiny2040 is not physically wired up to a DRV8825. Found during PCB testing. The Fault pin on the Tiny2040 must float 'low' in this situation and trigger the fault condition. The FaultSensitive parameter was a recent addition, situation could not occur in earlier versions.

Short-bus commented 7 months ago

Introduced latch so that the error message is only generated a single time. Scenario that caused original fault now passes OK.

Short-bus commented 7 months ago

In 2023-Dec-issues branch.