In certain aspects, a memory device includes a non-volatile memory storing firmware, a control logic coupled to the non-volatile memory, and an array of memory cells coupled to the control logic, the array of memory cells is embedded with instructions that are executable by the control logic. The control logic is configured to perform a power-on reset (POR) initialization operation to control an initialization of the memory device based on the firmware, repair the firmware based on execution of the instructions embedded on the array of memory cells, and perform a remaining POR initialization operation based on the repaired firmware.