Code protection method and device for flash region in chip
The invention discloses a code protection method and device for a flash region in a chip. The method comprises the steps that S1, a check unit is arranged in a control chip; S2, when the chip is powered on, a power-on check control word on the flash region is judged, and if the control word on the f...
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a code protection method and device for a flash region in a chip. The method comprises the steps that S1, a check unit is arranged in a control chip; S2, when the chip is powered on, a power-on check control word on the flash region is judged, and if the control word on the flash region starts power-on check, the step S3 is executed; S3, user program codes in the flash region inside the control chip are read and checked through the check unit, if the codes are consistent, the step S4 is executed, and otherwise the chip stops start of a core; and S4, the core is started,initialization configuration is performed on all resources of an MCU, and a user program starts running after initialization is completed. According to the code protection method and device, when thecontrol chip is powered on, the core cannot run initialization immediately, the user program codes in the flash region are checked first, the core is started to execute the user program after it is ensured that the user progr |
---|