A flash controller, comprising: an instruction bus interface, a data bus interface, a configuration register, an erase access filter module, a read/write access filter module and a flash control module; wherein the read/write access filter module is configured to receive control information, and determine according to the control information whether to send a read/write access to the flash control module when the read/write access is received from the instruction bus interface or the data bus interface; the erase access filter module is configured to receive control information, and determine according to the control information whether to send an erase access to the flash control module when the erase access is received from the configuration register; and the flash control module is configured to complete an access to a flash memory according to the read/write access or the erase access; wherein the flash memory comprises a user area and an information area, an access of the flash control module to the flash memory comprises an access to the user area and an access to the information area, characterised in that : the control information comprises a sub-area protection working method, a reading protection level and a reading protection state, and the flash controller further comprises a sub-area protection control module and a reading protection control module; the reading protection control module is configured to receive option bytes, determine whether a current access to the user area comes from a debugging method and determine a reading protection level and a reading protection state according to the option bytes, send the control information such as the reading protection level, the reading protection state and whether the current access to the user area comes from the debugging method or the like to the erase access filter module and the read/write access filter module; and the access comprises a read/write access and an erase access; and the sub-area protection control module is configured to determine a current sub-area protection working method; wherein the flash controller further comprises option byte image and a debugging method monitoring module; the option byte image is configured to duplicate option bytes in the information area; and the debugging method monitoring module is configured to monitor whether the current access to the user area comes from a debugging method. the control information comprises a sub-area protection working method, a reading protection level and a reading protection state, and the flash controller further comprises a sub-area protection control module and a reading protection control module; the reading protection control module is configured to receive option bytes, determine whether a current access to the user area comes from a debugging method and determine a reading protection level and a reading protection state according to the option bytes, send the control information such as the reading protection level, the reading protection state and whether the current access to the user area comes from the debugging method or the like to the erase access filter module and the read/write access filter module; and the access comprises a read/write access and an erase access; and the sub-area protection control module is configured to determine a current sub-area protection working method; wherein the flash controller further comprises option byte image and a debugging method monitoring module; the option byte image is configured to duplicate option bytes in the information area; and the debugging method monitoring module is configured to monitor whether the current access to the user area comes from a debugging method. <EOS>