REV Spark Max burnFlash() usage

Hi All!

Looking for a bit of advice - checking if anyone here knows the answer before I go bug REV.

I see a few different folks recommending that, in code, after applying configurations to spark MAX’es , a best practice was to call burnFlash() to ensure the settings would persist over unintended power cycles (like brownouts).

However, I know some flash devices (EEPROM in particular) have some sort of fairly low write limit before they burn out. A few code comments seem to indicate this may be a thing on the Spark MAX’es.

If we’re calling burnFlash() once per robot code startup, I’d expect we’d hit a few thousand writes per season, though the vast majority will be with identical parameters to what’s stored in flash already. I’d imagine this could extend the life quite a bit…

Anyway. Seeing if anyone knows if the "burnFlash() on init" is in fact the recommended practice, and what sort of effects on the flash chip would be expected over the course of a season.

5 Likes

One way to do fewer writes is to do this only while FMS is connected. Check out DriverStation.isFMSAttached() API for details. While unlikely, it could in theory lead to different behavior on the field that in the pits.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.