Closed 3d-gussner closed 2 months ago
All values in bytes. Δ Delta to base
Target | ΔFlash | ΔSRAM | Used Flash | Used SRAM | Free Flash | Free SRAM |
---|---|---|---|---|---|---|
MK3S_MULTILANG |
304 | 0 | 247762 | 5653 | 6190 | 2539 |
MK3_MULTILANG |
328 | 0 | 247064 | 5662 | 6888 | 2530 |
Using eeprom_update_block
instead of four 4x eeprom_update_float
will save a lot of flash. It’s not faster though, I wonder how much time all of these EEPROM writes add to the power panic.
Quick look at the datasheet for ATmega2560 gives typical EEPROM write time 3.3ms. 60 bytes is ~200ms… assuming its 3.3ms per byte 🤔
It’s not faster though, I wonder how much time all of these EEPROM writes add to the power panic. Quick look at the datasheet for ATmega2560 gives typical EEPROM write time 3.3ms. 60 bytes is ~200ms… assuming its 3.3ms per byte 🤔
Tested on MK404
UVLO - end 164
which is ~164ms (on MK404 not real printer)UVLO - end 165
which is ~165ms (on MK404 not real printer)Also these values are stored with M500
in eeprom, so as long the print profiles don't change a lot I expect not a big increase of time needed while power panic.
Also checked the PrusaSlicer-settings and the Machine limits values didn't change as far I can tell.
Another test with multiple changes in the gcode setting different jerk, accel and feedrates increased to UVLO - end 180
(on MK404 not real printer)
If we want to save these values we need to deal with the time delay when these settings are different to previous eeprom values.
The eeprom_update still costs some ms
as it has to read the eeprom and verify if it changed.
@gudnimg Thanks for the hint with eeprom_update_block_notify
saved 800 bytes of flash.
Also these values are stored with M500 in eeprom, so as long the print profiles don't change a lot I expect not a big increase of time needed while power panic.
Thats a good point. I forgot yesterday that the update functions only do EEPROM write if the value has changed 👍
PR looks good to me, just some minor typos that need fixing
@gudnimg Thanks for the review, fixed the typos
…ring power panic
Thanks to @wavexx in #2456