FPGA-based soft error correction for the memory of microcontrollers