| Electronic Components Datasheet Search |
|
PIC24FJ128GA310 Datasheet(PDF) 345 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC24FJ128GA310 Datasheet(HTML) 345 Page - Microchip Technology |
|
345 / 406 page ![]() 2010-2011 Microchip Technology Inc. DS39996F-page 345 PIC24FJ128GA310 FAMILY 29.4 Program Verification and Code Protection PIC24FJ128GA310 family devices provide two compli- mentary methods to protect application code from overwrites and erasures. These also help to protect the device from inadvertent configuration changes during run time. 29.4.1 GENERAL SEGMENT PROTECTION For all devices in the PIC24FJ128GA310 family, the on-chip program memory space is treated as a single block, known as the General Segment (GS). Code pro- tection for this block is controlled by one Configuration bit, GCP. This bit inhibits external reads and writes to the program memory space. It has no direct effect in normal execution mode. Write protection is controlled by the GWRP bit in the Configuration Word. When GWRP is programmed to ‘0’, internal write and erase operations to program memory are blocked. 29.4.2 CODE SEGMENT PROTECTION In addition to global General Segment protection, a separate subrange of the program memory space can be individually protected against writes and erases. This area can be used for many purposes where a sep- arate block of write and erase-protected code is needed, such as bootloader applications. Unlike common boot block implementations, the specially protected segment in the PIC24FJ128GA310 family devices can be located by the user anywhere in the program space and configured in a wide range of sizes. Code segment protection provides an added level of protection to a designated area of program memory by disabling the NVM safety interlock whenever a write or erase address falls within a specified range. It does not override General Segment protection controlled by the GCP or GWRP bits. For example, if GCP and GWRP are enabled, enabling segmented code protection for the bottom half of program memory does not undo General Segment protection for the top half. The size and type of protection for the segmented code range are configured by the WPFPx, WPEND, WPCFG and WPDIS bits in Configuration Word 3. Code seg- ment protection is enabled by programming the WPDIS bit (= 0). The WPFP bits specify the size of the segment to be protected, by specifying the 512-word code page that is the start or end of the protected segment. The specified region is inclusive, therefore, this page will also be protected. The WPEND bit determines if the protected segment uses the top or bottom of the program space as a boundary. Programming WPEND (= 0) sets the bottom of program memory (000000h) as the lower boundary of the protected segment. Leaving WPEND unpro- grammed (= 1) protects the specified page through the last page of implemented program memory, including the Configuration Word locations. A separate bit, WPCFG, is used to protect the last page of program space, including the Flash Configuration Words. Programming WPCFG (= 0) protects the last page in addition to the pages selected by the WPEND and WPFP<6:0> bits setting. This is useful in circum- stances where write protection is needed for both the code segment in the bottom of the memory and the Flash Configuration Words. The various options for segment code protection are shown in Table 29-2. TABLE 29-2: CODE SEGMENT PROTECTION CONFIGURATION OPTIONS Segment Configuration Bits Write/Erase Protection of Code Segment WPDIS WPEND WPCFG 1xx No additional protection is enabled; all program memory protection is configured by GCP and GWRP. 01x Addresses from the first address of the code page are defined by WPFP<7:0> through the end of implemented program memory (inclusive); write/erase protected, including Flash Configuration Words. 001 Address 000000h through the last address of the code page is defined by WPFP<7:0> (inclusive); write/erase protected. 000 Address 000000h through the last address of code page is defined by WPFP<7:0> (inclusive); write/erase protected and the last page, including Flash Configuration Words, are write/erase protected. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |