Flash error corrupts OS

I’m experiencing some flash errors and the operational system gets corrupted. When it happens I reinstall the operational system.
I’m using imx6ULL and I stores only a configuration database in main Flash, this file is rarely changed. I use also a SD card to store a lot of changing data (battery level every minute, logic events, general usage data, etc).
Is there a way to confirm that I’m not accidentally writing to the SOM’s flash? Just read a SQLite database does update the last time read in file? Can this generate the flash corruption? Is there something else I can test?

Thank you,

I appended the error got in serial communication. Sometimes the error changes, but the boot problem always happen.
bootMessage.txt (3.1 KB)

Colibri iMX6ULL module has a raw NAND as a storage device. Linux uses UBIFS on top of MTD layer. Please check this document for debug options.