The embodiment of the invention discloses a GNSS (Global Navigation
Satellite System)
chip sealing FLASH exception protection method and a
file system, and the method comprises the following steps: a file writing step: judging whether a to-be-written file exists, if not, adding a corresponding CRC32 field in file header information of the to-be-written file, and then writing the to-be-written file into a FLASH; if the file header information of the FLASH needs to be written, reading the file existing in the FLASH, carrying out CRC32
verification on the file header information of the read file except the CRC32 field, if the
verification is passed, updating the file header information of the read file and the corresponding CRC32 field according to the file data needing to be written, and finally writing the updated file header information and the file data needing to be written into the FLASH; if the
verification is not passed, directly returning an error; and a file reading step: reading the target file in the FLASH. According to the invention, after the FLASH generates three states, misoperation is not generated, and a
firmware area of the FLASH is not operated, so that a GNSS
chip is not enabled to run, and a positioning result is not output.