You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A decreasing voltage level can be detected by the STM32. This event can be used to save information in the MCU itself and to signal the host SoC (A64) that power has been removed. During normal standstill operation, the time from a voltage drop can be safely detected until power is lost on the 3.3V line has been measured to be about 6 ms.
The text was updated successfully, but these errors were encountered:
I've done some tests on the STM32 and with few changes to the mainline Klipper code, it is possible to check the input voltage at a frequency of 0.1 ms which should be sufficient. Further more, I've managed to save the position to Flash in the upper page. Erase size is 1 KB, the code is only about 12K and the total flash size is 16K. The time to store 5 half words to flash is 275 us.
If this is going to be a working solution, the host needs to send it's position at regular intervals. That information is not available to the MCU.
There is also some work that needs to be done in order to get information back form the MCU once power is reapplied. For testing, this can be done by the stm32flash program to read out a location in flash, but as a part of klipper it can be done with an MCU command.
It is important that a page erase is not done automatically on boot of the MCU, that would remove any information stored during shutdown. A cleanup could be done last minute as part of starting a new print.
This picture shows the time it takes to run a "save to flash" operation. The sequence was triggered by shutting off power.
A decreasing voltage level can be detected by the STM32. This event can be used to save information in the MCU itself and to signal the host SoC (A64) that power has been removed. During normal standstill operation, the time from a voltage drop can be safely detected until power is lost on the 3.3V line has been measured to be about 6 ms.
The text was updated successfully, but these errors were encountered: