How can I make T20 backup my data frequently?

I use T20 as the processor of a printer and I need it to backup the data so that if suddenly the power is off the variable data is retained and not lost.
How can I do that ?

If you store your critical data to the FlashDisk (as file using CreateFile) you are already good to go. If you format the FlashDisk please make sure you use TFAT. This ensures you don’t end up with a corrupted file system at a sudden power loss. You can find some more information about this here:

Thanks for your answer.
I need to clarify my question a bit more,

  1. We are using a T20 in a mains powered printer.
  2. We have files with continuously updating user data that must be backed up to the flash when
    the printer is turned off.
  3. At power down we need the Tegra to back this data up and then shut down itself.
  4. We are assuming that Tegra needs a reserve power source to perform the backup.
  5. We are considering using a lithium battery or a high density electrolytic capacitor. Are these suitable ? or do you suggest any other way ?
  6. Currently we use PXA270 and perform a backup to flash every 5 minutes.
  7. This can affect the time
    the printer takes to respond to a
    print command.
  8. Ideally the backup process would not take place while the printer had mains power and only when mains power was lost.
  9. We are looking at designing the peripheral circuit so that the Tegra runs in a minimal configuration while it backs up when the power is lost. e.g we don’t need the user display on.


Thank you for the clarification. Since the Colibri T20 does not have a built in power failure detection, some extra hardware is required. You need to built a circuit on your carrier board that is detecting a power failure of the mains. The easiest way is changing the level of a GPIO that goes to the T20 as soon as the mains is removed.

Write a interrupt routine that will be triggered by this GPIO. This routine should switch off immediately all peripherals that are not needed for the backup process, such as the display. Start then saving the backup files. Finally you can shut down the module or you can simply remove its power since the OS image can be protected against power failure corruption by using TFAT.

As you have already assumed correctly, the whole backup process will need a reserve power to perform. Whether a high capacity capacitor is sufficient or a small lithium battery is required, depends on the duration of the backup process and how many unnecessary peripherals you can shut down. Please do the calculations by measuring the time and the current consumption. Please take in account that the current consumption of the T20 SoC depends on its temperature. At high temperatures, its consumption can be increased by up to 50%. Take enough margin in your calculations.

Thank you
I shall contact you if I needed more help on this.