Dual Partition Flash Program Memory
|
|
|
- Conrad Cox
- 9 years ago
- Views:
Transcription
1 Dual Partition Flash Program Memory HIGHLIGHTS This section of the manual contains the following major topics: 1.0 Introduction Program Memory Architecture Program Memory Partition Flash Operation Flash Memory Programming Program Space Visibility and Extended Data Space (PSV and EDS) Register Map Related Application Notes Revision History Microchip Technology Inc. DS B-page 1
2 dspic33/pic24 Family Reference Manual 1.0 INTRODUCTION All PIC24 and dspic33 devices have an internal programmable Flash array for the execution of user code. The high-endurance Flash array provides great flexibility in code development and storage, combining a long retention life with a high number of read/write cycles. This version of Flash program memory adds these new features: Dual Partition Flash operation, allowing the support of robust bootloader systems and fail-safe storage of application code, with options designed to enhance code security Live Update operation, allowing the inactive Code Segment to be modified or completely erased while the main application continues to execute Direct Run-Time Programming of the Flash array from the data RAM space, with optional compression of the data RAM image 2.0 PROGRAM MEMORY ARCHITECTURE PIC24 and dspic33 devices address a 4M x 24-bit program memory address space, as shown in Figure 2-1. The program memory map is equally divided into the user program space (000000h to 7FFFFFh) and the configuration (or test) memory space (800000h to FFFFFFh). The user program space contains the Reset vector, Interrupt Vector Tables (IVTs) and program memory. There are three methods for accessing program space. 1. The 23-bit Program Counter (PC). 2. Table Read (TBLRD) and Table Write (TBLWT) instructions. 3. By mapping any 32-Kbyte segment of program memory into the data memory address space. Implemented program memory can be further divided into the vector area, which includes the Reset and interrupt vectors, and the code area, which also includes the Flash configuration data. Accessing unimplemented areas of the user program space (i.e., above the upper implemented boundary of program memory) will cause an address error trap. 2.1 Vector Area The vector area starts at the beginning of program memory space, at h. It contains the master Reset vector, the hardware trap vectors and the Interrupt Vector Table (IVT) for all implemented hardware interrupts. Because of architectural differences and the size of the IVT, the vector area occupies a different amount of memory in different device families. For PIC24 devices, the vector area extends to 0000FEh. For dspic33 devices, the vector area extends to 0001FEh. Figure 2-2 shows the difference between the IVTs for different devices. Regardless of device family, hardware interrupt vectors always start at h with Interrupt Vector 0. The vector area roughly corresponds to the Vector Segment (VS) in CodeGuard security implementations. Depending on the security configuration, the vector area may be treated as part of the Boot Segment (BS) or the General Segment (GS) ALTERNATE VECTOR INTERRUPT TABLE All dspic33 and PIC24 devices provide for the implementation of an Alternate IVT (AIVT), which can be used in high-security code applications and for alternate exception handling. Unlike earlier devices in these families, the AIVT is not permanently allocated in program memory at a fixed address range. Instead, AIVT is only present when: CodeGuard security is configured for a Boot Segment with a size of at least two pages (set by the FBSLIM Configuration register), and AIVT is enabled by programming the AIVTDIS Configuration bit to 0. When the AIVT is enabled, it is located at an address range starting at the beginning of the last page of the BS; each vector is located at a fixed offset from the page boundary. The total size and content (i.e., vector order) of the AIVT mirrors those of the IVT. DS B-page Microchip Technology Inc.
3 Dual Partition Flash Program Memory Figure 2-1: Default Program Space Memory Map for dspic33 and PIC24 Devices Addresses PIC24 dspic33 Vector Area h 0000FEh h h 0001FEh h User Flash Program Memory Configuration Memory Space User Memory Space Flash Configuration Words Unimplemented Read 0 Reserved FBOOT Reserved xxxxfeh (1) xxxx00h (1) h 7FFFFEh h 801xxxh 801xxxh xxxxfeh (1) xxxx00h (1) h 7FFFFEh h 801xxxh 801xxxh DEVID (2) Reserved FEFFFEh FF0000h FF0002h FF0004h FFFFFFh FEFFFEh FF0000h FF0002h FF0004h FFFFFFh Legend: Memory areas are not shown to scale. Note 1: Exact boundary addresses are determined by the size of the implemented program memory Microchip Technology Inc. DS B-page 3
4 dspic33/pic24 Family Reference Manual Figure 2-2: Vector Area Detail PIC24 Devices dspic33 Devices Interrupt Vector Table Reset GOTO Instruction Reset GOTO Address Oscillator Fail Trap Vector Address Error Trap Vector Stack Error Trap Vector Math Error Trap Vector... Interrupt Vector Interrupt Vector Interrupt Vector C Interrupt Vector E Interrupt Vector Interrupt Vector FC Interrupt Vector FE Reset GOTO Instruction Reset GOTO Address Oscillator Fail Trap Vector Address Error Trap Vector Hard Trap Vector Stack Error Trap Vector Math Error Trap Vector... Interrupt Vector Interrupt Vector Interrupt Vector FC Interrupt Vector FE Interrupt Vector Interrupt Vector FC Interrupt Vector FE Alternate Interrupt Vector Table (optional) Reserved BOA + 00 Reserved BOA + 02 Reserved BOA + 04 Oscillator Fail Trap Vector Address Error Trap Vector Stack Error Trap Vector Math Error Trap Vector... Interrupt Vector 0 BOA + 14 Interrupt Vector 1 BOA Interrupt Vector 52 BOA + 7C Interrupt Vector 53 BOA + 7E Interrupt Vector 54 BOA Interrupt Vector 116 BOA + FC Interrupt Vector 117 BOA + FE Reserved BOA + 00 Reserved BOA + 02 Oscillator Fail Trap Vector BOA + 04 Address Error Trap Vector Hard Trap Vector Stack Error Trap Vector Math Error Trap Vector... Interrupt Vector 0 BOA + 14 Interrupt Vector 1 BOA Interrupt Vector 116 BOA + 0FC Interrupt Vector 117 BOA + 0FE Interrupt Vector 118 BOA Interrupt Vector 244 BOA + 1FC Interrupt Vector 245 BOA +1FE Legend: Note: BOA = Base Offset Address, the starting address of the last page of the Boot Segment. Addresses are shown in hexadecimal. Vector area organization shown is the default organization for the given architectures. Specific devices may differ. Refer to the device data sheet for device-specific details. DS B-page Microchip Technology Inc.
5 Dual Partition Flash Program Memory 2.2 Code Area The code area is the area of user program memory that contains the user s application code. It extends from the end of the vector area to the beginning of the Flash Configuration Words. If a Boot Segment is implemented, it starts at the end of the vector area and extends for a predetermined range. The part of the code area that is not in the Boot Segment corresponds to the General Segment (GS) in CodeGuard security systems. With the exception of the Flash Configuration Words at the end of implemented memory, as described below, the entire area is available for application code FLASH CONFIGURATION DATA The area at the end of implemented Flash program memory (typically the last row) is reserved for Flash configuration data. On device Reset, this configuration information is copied into the appropriate device Configuration registers, which are not accessible to the user. Device configuration data can only be programmed by programming the desired values in the Flash Configuration Words. The number, order and organization of the Configuration bits varies between device architectures, and among device families within the same architecture. Some devices organize Configuration bits as 16-bit Configuration Words, which are generally grouped in functional terms. Other devices organize Configuration bits in terms of individually addressable Configuration bytes. Figure 2-3 shows the area as organized for Configuration Words. Refer to the device data sheet for family-specific information. For devices with Dual Partition capability, the FBTSEQ Configuration Word is usually the next-to-last Configuration Word, located at the end of implemented program memory. Figure 2-3: Flash Configuration Words Vector Area h h User Flash Program Memory Flash Configuration Words xxxxfeh (1) xxxx00h (1)...(2) xxxxx4 (Configuration Word) xxxxx6 (Configuration Word) xxxxx8 (Configuration Word) xxxxxa FBTSEQ xxxxxc (Unimplemented) xxxxxe Unimplemented Read 0 7FFFFFh Legend: Memory areas are not shown to scale. Note 1: Exact boundary addresses are determined by the size of the implemented program memory. 2: Typical case is shown. The exact number of implemented Flash Configuration Words/bytes depends on the specific device and architecture. Some locations may not contain configuration data. Exact addresses of implemented Configuration Words or bytes are determined by the size of the implemented program memory Microchip Technology Inc. DS B-page 5
6 dspic33/pic24 Family Reference Manual 2.3 Memory Organization The program memory space is organized as word-addressable blocks. Although it is treated as 24 bits wide, it is more appropriate to think of each address of the program memory as a lower and upper word, with the upper byte of the upper word being unimplemented. The lower word always has an even address, while the upper word has an odd address (Figure 2-4). Program memory addresses and the PC are always word-aligned on the lower word (i.e., the Least Significant bit (LSb) is always 0 ). Addresses are incremented or decremented by two during code execution. Figure 2-4: Program Memory Organization msw Address most significant word least significant word PC Address (lsw Address) h h h h h h h h Program Memory Phantom Byte (read as 0 ) Instruction Width ADDRESSING PROGRAM MEMORY For normal code execution, the Effective Address (EA) for execution is provided by the Program Counter (PC). The PC is 23 bits wide, allowing direct access to any location in the user program space. PC<0> is fixed as 0 in order to maintain program instruction alignment. The PC is incremented to the next sequential address by incrementing PC<1>, thus increasing the value of the PC by two. For Table Read and Table Write operations, the EA is created by concatenating the 16-bit address from one of the W registers with the 8-bit address from the TBLPAG register. This permits table operations access to both the user and configuration spaces. Address generation for table operations is discussed in more detail in Section Address Generation for Table Operations. For Extended Data Space (EDS) and Program Space Visibility (PSV) operations, the EA is created by concatenating the lower 15 bits of a W register with the 8-bit address from either the DSRPAG/DSWPAG (dspic33) or PSVPAG (PIC24F) registers. Extended Data Space and Program Space Visibility operations are discussed in the dspic33/pic24 Family Reference Manual, Data Memory (dspic33, DS70595) and/or Data Memory (PIC24, DS39717). DS B-page Microchip Technology Inc.
7 Dual Partition Flash Program Memory 3.0 PROGRAM MEMORY PARTITION FLASH OPERATION For devices with Dual Partition Flash capability, the Dual Partition Program Memory mode is selected by programming the BTMODE<1:0> bits in the FBOOT Configuration Word. Unlike other Configuration Words, FBOOT is located in configuration memory space, apart from all other Flash Configuration registers. The exact address is architecture-specific (i.e., PIC24 or dspic33) and may vary between device families. Table 3-1 lists the possible Flash Partition options, which are discussed in the following sections. When a device is first programmed via In-Circuit Serial Programming (ICSP ), the programmer should program FBOOT to correctly set the device Flash Partition mode. Note that it is not possible to reprogram FBOOT at run time using Run-Time Self-Programming (RTSP). The FBOOT bits must be configured in ICSP mode by a programmer. This is because the location of the Flash Configuration Words changes from Standard Partition mode to Dual Partition mode, which could cause unexpected device operation. Table 3-1: BTMODE<1:0> Note 1: Flash Partition Options 3.1 Standard (Single Partition) Mode Standard mode, also referred to as Single Partition or Standard Partition mode, is the default operating mode for program memory. It is selected when the BTMODEx Configuration bits are 11 (their unprogrammed configuration). This is also the single program memory operating mode available to all previous dspic33 and PIC24 devices. In Standard mode, the entire user program memory is mapped as a flat, continuous memory space, ranging from h to the upper boundary of implemented Flash memory. For example, a device with 256 Kbytes of Flash memory has a program memory address range of h to 02AFFFh, with addresses above this range being unimplemented. The entire implemented memory range (excluding reserved spaces for Reset vectors, IVTs and Flash Configuration Words) is available for the user s application. In devices with segmented code security, a Boot Segment may also be implemented. 3.2 Dual Partition Modes Partition Option 11 Standard Mode (Single Partition, default) 10 Dual Partition Mode 01 Protected Dual Partition Mode 00 Privileged Dual Partition Mode (1) Not implemented on all Dual Partition devices. When the BTMODEx Configuration bits are programmed to a value other than 11, the device operates in one of three Dual Partition modes. In all of these modes, the implemented Flash memory is symmetrically split into two regions: an Active Partition, beginning at h, and an Inactive Partition, beginning at h. For the device in the previous example, the 256-Kbyte Flash memory would be implemented as two areas of 128 Kbytes each, ranging from addresses h to 0157FFh and h to 4157FFh. Addresses between the two areas are unimplemented (see Figure 3-1). In the Dual Partition modes, two independent applications may be programmed into the device, one to each of two Flash memory partitions, known as Partition 1 and Partition 2. When the device is initialized, one of these is dynamically mapped to the Active Partition and executed. The other is mapped to the Inactive Partition, where it remains available to program memory operations. The assignment of a partition to the Active or Inactive Partition is determined automatically by a code signature, known as the Boot Sequence Number. The code partitions may also be swapped between Active and Inactive Partitions, during run time, under software control Microchip Technology Inc. DS B-page 7
8 dspic33/pic24 Family Reference Manual Dual Partition modes allow for the Active Partition s application to access (but not execute) program data in the Inactive Partition or to reprogram the Inactive Partition. Writing to Flash memory in the Inactive Partition does not require the CPU to stall while Flash writes occur. This allows for Live Update functionality, where execution of critical control functions or timing-sensitive communications can happen simultaneously with application updates. Certain Dual Partition modes place additional limitations on the process to help ensure code security and robustness of operation. Code cannot be executed when it is mapped to the Inactive Partition. The partitions may be swapped, but only code in the Active Partition can be executed DUAL PARTITION MODE The simplest Dual Partition mode places no restrictions on operations from the Active Partition to the code in either Partitions 1 or 2. Any limitations on the interactions between Code Segments in different partitions are determined by the configuration of enhanced security features PROTECTED DUAL PARTITION MODE Protected Dual Partition mode protects the default Code Segment (Partition 1) from any Flash write or erase operations. This allows for the implementation of a Factory Default mode by allowing a fail-safe backup image to be stored in Partition 1. When Protected Dual Partition mode is used, Partition 1 cannot be written or erased by Flash memory operations while it is in the Inactive Partition. If Partition 1 is also write-protected via Configuration bit settings, it cannot be erased or written at any time. In contrast, Partition 2 can be erased or written by operations from either partition. This allows for a fail-safe bootloader to be placed in Partition 1, along with a fail-safe backup code image. This code image can then be executed by default and used to rewrite Partition 2 in the event that a Flash update should fail PRIVILEGED DUAL PARTITION MODE Privileged Dual Partition mode implements additional security protections in those cases where an application may have Code Segments written by different authors and a higher level of security is required to protect intellectual property for one of those segments. An example would be a system where the bulk of the code is written by the hardware s application developer, but includes a proprietary, third-party library. This mode is designed to work with the enhanced security features in select devices, which can selectively protect different Code Segments in the program memory space. Privileged Dual Partition mode differs from Standard Dual Partition mode by adding special protection to the BSLIMx Configuration bits of both partitions. This protection effectively locks the bits, and prevents changes to the size of the Boot Segment and the General Segment. With the proper security settings, this ensures that neither segment will be altered or unexpectedly read at run time. Privileged Dual Partition mode is not implemented on all devices with Dual Partition capability. Refer to the specific device data sheet for details. DS B-page Microchip Technology Inc.
9 Dual Partition Flash Program Memory Figure 3-1: Standard and Dual Partition User Memory Space Map Standard (Single Partition) Mode Vector Area Active Flash Program Memory Dual Partition Modes Vector Area Active Flash Program Memory Flash Configuration Words FBTSEQ h 000xFEh (1) 000x00h (1) 0xxxFCh (2) 0xxxFEh (2) 0xxx00h (2) Flash Configuration Words Reserved 0xxxFCh (3) 0xxxFEh (3) 0xxx00h (3) Active Partition Unimplemented Read 0 Unimplemented Read 0 Vector Area Inactive Flash Program Memory Flash Configuration Words FBTSEQ h 400xFEh (1) 400x00h (1) 4xxxFCh (2) 4xxxFEh (2) 4xxx00h (2) Inactive Partition Unimplemented Read 0 7FFFFEh Legend: Memory areas are not shown to scale. Note 1: Default vector area boundaries are h for PIC24 devices and h for dspic33 devices. 2: Memory boundary values in Dual Partition modes are one-half of the values of Standard Partition mode. 3: Exact program memory boundaries are determined by the size of the implemented program memory Microchip Technology Inc. DS B-page 9
10 dspic33/pic24 Family Reference Manual SELECTING A CODE PARTITION In Dual Partition modes, there are two methods of determining which partition will be mapped to the Active Partition and executed: the Boot Sequence Number and the BOOTSWP instruction. The P2ACTIV bit (NVMCON<10>) can be used to determine which physical partition is the Active Partition. If P2ACTIV = 1, Partition 2 is active; if P2ACTIV = 0, Partition 1 is active. The Boot Sequence Number is a 12-bit value that is used for automatically determining the Active Partition upon device Reset. Each partition should have a unique Boot Sequence Number, which is stored in the FBTSEQ Flash Configuration Word. The BOOTSWP instruction is used to swap Active and Inactive Partitions without a device Reset Boot Sequence Number The 12-bit Boot Sequence Number is stored in the FBTSEQ Flash Configuration Word, which is always located at the last location of user program memory, above the other Flash Configuration Words (see Figure 3-2). Unlike other Configuration registers, which only use the lower 16 bits of the program memory word, FBTSEQ is a full 24 bits wide. Each partition should, under normal operating conditions, have a different value for FBTSEQ. When Dual Partition modes are not used, the value of FBTSEQ is ignored. The Boot Sequence Number is stored in two parts: the actual value in the bit field, BSEQx (FBTSEQ<11:0>), and the one s complement of the value in the IBSEQx bits field (FBTSEQ<23:12>). When the Boot Sequence Number is read upon a device Reset, the values of BSEQx and IBSEQx are automatically compared. If these two values are not mutual complements, the Boot Sequence Number is considered invalid. The complement value is not automatically created by hardware, nor is it verified by hardware upon programming. The application must calculate and program the appropriate value. On device Reset, the Boot Sequence Numbers in both partitions are compared. The partition with the lower BSEQx value is the one that is mapped to the Active Partition and its code is executed. If one of the Boot Sequence Numbers is invalid, the device will select the partition with the valid Boot Sequence Number as the Active Partition, regardless of which Boot Sequence Number is lower. If both Boot Sequence Numbers are invalid, Partition 1 will be selected by default as the Active Partition. The partitions can be prepared to be swapped during run time by reprogramming the Boot Sequence Number of the Inactive Partition to have a lower value. When a Reset is executed, the partition that has the lower value now becomes active. This method is used when the Inactive Partition has been updated and is then mapped to the Active Partition after a Reset. The location of FBTSEQ allows it to be easily excluded from a checksum or other verification of the Flash program memory. Because the FBTSEQ value is likely to be determined at run time (based on the BSEQx of the other partition), it often cannot be included in a checksum, such as a CRC. The sequence at the top of Figure 3-3 shows the relationship between the code partitions when the Boot Sequence Number is altered and a device Reset is executed. Figure 3-2: FBTSEQ in Relationship to Other Configuration Words (Dual Partition Modes Only) IBSEQx FBTSEQ Configuration Word BSEQx Legend: Note: Shaded area is unimplemented and always read as 0. Addresses reflect relative positions at the upper boundary of implemented program memory. FBTSEQ and the other Configuration Words are not necessarily proximate; the relationship shown here is for sake of comparison. DS B-page Microchip Technology Inc.
11 Dual Partition Flash Program Memory BOOTSWP Instruction The BOOTSWP instruction is an extension to the PIC24 and dspic33 instruction set. It supports the code, Live Update, by allowing Code Segments to be swapped between the Active and Inactive Partitions without the need for a device Reset. A partition swap using the BOOTSWP instruction is referred to as a soft swap. To execute a BOOTSWP instruction, the Configuration bit, BTSWP (FIDC<25>), must be cleared. If a BOOTSWP instruction is attempted with BTSWP set, a NOP instruction will result. The BOOTSWP instruction must always be followed by a single-word instruction that writes the PC (e.g., GOTO W, CALL W or BRA W); the target of the instruction must be at an address within 32 Kbytes of the current address. Upon execution, the Active and Inactive Partitions trade places, and the PC vectors to the location specified by the GOTO instruction in the newly Active Partition. Note: If the BOOTSWP instruction is executed from within a function that has created a new stack frame using the LNK instruction, a CALL must be used following BOOTSWP rather than a GOTO; otherwise, the device will generate a stack error trap. After the execution of the BOOTSWP instruction, the SFTSWP bit (NVMCON<11>) is set. This bit indicates to the firmware that the BOOTSWP instruction occurred correctly and that the currently Active Partition was entered via BOOTSWP rather than via a device Reset. Status bit, P2ACTIV (NVMCON<10>), can also be read to verify which partition is active. It is important to note that, after the partition swap, all peripherals and interrupts which were previously enabled remain enabled. Additionally, the RAM and stack maintain their states after the swap. It is highly recommended that applications using soft swaps jump to a routine that re-initializes the device in order to ensure the application continues to run as expected. For robustness of operation, it is necessary to execute the standard NVM unlocking sequence prior to executing the BOOTSWP instruction (writing 55h and AAh to the NVMKEY register in two sequential steps; see Section 4.1 Registers for more information). It is important to also disable interrupts before executing the unlock sequence. If the unlocking sequence is not performed, BOOTSWP will be executed as a forced NOP. The GOTO instruction following BOOTSWP is still executed, causing the PC to jump to that location in the current operating partition. Similarly, BOOTSWP has no effect in Standard Partition mode. The sequence at the bottom of Figure 3-3 shows the relationship between the partitions when a BOOTSWP instruction is executed. Note that a BOOTSWP partition change is temporary; after a subsequent device Reset, the partition with the lower Boot Sequence Number is reassigned to the Active Partition Microchip Technology Inc. DS B-page 11
12 dspic33/pic24 Family Reference Manual Figure 3-3: Comparing Partition Swap Methods Reprogramming FBTSEQ h h h Partition 1 Partition 1 Partition 2 FBTSEQ = 10 FBTSEQ = 10 FBTSEQ = 5 Reprogram FBTSEQ Reset h h h Partition 2 Partition 2 Partition 1 FBTSEQ = 15 FBTSEQ = 5 FBTSEQ = 10 BOOTSWP Instruction h h h Partition 1 Partition 2 Partition 1 FBTSEQ = 10 FBTSEQ = 15 FBTSEQ = 10 BOOTSWP Instruction Reset h Partition h Partition h Partition 2 FBTSEQ = 15 FBTSEQ = 10 FBTSEQ = 15 DS B-page Microchip Technology Inc.
13 Dual Partition Flash Program Memory 4.0 FLASH MEMORY PROGRAMMING PIC24 and dspic33 devices can be programmed by any one of three methods: Run-Time Self-Programming (RTSP) In-Circuit Serial Programming (ICSP ) Enhanced In-Circuit Serial Programming (EICSP) RTSP is performed by the application software during execution, while ICSP and EICSP are performed from an external programmer using a serial data connection to the device. ICSP and EICSP allow much faster programming time than RTSP. RTSP techniques are described in this section. The ICSP and EICSP protocols are defined in the programming specification documents for the respective devices, which can to be downloaded from the Microchip web site ( 4.1 Registers Programming operations are controlled through six registers. The NVMCON and NVMKEY registers are used to enable and select all operations. The remaining four registers define Data and Address Pointers. Note: Not all devices implement data RAM buffer programming. Refer to the specific device data sheet for more information CONTROL REGISTERS The NVMCON register (Register 4-1) controls all Flash programming operations. The NVMOP<3:0> bits (NVMCOM<3:0>) select the particular write or erase operation to be performed. The WR bit (NVMCOM<15>) triggers the appropriate operation; it remains set until the operation has been completed and is then cleared by hardware. The WREN bit (NVMCOM<14>) enables or disables write and erase operations. The WR bit cannot be set to trigger operations when WREN is clear. NVMKEY is a write-only register that is used to prevent accidental writes or erasures of Flash memory; only the lower byte is implemented.to start a program or erase sequence, an unlock sequence of two writes is performed on the register: 1. Write 55h to NVMKEY<7:0>. 2. Write AAh to NVMKEY<7:0>. After this sequence, a write will be allowed to the NVMCON register for one instruction cycle ADDRESS REGISTERS The NVMADRL and NVMADRH registers define the Start Address Pointer for write operations. Both types of program memory writes (latch-based and RAM buffered) use these registers to set the destination address. The NVMSRCADRL and NVMSRCADRH registers define the starting address in data RAM of the source data when using RAM buffered programming. The NVMSRCADRH register is used on devices with Extended Data Space (EDS) to point to addresses in the Extended Data Space memory Microchip Technology Inc. DS B-page 13
14 dspic33/pic24 Family Reference Manual Register 4-1: NVMCON: Flash Programming Control Register R/S-0 (1) R/C-0 R/C-0 R/W-0 R/C-0 R-0 R/W-0 R/C-0 WR WREN WRERR NVMPIDL (5) SFTSWP P2ACTIV RPDF (2) URERR (2) bit 15 bit 8 U-0 U-0 U-0 U-0 R/W-0 R/W-0 R/W-0 R/W-0 NVMOP3 NVMOP2 NVMOP1 NVMOP0 bit 7 bit 0 Legend: S = Settable Only bit C = Clearable Only bit R = Readable bit W = Writable bit U = Unimplemented bit, read as 0 -n = Value at POR 1 = Bit is set 0 = Bit is cleared x = Bit is unknown bit 15 WR: Write Control bit (1) bit 14 1 = Initiates a Flash program/erase operation 0 = Program/erase operation is complete and inactive WREN: Program/Erase Enable bit 1 = Allows program/erase cycles 0 = Inhibits programming/erasing of memory or fuse elements bit 13 WRERR: Sequence Error Flag bit 1 = An improper program/erase termination has occurred or an unimplemented programming operation has been selected 0 = A program or erase operation is under way, has completed normally or has yet to start bit 12 NVMPIDL: NVM Power-Down in Idle Enable bit (5) bit 11 1 = Removes power from Flash arrays when device enters Idle mode 0 = Keeps Flash arrays powered in Standby mode when device enters Idle mode SFTSWP: Soft Swap Status bit When BTMODE<1:0> = 10 or 0x: 1 = Partitions have been successfully swapped using the BOOTSWP instruction 0 = Awaiting successful partition swap using the BOOTSWP instruction When BTMODE<1:0> = 11: Unimplemented, read as 0. bit 10 P2ACTIV: Dual Partition Active Status bit When BTMODE<1:0> = 10 or 0x: 1 = Partition 2 Flash is the Active Partition 0 = Partition 1 Flash is the Active Partition When BTMODE<1:0> = 11: Unimplemented, read as 0. bit 9 RPDF: RAM Buffer Row Programming Data Format Control bit (2) 1 = Row data is stored in RAM in compressed format 0 = Row data is stored in RAM in uncompressed format Note 1: This bit is also reset on a Brown-out Reset (BOR). 2: RAM buffer row operations are not available on all devices; in those cases, these bits are unimplemented and read as 0. 3: Selecting these options will set the WRERR bit and clear the WR bit. 4: Double-word program operations require two adjacent instruction words (24 bits each), aligned on a 4-instruction word boundary. 5: Implemented in select devices only; refer to the specific device data sheet for details. DS B-page Microchip Technology Inc.
15 Dual Partition Flash Program Memory Register 4-1: NVMCON: Flash Programming Control Register (Continued) bit 8 URERR: RAM Buffer Row Programming Data Underrun Error Flag bit (2) 1 = Programming operation has terminated due to a data underrun error 0 = No data underrun error is detected. bit 7-4 Unimplemented: Read as 0 bit 3-0 NVMOP<3:0>: NVM Operation Select bits (initiated by the next setting of WR) 1xxx = Reserved (3) 011x = Reserved (3) 0101 = Reserved (3) 0100 = Inactive Partition erase operation (reserved option in Standard Partition mode) 0011 = Page erase operation 0010 = Row program operation 0001 = Double-word program operation (4) 0000 = Reserved (3) Note 1: This bit is also reset on a Brown-out Reset (BOR). 2: RAM buffer row operations are not available on all devices; in those cases, these bits are unimplemented and read as 0. 3: Selecting these options will set the WRERR bit and clear the WR bit. 4: Double-word program operations require two adjacent instruction words (24 bits each), aligned on a 4-instruction word boundary. 5: Implemented in select devices only; refer to the specific device data sheet for details Microchip Technology Inc. DS B-page 15
16 dspic33/pic24 Family Reference Manual 4.2 Table Operation Instructions The table instructions provide one method of transferring data between the program memory space and the data memory space of the PIC24 and dspic33 devices. A summary of the table instructions used during programming of the Flash program memory is provided in this section. There are four basic table instructions: TBLRDL: Table Read Low TBLRDH: Table Read High TBLWTL: Table Write Low TBLWTH: Table Write High The TBLRDL and the TBLWTL instructions are used to read and write to bits<15:0> of program memory space. TBLRDL and TBLWTL can access program memory in Word or Byte mode. The TBLRDH and TBLWTH instructions are used to read or write to bits<23:16> of program memory space. TBLRDH and TBLWTH can access program memory in Word or Byte mode. Since the program memory is only 24 bits wide, the TBLRDH and TBLWTH instructions have the ability to address an upper byte of program memory that does not exist. This byte is called the phantom byte. Any read of the phantom byte returns 00h; a write to the phantom byte has no effect ADDRESS GENERATION FOR TABLE OPERATIONS The 24-bit program memory can be regarded as two, side-by-side 16-bit spaces, with each space sharing the same address range. Therefore, the TBLRDL and TBLWTL instructions access the low program memory space (PM<15:0>). The TBLRDH and TBLWTH instructions access the high program memory space (PM<31:16>). Any reads or writes to PM<31:24> will access the phantom (unimplemented) byte. When any of the table instructions are used in Byte mode, the LSb of the table address will be used as the byte select bit. The LSb determines which byte in the high or low program memory space is accessed. Figure 4-1 illustrates how the program memory is addressed using the table instructions. A 24-bit program memory address is formed using the TBLPAG<7:0> bits and the Effective Address (EA) from a W register, specified in the table instruction (the 24-bit Program Counter is shown for reference). The upper 23 bits of the EA are used to select the program memory location. For the Byte mode table instructions, the LSb of the W register EA is used to pick which byte of the 16-bit program memory word is addressed. A 1 selects bits<15:8>, a 0 selects bits<7:0>. The LSb of the W register EA is ignored for a table instruction in Word mode. In addition to the program memory address, the table instructions also specify a W register (or a W Pointer to a memory location) that is the source of the program memory data to be written or the destination for a program memory read. For a Table Write operation in Byte mode, bits<15:8> of the source Working register are ignored. Figure 4-1: Addressing for Table Registers 24 Bits Using Program Counter 0 Program Counter 0 Working Register EA Using Table Instruction 1/0 TBLPAG Reg 8 Bits 16 Bits User/Configuration Space Select 24-Bit EA Byte Select DS B-page Microchip Technology Inc.
17 Dual Partition Flash Program Memory LOW WORD ACCESS The TBLRDL and TBLWTL instructions are used to access the lower 16 bits of program memory data. The LSb of the W register address is ignored for word-wide table accesses. For byte-wide accesses, the LSb of the W register address determines which byte is read. Figure 4-2 illustrates the program memory data regions accessed by the TBLRDL and TBLWTL instructions. Figure 4-2: Program Data Table Access (Low Word) PC Address h TBLRDL.W h h h TBLRDL.B (Wn<0> = 1) TBLRDL.B (Wn<0> = 0) Phantom Byte (Read as 0 ) HIGH WORD ACCESS The TBLRDH and TBLWTH instructions are used to access the upper 8 bits of the program memory data. These instructions also support Word or Byte Access modes for orthogonality, but the high byte of the program memory data will always return 0, as shown in Figure 4-3. Figure 4-3: Program Data Table Access (High Word) TBLRDH.W Phantom Byte (Read as 0 ) PC Address h TBLRDH.B (Wn<0> = 1) h h h TBLRDH.B (Wn<0> = 0) DATA STORAGE IN PROGRAM MEMORY It is assumed that for most applications, the high byte (PM<23:16>) will not be used for data, making the program memory appear 16 bits wide for data storage. It is recommended that the upper byte of program data be programmed either as a NOP (00h or FFh), or as an illegal opcode (3Fh) value, to protect the device from accidental execution of stored data. The TBLRDH and TBLWTH instructions are primarily provided for array program/verification purposes, and for those applications that require compressed data storage PROGRAM MEMORY BIT BEHAVIOR Bits in Flash program memory can only be programmed from 1 to 0 and can be subsequently erased to 1. Attempting to set a bit with a programming sequence will have no effect Microchip Technology Inc. DS B-page 17
18 dspic33/pic24 Family Reference Manual USING TABLE READ INSTRUCTIONS Table Reads require two steps. First, an Address Pointer is set up using the TBLPAG register and one of the W registers. Then, the program memory contents at the address location may be read. The code examples in Example 4-1 and Example 4-2 demonstrate how to read a word of program memory using the table instructions in Word mode. Example 4-1: Read Word Mode (in Assembly) ; Set up the address pointer to program space MOV #tblpage(prog_addr), W0 ; get table page value MOV W0,TBLPAG ; load TBLPAG register MOV #tbloffset(prog_addr), W0 ; load address LS word ; Perform the table writes to load the latch TBLRDL [W0], W2 TBLRDH [W0], W3 Example 4-2: Read Word Mode (in C) int addroffset; int varword1; int varword2; TBLPAG = ((PROG_ADDR & 0x7F0000)>>16); addroffset = (PROG_ADDR & 0x00FFFE); varword1 = builtin_tblrdl(addroffset); varword2 = builtin_tblrdh(addroffset); Note: The tblpage() and tbloffset() directives are provided by the Microchip assembler for dspic33 and PIC24 devices. These directives select the appropriate TBLPAG and W register values for the table instruction from a program memory address value. Refer to the MPLAB Assembler, Linker and Utilities for PIC24 MCUs and dspic DSCs User s Guide (DS51317) for more information. DS B-page Microchip Technology Inc.
19 Dual Partition Flash Program Memory TABLE WRITE HOLDING LATCHES Table Write instructions do not write directly to the Flash program array. Instead, the instructions cause the data to be programmed to be loaded first into holding latches. These latches are memory-mapped in configuration memory space, typically starting at FA0000h, and can only be accessed using the Table Write instructions. When all of the holding latches have been loaded, the actual memory programming operation is started by executing a special sequence of instructions. Different devices implement different numbers of holding latches, based on a specific program array design (i.e., the row programming size and row programming algorithm). Please refer to the specific device data sheet and/or programming specification for further details Performing a Two-Word Write Word writes are performed for two words at a time using a pair of TBLWTH and TBLWTL instructions. The code sequences in either Example 4-3 or Example 4-4 (C equivalent) can be used to write two program memory latch locations to be programmed to Flash using Word Write mode. Example 4-3: Two-Word Write Example (in Assembly) ; Set up the address pointer to 1st write latch MOV 0xFA, W0 ; get table page value MOV W0,TBLPAG ; load TBLPAG register MOV 0x0, W0 ; load address LS word ; Load write data into W registers MOV #PROG_LOW_WORD_1, W2 MOV #PROG_HI_BYTE_1, W3 MOV #PROG_LOW_WORD_2, W4 MOV #PROG_HI_BYTE_2, W5 ; Perform the table writes to load the latch TBLWTL W2, [W0] TBLWTH W3, [W0++] TBLWTL W4, [W0] TBLWTH W5, [W0++] Example 4-4: Two-Word Write Example (in C) int varword1l = 0xXXXX; int varword1h = 0x00XX; int varword2l = 0xXXXX; int varword2h = 0x00XX; int addroffset; int TargetWriteAddressL; int TargetWriteAddressH; // bits<15:0> // bits<22:16> NVMCON = 0x4001; TBLPAG = 0xFA; addroffset = (PROG_ADDR & 0x00FFFE); NVMADRL = TargetWriteAddressL; NVMADRH = TargetWriteAddressH; builtin_tblwtl(0,varword1l); builtin_tblwth(0,varword1h); builtin_tblwtl(0x2,varword2l); builtin_tblwth(0x2,varword2h); builtin_disi(5); builtin_write_nvm(); // Set WREN and word program mode // write latch upper address // ensure address is properly aligned // set target write address // load write latches // Disable interrupts for NVM unlock sequence // initiate write Microchip Technology Inc. DS B-page 19
20 dspic33/pic24 Family Reference Manual 4.3 Run-Time Self-Programming (RTSP) RTSP allows the user code to modify Flash program memory contents. RTSP is accomplished using TBLRD (Table Read) and TBLWT (Table Write) instructions, and the NVM Control registers. PIC24 and dspic33 devices support the following Flash programming operations: Flash page erases Row programming (either latch-based or RAM-based) Word programming Flash programming via RTSP is performed, either with blocks of memory called rows, or with two words of Flash memory. Prior to programming, a memory location must be erased. Erase operations are performed on blocks of memory called pages which consist of multiple rows. The size of a row will vary by device; refer to the device data sheet for details. Typically, for dspic33 and PIC24 devices, a page is defined as eight (8) rows. This document uses examples with 64 instructions per row (512 instructions per page) ROW PROGRAMMING USING WRITE HOLDING LATCHES As discussed in Section Table Write Holding Latches, devices which implement latch-based row programming have holding latches which contain the programming data. Prior to the actual programming operation, the write data must be loaded into the latches via TBLWT instructions in sequential order. When performing a row write, the instruction words must be loaded into the latches as a full row. The basic sequence for RTSP programming is to set up a Table Pointer, then do a series of TBLWT instructions to load the buffers. Programming is performed by setting the control bits in the NVMCON register. For example, on a device with 64 instruction rows, a programming cycle would consist of 64 TBLWTL and 64 TBLWTH instructions to load the write latches, followed by a programming sequence unlocking NVMCON and setting the WR bit. Example 4-5 shows an example of the process. Example 4-5: Row Programming with Write Latches (in C) int varwordl[64]; int varwordh[64]; int targetwriteaddressl; // bits<15:0> int targetwriteaddressh; // bits<22:16> int i; NVMCON = 0x4002; TBLPAG = 0xFA; NVMADRL = targetwriteaddressh; NVMADRH = targetwriteaddressl; // Set WREN and row program mode // set target write address for(i=0; i<=63; i++) // load write latches with data { // to be written builtin_tblwtl(i, varwordl[i]); builtin_tblwth((i * 2), varwordh[i]); } builtin_disi(5); // Disable interrupts for NVM unlock sequence builtin_write_nvm(); // initiate write DS B-page Microchip Technology Inc.
21 Dual Partition Flash Program Memory ROW PROGRAMMING USING THE RAM BUFFER Select dspic33 and PIC24 devices permit row programming to be performed directly from a buffer space in data RAM, rather than going through the holding latches to transfer data with TBLWT instructions. The location of the RAM buffer is determined by the NVMSRCADR register(s), which are loaded with the data RAM address containing the first word of program data to be written. Prior to performing the program operation, the buffer space in RAM must be loaded with the row of data to be programmed. The RAM can be loaded in either a compressed (packed) or uncompressed format. Compressed storage uses one data word to store the Most Significant Bytes (MSBs) of two adjacent program data words. The uncompressed format uses two data words for each program data word, with the upper byte of every other word being 00h. Compressed format uses about 3/4 of the space in data RAM as compared to uncompressed format. Uncompressed format, on the other hand, mimics the structure of the 24-bit program data word, complete with the upper phantom byte. The data format is selected by the RPDF bit (NVMCON<9>). These two formats are shown in Figure 4-4. Once the RAM buffer is loaded, the Flash Address Pointers, NVMADRL and NVMADRH, are loaded with the 24-bit start address of the Flash row to be written. As with programming the write latches, the process is initiated by writing the NVM unlock sequence, followed by setting the WR bit. Once initiated, the device automatically loads the right latches and increments the NVM Address registers until all bytes have been programmed. Example 4-6 shows an example of the process. If NVMSRCADR is set to a value such that a data underrun error condition occurs, the URERR bit (NVMCON<8>) will be set to indicate the condition. Devices which implement RAM buffer row programming also implement one or two write latches. These are loaded using the TBLWT instructions and are used to perform word programming operations. Figure 4-4: Uncompressed and Compressed Storage Formats for Program Data Uncompressed Format (RPDF = 0) Compressed Format (RPDF = 1) LSW1 LSW1 Address 00h LSW2 MSB1 MSB2 LSW2 MSB1 00h MSB2 Even Byte Addresses Example 4-6: Writing Program Memory from a Data RAM Buffer (in C) int data[64]; // Data to be programmed in RAM int targetwriteaddressl; // bits<15:0> int targetwriteaddressh; // bits<22:16> NVMCON = 0x4002; NVMCONbits.RPDF = 0; NVMSRCADRL = (int)&data[0]; NVMADRL = targetwriteaddressl; NVMADRH = targetwriteaddressh; builtin_disi(5); builtin_write_nvm(); // Row programming // Select compressed format // Start address of data in RAM // Disable interrupts for NVM unlock sequence Microchip Technology Inc. DS B-page 21
22 dspic33/pic24 Family Reference Manual 4.4 General Flash Programming Algorithms Flash programming operations are controlled using the following Nonvolatile Memory (NVM) control registers: NVMCON NVMKEY NVMADRL/H NVMSRCADRL/H (some devices) A complete programming sequence is necessary for programming or erasing the internal Flash in RTSP mode. Setting the WR bit (NVMCON<15>) starts the operation and the WR bit is automatically cleared when the operation is finished. When performing Flash programming operations on the Active Partition (particularly in Standard Partition mode), the CPU will stall until the operation is complete. When programming the Inactive Partition, the CPU can continue to operate without stalling. The following sections outline programming algorithms that exhibit CPU stall and no stall ERASING PROGRAM MEMORY (ACTIVE PARTITION) 1. Set the NVMOPx bits (NVMCOM<3:0>) to 0011 to configure for page erase and set the WREN bit (NVMCOM<14>). 2. Write the starting address of the block to be erased into the NVMADRL/H registers. 3. Disable interrupts. 4. Write 55h to NVMKEY. 5. Write AAh to NVMKEY. 6. Set the WR bit (NVMCOM<15>) to start the erase cycle. 7. Execute two NOP instructions. When the erase is done, the WR bit is cleared automatically ROW PROGRAMMING (ACTIVE PARTITION, STANDARD PARTITION MODE) The user can program one row of program Flash memory at a time. To do this, it is necessary to erase the page containing the desired row. The general process for row programming to the Active Partition is: 1. Read eight rows of program memory (512 instructions) and store in data RAM. 2. Update the program data in RAM with the desired new data. 3. Erase the block: a) Set the NVMOPx bits (NVMCOM<3:0>) to 0011 to configure for page erase and set the WREN bit (NVMCOM<14>). b) Write the starting address of the block to be erased into the NVMADRL/H registers. c) Write 55h to NVMKEY. d) Write AAh to NVMKEY. e) Set the WR bit (NVMCOM<15>). The erase cycle begins and the CPU stalls for the duration of the erase cycle. When the erase is done, the WR bit is cleared automatically. 4. Write the first 64 instructions from data RAM into the program memory buffers (see Section Table Write Holding Latches ) or write the NVMSRCADR register with the starting address of the data stored in RAM. 5. Write the program block to Flash memory: a) Set the NVMOPx bits to 0010 to configure for row programming and set the WREN bit. b) Write 55h to NVMKEY. c) Write AAh to NVMKEY. d) Set the WR bit. The programming cycle begins and the CPU stalls for the duration of the write cycle. When the write to Flash memory is done, the WR bit is cleared automatically. 6. Repeat Steps 4 and 5, using the next available 64 instructions from the block in data RAM by incrementing the addresses in NVMADRL/H, until all 512 instructions are written back to Flash memory. DS B-page Microchip Technology Inc.
23 Dual Partition Flash Program Memory Note: Not all devices will exhibit CPU stall during a write or erase cycle. To avoid stalls, it is recommended to avoid reads or writes by the application to the row being erased or written. For protection against accidental operations, the write initiate sequence for NVMKEY is required prior to any erase or program operation. After the programming command has been executed, the user must wait for the programming time until programming is complete. The two instructions following the start of the programming sequence should be NOPs. Note 1: The number of rows, blocks and holding latches may vary from device to device; please refer to the specific device data sheet for actual numbers, as well as the complete reference code of Flash memory programming. 2: For devices with a single holding latch, the Flash program memory must be written to by word programming PROGRAMMING A PAGE IN THE INACTIVE PARTITION (DUAL PARTITION MODES) Programming in Dual Partition modes requires special considerations. Because the CPU is able to continue executing instructions while the Inactive Partition is being programmed, CPU stalls will not occur. The algorithm for erasing and reprogramming a page of data in one of the Dual Partition modes is as follows: 1. Erase the block: a) Set the NVMOPx bits (NVMCOM<3:0>) to 0011 to configure for page erase. b) Set the WREN bit (NVMCOM<14>). c) Write the starting address of the block to be erased into the NVMADR registers with the page address. d) Write 55h to NVMKEY. e) Write AAh to NVMKEY. f) Set the WR bit (NVMCOM<15>). The erase cycle begins and the CPU will remain running. g) When the erase is done, the WR bit is cleared automatically and the NVM Write Complete Interrupt Flag (NVMIF) will occur. 2. Prepare the data to be programmed by filling the RAM buffer; alternately, load the write latches with TBLWT instructions with the data for the first row of memory (64 instructions). 3. Program the block: a) Set the NVMOPx bits (NVMCON<3:0>) to 0010 to configure for row programming. b) Set the WREN (NVMCON<14>) bit. c) Write the starting address of the block to be written into the NVMADR registers with the row starting address. d) Write 55h to NVMKEY. e) Write AAh to NVMKEY. f) Set the WR bit (NVMCOM<15>). The write cycle begins and the CPU will remain running. g) When the erase is done, the WR bit is cleared automatically and the NVM Write Complete Interrupt Flag (NVMIF) will occur. 4. Repeat Steps 2 and 3 to program each of the remaining rows of data in the erased page Microchip Technology Inc. DS B-page 23
24 dspic33/pic24 Family Reference Manual PROGRAMMING THE ENTIRE INACTIVE PARTITION (DUAL PARTITION MODES) To entirely update the code in the Inactive Partition: 1. Erase the Inactive Partition: a) Set the NVMOPx bits (NVMCOM<3:0>) to 0100 to configure for Inactive Partition erase. b) Set the WREN bit (NVMCOM<14>). c) Write 55h to NVMKEY. d) Write AAh to NVMKEY. e) Set the WR bit (NVMCOM<15>). The erase cycle begins and the CPU will remain running during the cycle. When the erase is done, the WR bit is cleared automatically, and the NVM Write Complete Interrupt Flag (NVMIF) occurs. 2. Write each page of the Inactive Partition using page writes, as described in Section Programming a Page in the Inactive Partition (Dual Partition Modes). 3. Verify the written data. One suggested method is to perform a CRC on the data to be written and verify the CRC value on the full partition to ensure the data was written correctly UPDATING THE ACTIVE PARTITION USING A BOOTLOADER 1. Erase and program the entire Inactive Partition as described in Section Programming the Entire Inactive Partition (Dual Partition Modes). 2. Read the FBTSEQ Configuration register of the Active Partition. 3. Decrement the value by one and write to FBTSEQ of the Inactive Partition. 4. Force a partition swap: a) If CPU stalls are not a concern, perform a device Reset. Since the Inactive Partition has a lower Boot Sequence Number, it will become the Active Partition after the Reset. b) If a CPU stall is not acceptable, execute the BOOTSWP instruction. DS B-page Microchip Technology Inc.
25 Dual Partition Flash Program Memory 5.0 PROGRAM SPACE VISIBILITY AND EXTENDED DATA SPACE (PSV AND EDS) For all dspic33 and PIC24 devices, table instructions (see Section 4.2 Table Operation Instructions ) can be used to access data within the program memory space. This is useful when data only needs to be read or written, one byte or word at a time. It is also possible to map 16K word pages of the program memory space into the upper 32 Kbytes of the data address space. This allows an effective expansion of the data space beyond its normal 64-Kbyte addressing limits, as well as transparent access without the use of table instructions. All dspic33 and PIC24 devices are able to map any page in the implemented program memory space into the data space. This feature is known as Program Space Visibility (PSV). Some devices expand PSV by memory-mapping certain peripherals to a specific range of virtual program memory pages. This feature is particularly useful for peripherals, such as the Advanced Graphics Controller, which has high data throughput requirements. This expansion of PSV is know as Extended Data Space (EDS). PSV and EDS are implemented as features of the data memory. They are implemented differently for dspic33 and PIC24 devices. For a detailed description, refer to the dspic33/pic24 Family Reference Manual, Data Memory. (dspic33, DS70595) and/or Data Memory (PIC24, DS39717). 5.1 PSV and Instruction Stalls For more information about instruction stalls using PSV, refer to the dspic33/pic24 Family Reference Manual, dspic33e Enhanced CPU (DS ) Microchip Technology Inc. DS B-page 25
26 DS B-page Microchip Technology Inc. 6.0 REGISTER MAP A summary of the SFRs associated with the Dual Partition Flash Program Memory is provided in Table 6-1. Table 6-1: Special Function Registers Associated with Flash Program Memory (1) File Name Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 TBLPAG Table Page Address Pointer 0000 NVMCON WR WREN WRERR NVMPIDL SFTSWP P2ACTIV RPDF URERR NVMOP3 NVMOP2 NVMOP1 NVMOP NVMKEY NVMKEY<7:0> 0000 NVMSRCADRL Data RAM Programming Buffer Start Address 0000 NVMSRCADRH Data RAM Programming Buffer Address (EDS Operations Only) 0000 NVMADRL Flash Program Memory Destination Address, Lower Byte (ADDR<15:0>) 0000 NVMADRH Flash Program Memory Destination Address, Upper Byte (ADDR<23:16>) 0000 Legend: = unimplemented, read as 0. Reset values are shown in hexadecimal. Note 1: Please refer to the device data sheet for specific memory map details. 2: Reset value shown is for POR only. Value on other Reset states is dependent on the state of the memory write or erase operations at the time of Reset. All Resets (2) dspic33/pic24 Family Reference Manual
27 Dual Partition Flash Program Memory 7.0 RELATED APPLICATION NOTES This section lists application notes that are related to this section of the manual. These application notes may not be written specifically for the PIC24 or dspic33 product families, but the concepts are pertinent and could be used with modification and possible limitations. The current application notes related to the Dual Partition Flash Program Memory are: Title Application Note # No related application notes at this time. Note: Please visit the Microchip web site ( for additional Application Notes and code examples for the PIC24 and dspic33 families of devices Microchip Technology Inc. DS B-page 27
28 dspic33/pic24 Family Reference Manual 8.0 REVISION HISTORY Revision A (March 2014) Original version of this document. Revision B (February 2015) Changed the title and all instances of the phrase, Dual Boot Flash Program Memory to Dual Partition Flash Program Memory or Dual Partition Flash. DS B-page Microchip Technology Inc.
29 Note the following details of the code protection feature on Microchip devices: Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as unbreakable. Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. QUALITY MANAGEMENT SYSTEM CERTIFIED BY DNV == ISO/TS == Trademarks The Microchip name and logo, the Microchip logo, dspic, FlashFlex, flexpwr, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, MediaLB, MOST, MOST logo, MPLAB, OptoLyzer, PIC, PICSTART, PIC 32 logo, RightTouch, SpyNIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The Embedded Control Solutions Company and mtouch are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, BodyCom, chipkit, chipkit logo, CodeGuard, dspicdem, dspicdem.net, ECAN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, KleerNet, KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. GestIC is a registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies , Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. ISBN: Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company s quality system processes and procedures are for its PIC MCUs and dspic DSCs, KEELOQ code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip s quality system for the design and manufacture of development systems is ISO 9001:2000 certified Microchip Technology Inc. DS B-page 29
30 Worldwide Sales and Service AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ Tel: Fax: Technical Support: support Web Address: Atlanta Duluth, GA Tel: Fax: Austin, TX Tel: Boston Westborough, MA Tel: Fax: Chicago Itasca, IL Tel: Fax: Cleveland Independence, OH Tel: Fax: Dallas Addison, TX Tel: Fax: Detroit Novi, MI Tel: Houston, TX Tel: Indianapolis Noblesville, IN Tel: Fax: Los Angeles Mission Viejo, CA Tel: Fax: New York, NY Tel: San Jose, CA Tel: Canada - Toronto Tel: Fax: ASIA/PACIFIC Asia Pacific Office Suites , 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: Fax: Australia - Sydney Tel: Fax: China - Beijing Tel: Fax: China - Chengdu Tel: Fax: China - Chongqing Tel: Fax: China - Dongguan Tel: China - Hangzhou Tel: Fax: China - Hong Kong SAR Tel: Fax: China - Nanjing Tel: Fax: China - Qingdao Tel: Fax: China - Shanghai Tel: Fax: China - Shenyang Tel: Fax: China - Shenzhen Tel: Fax: China - Wuhan Tel: Fax: China - Xian Tel: Fax: ASIA/PACIFIC China - Xiamen Tel: Fax: China - Zhuhai Tel: Fax: India - Bangalore Tel: Fax: India - New Delhi Tel: Fax: India - Pune Tel: Japan - Osaka Tel: Fax: Japan - Tokyo Tel: Fax: Korea - Daegu Tel: Fax: Korea - Seoul Tel: Fax: or Malaysia - Kuala Lumpur Tel: Fax: Malaysia - Penang Tel: Fax: Philippines - Manila Tel: Fax: Singapore Tel: Fax: Taiwan - Hsin Chu Tel: Fax: Taiwan - Kaohsiung Tel: Taiwan - Taipei Tel: Fax: Thailand - Bangkok Tel: Fax: EUROPE Austria - Wels Tel: Fax: Denmark - Copenhagen Tel: Fax: France - Paris Tel: Fax: Germany - Dusseldorf Tel: Germany - Munich Tel: Fax: Germany - Pforzheim Tel: Italy - Milan Tel: Fax: Italy - Venice Tel: Netherlands - Drunen Tel: Fax: Poland - Warsaw Tel: Spain - Madrid Tel: Fax: Sweden - Stockholm Tel: UK - Wokingham Tel: Fax: /27/15 DS B-page Microchip Technology Inc.
Section 5. Flash Programming
Section 5. Flash Programming HIGHLIGHTS This section of the manual contains the following topics: 5.1 Introduction...5-2 5.2 Control Registers... 5-3 5.3 Run-Time Self-Programming (RTSP) Operation... 5-10
Section 44. CPU with Extended Data Space (EDS)
Section 44. CPU with Extended Data Space (EDS) HIGHLIGHTS This section of the manual contains the following topics: 44.1 Introduction... 44-2 44.2 Programmer s Model... 44-5 44.3 Software Stack Pointer...
dspic33e/pic24e dspic33e/pic24e Flash Programming Specification 1.0 DEVICE OVERVIEW 2.0 PROGRAMMING OVERVIEW OF THE dspic33e/pic24e
dspic33e/pic24e dspic33e/pic24e Flash Programming Specification 1.0 DEVICE OVERVIEW This document defines the programming specification for the dspic33e 16-bit Digital Signal Controller (DSC) and PIC24E
How To Program A Microcontroller With Memory On A Microchip Microcontroller
Getting Started with On-chip Memory 2001 Microchip Technology Incorporated. All Rights Reserved. S0001A RAM/ROM(x14) 1 In this Getting Started tutorial you will learn about the various memory types found
MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1
MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable
Connecting AMD Flash Memory to a System Address Bus
Connecting AMD Memory to a System Address Bus Application Note This document is intended to clarify how memories may be connected to a system address bus and how software should issue device commands to
150127-Microprocessor & Assembly Language
Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an
Section 29. Real-Time Clock and Calendar (RTCC)
Section 29. Real-Time Clock and Calendar (RTCC) HIGHLIGHTS This section of the manual contains the following topics: 29.1 Introduction... 29-2 29.2 Status and Control Registers... 29-3 29.3 Modes of Operation...
W25Q80, W25Q16, W25Q32 8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI
8M-BIT, 16M-BIT AND 32M-BIT SERIAL FLASH MEMORY WITH DUAL AND QUAD SPI - 1 - Preliminary - Revision B Table of Contents 1. GENERAL DESCRIPTION... 5 2. FEATURES... 5 3. PIN CONFIGURATION SOIC 208-MIL...
Faculty of Engineering Student Number:
Philadelphia University Student Name: Faculty of Engineering Student Number: Dept. of Computer Engineering Final Exam, First Semester: 2012/2013 Course Title: Microprocessors Date: 17/01//2013 Course No:
M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features
512-Kbit, serial flash memory, 50 MHz SPI bus interface Features 512 Kbits of flash memory Page program (up to 256 bytes) in 1.4 ms (typical) Sector erase (256 Kbits) in 0.65 s (typical) Bulk erase (512
Single 2.5V - 3.6V or 2.7V - 3.6V supply Atmel RapidS serial interface: 66MHz maximum clock frequency. SPI compatible modes 0 and 3
32Mb, 2.5V or 2.7V Atmel ataflash ATASHEET Features Single 2.5V - 3.6V or 2.7V - 3.6V supply Atmel RapidS serial interface: 66MHz maximum clock frequency SPI compatible modes 0 and 3 User configurable
Production Flash Programming Best Practices for Kinetis K- and L-series MCUs
Freescale Semiconductor Document Number:AN4835 Application Note Rev 1, 05/2014 Production Flash Programming Best Practices for Kinetis K- and L-series MCUs by: Melissa Hunter 1 Introduction This application
MACHINE ARCHITECTURE & LANGUAGE
in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based
Advanced x86: BIOS and System Management Mode Internals SPI Flash. Xeno Kovah && Corey Kallenberg LegbaCore, LLC
Advanced x86: BIOS and System Management Mode Internals SPI Flash Xeno Kovah && Corey Kallenberg LegbaCore, LLC All materials are licensed under a Creative Commons Share Alike license. http://creativecommons.org/licenses/by-sa/3.0/
PIC24FJXXXGA0XX. PIC24FJXXXGA0XX Flash Programming Specification 1.0 DEVICE OVERVIEW 2.0 PROGRAMMING OVERVIEW OF THE PIC24FJXXXGA0XX FAMILY
PIC24FJXXXGA0XX Flash Programming Specification 1.0 DEVICE OVERVIEW This document defines the programming specification for the PIC24FJXXXGA0XX family of 16-bit microcontroller devices. This programming
Cryptographic Engine
Cryptographic Engine HIGHLIGHTS This section of the manual contains the following major topics: 1.0 Introduction... 2 2.0 Registers... 4 3.0 Theory of Operation... 12 4.0 Module Operation... 27 5.0 Operation
MICROPROCESSOR AND MICROCOMPUTER BASICS
Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit
AN3155 Application note
Application note USART protocol used in the STM32 bootloader Introduction This application note describes the USART protocol used in the STM32 microcontroller bootloader. It details each supported command.
NAND Flash Memories. Using Linux MTD compatible mode. on ELNEC Universal Device Programmers. (Quick Guide)
NAND Flash Memories Using Linux MTD compatible mode on ELNEC Universal Device Programmers (Quick Guide) Application Note April 2012 an_elnec_linux_mtd, version 1.04 Version 1.04/04.2012 Page 1 of 16 As
An Introduction to the ARM 7 Architecture
An Introduction to the ARM 7 Architecture Trevor Martin CEng, MIEE Technical Director This article gives an overview of the ARM 7 architecture and a description of its major features for a developer new
MBP_MSTR: Modbus Plus Master 12
Unity Pro MBP_MSTR 33002527 07/2011 MBP_MSTR: Modbus Plus Master 12 Introduction This chapter describes the MBP_MSTR block. What s in this Chapter? This chapter contains the following topics: Topic Page
Section 14. Compare/Capture/PWM (CCP)
M Section 14. Compare/Capture/PWM (CCP) HIGHLIGHTS This section of the manual contains the following major topics: 14.1 Introduction...14-2 14.2 Control Register...14-3 14.3 Capture Mode...14-4 14.4 Compare
AN1229. Class B Safety Software Library for PIC MCUs and dspic DSCs OVERVIEW OF THE IEC 60730 STANDARD INTRODUCTION
Class B Safety Software Library for PIC MCUs and dspic DSCs AN1229 Authors: Veena Kudva & Adrian Aur Microchip Technology Inc. OVERVIEW OF THE IEC 60730 STANDARD INTRODUCTION This application note describes
MPLAB TM C30 Managed PSV Pointers. Beta support included with MPLAB C30 V3.00
MPLAB TM C30 Managed PSV Pointers Beta support included with MPLAB C30 V3.00 Contents 1 Overview 2 1.1 Why Beta?.............................. 2 1.2 Other Sources of Reference..................... 2 2
AN11008 Flash based non-volatile storage
Rev. 1 5 January 2011 Application note Document information Info Content Keywords Flash, EEPROM, Non-Volatile Storage Abstract This application note describes the implementation and use of a library that
PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section
PRELIMINARY DS2434 Battery Identification Chip FEATURES Provides unique ID number to battery packs PACKAGE OUTLINE Eliminates thermistors by sensing battery temperature on chip DALLAS DS2434 1 2 3 256
Serial Communications / Protocol in AirTest Products
Serial Communications / Protocol in AirTest Products General The standard sensor has two different ways of serial communication with sensor s peripherals and the outside world. One is through the UART
Adapting the PowerPC 403 ROM Monitor Software for a 512Kb Flash Device
Adapting the PowerPC 403 ROM Monitor Software for a 512Kb Flash Device IBM Microelectronics Dept D95/Bldg 060 3039 Cornwallis Road Research Triangle Park, NC 27709 Version: 1 December 15, 1997 Abstract
ENTTEC Pixie Driver API Specification
ENTTEC Pixie Driver API Specification Purpose This document specifies the interface requirements for PC based application programs to use the ENTTEC Pixie Driver board to drive RGB or RGBW type LED strips.
Traditional IBM Mainframe Operating Principles
C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain
Section 27. Device Configuration Bits
M Section 27. Device Configuration Bits HIGHLIGHTS This section of the manual contains the following major topics: 27.1 Introduction...27-2 27.2 Configuration Word Bits...27-4 27.3 Program Verification/Code
Atmel s Self-Programming Flash Microcontrollers
Atmel s Self-Programming Flash Microcontrollers By Odd Jostein Svendsli, Marketing Manager Summary The third-generation Flash microcontrollers from Atmel are now available. These microcontrollers offer
AN 223: PCI-to-DDR SDRAM Reference Design
AN 223: PCI-to-DDR SDRAM Reference Design May 2003, ver. 1.0 Application Note 223 Introduction The Altera PCI-to-DDR SDRAM reference design, which you can download to the Stratix PCI development board,
miniflash User Manual
miniflash User Manual 1 miniflash 2015 Cloud-9 All Rights Reserved All portions of this hardware are copyrighted and are the proprietary and trade secret information of Cloud-9. Use, reproduction or publication
8-bit Microcontroller. Application Note. AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory
AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory Features Fast Storage of Parameters High Endurance Flash Storage 350K Write Cycles Power Efficient Parameter Storage Arbitrary Size
ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory
ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory 1 1. Memory Organisation 2 Random access model A memory-, a data byte, or a word, or a double
Fondamenti su strumenti di sviluppo per microcontrollori PIC
Fondamenti su strumenti di sviluppo per microcontrollori PIC MPSIM ICE 2000 ICD 2 REAL ICE PICSTART Ad uso interno del corso Elettronica e Telecomunicazioni 1 2 MPLAB SIM /1 MPLAB SIM is a discrete-event
1 Overview. T10/03-176 revision 9
Date: October 22, 2003 To: T10 Committee (SCSI) From: George Penokie (IBM/Tivoli) Subject: End-to-End Data Protection 1 Overview Any inconsistencies between this section and the remaining sections in the
Section 34. Controller Area Network (CAN)
Section 34. Controller Area Network (CAN) HIGHLIGHT This section of the manual contains the following topics: 34.1 Introduction...34-2 34.2 CAN Message Formats... 34-4 34.3 CAN Registers...34-9 34.4 Enabling
8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA
Features Compatible with MCS-51 products On-chip Flash Program Memory Endurance: 1,000 Write/Erase Cycles On-chip EEPROM Data Memory Endurance: 100,000 Write/Erase Cycles 512 x 8-bit RAM ISO 7816 I/O Port
AN10866 LPC1700 secondary USB bootloader
Rev. 2 21 September 2010 Application note Document information Info Content Keywords LPC1700, Secondary USB Bootloader, ISP, IAP Abstract This application note describes how to add a custom secondary USB
Dolphin In-Circuit programming Updating Firmware in the field
Dolphin In-Circuit programming Updating Firmware in the field 1 Introduction In systems e.g. gateways, where an external microcontroller is connected to a Dolphin based product like a TCM300 it might be
1. Computer System Structure and Components
1 Computer System Structure and Components Computer System Layers Various Computer Programs OS System Calls (eg, fork, execv, write, etc) KERNEL/Behavior or CPU Device Drivers Device Controllers Devices
CHAPTER 7: The CPU and Memory
CHAPTER 7: The CPU and Memory The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint slides
Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB
APPLICATION NOTE M16C/26 1.0 Abstract The following article describes using a synchronous serial port and the FoUSB (Flash-over-USB ) Programmer application to program the user flash memory of the M16C/26
Exception and Interrupt Handling in ARM
Exception and Interrupt Handling in ARM Architectures and Design Methods for Embedded Systems Summer Semester 2006 Author: Ahmed Fathy Mohammed Abdelrazek Advisor: Dominik Lücke Abstract We discuss exceptions
Hello and welcome to this presentation of the STM32L4 Firewall. It covers the main features of this system IP used to secure sensitive code and data.
Hello and welcome to this presentation of the STM32L4 Firewall. It covers the main features of this system IP used to secure sensitive code and data. 1 Here is an overview of the Firewall s implementation
Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview
Technical Note TN-29-06: NAND Flash Controller on Spartan-3 Overview Micron NAND Flash Controller via Xilinx Spartan -3 FPGA Overview As mobile product capabilities continue to expand, so does the demand
Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged
Write Protect CAT24WCxxx I 2 C Serial EEPROMs. Allows the user to protect against inadvertent write operations. WP = V CC : Write Protected Device select and address bytes are Acknowledged Data Bytes are
Flash Microcontroller. Memory Organization. Memory Organization
The information presented in this chapter is collected from the Microcontroller Architectural Overview, AT89C51, AT89LV51, AT89C52, AT89LV52, AT89C2051, and AT89C1051 data sheets of this book. The material
dspic30f dspic30f Flash Programming Specification 1.0 OVERVIEW AND SCOPE 2.0 PROGRAMMING OVERVIEW OF THE dspic30f 2.1 Hardware Requirements
dspic30f dspic30f Flash Programming Specification 1.0 OVERVIEW AND SCOPE This document defines the programming specification for the dspic30f family of Digital Signal Controllers (DSCs). The programming
DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB
DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB Contents at a Glance 1. Introduction of MPLAB... 4 2. Development Tools... 5 3. Getting Started... 6 3.1. Create a Project... 8 3.2. Start MPLAB...
SD Specifications Part A2 SD Host Controller Simplified Specification
SD Specifications Part A2 SD Host Controller Simplified Specification Version 2.00 February 8, 2007 Technical Committee SD Association Revision History Date Version Changes compared to previous issue April
Keil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
MF1 IC S50. 1. General description. Functional specification. 1.1 Contactless Energy and Data Transfer. 1.2 Anticollision. Energy
Rev. 5.2 15 January 2007 Product data sheet 001052 PUBLIC 1. General description NXP has developed the Mifare to be used in contactess smart cards according to ISO/IEC 14443A. The communication layer (
PC Notebook Diagnostic Card
www.winter-con.com User s Guide PC Notebook Diagnostic Card User s Guide 1 www.winter-con.com User s Guide INTRODUCTION Notebook Diagnostic Card is a powerful diagnostic tool for technicians and administrators
Using the Kinetis Security and Flash Protection Features
Freescale Semiconductor Document Number:AN4507 Application Note Rev. 1, 6/2012 Using the Kinetis Security and Flash Protection Features by: Melissa Hunter Automotive and Industrial Solutions Group 1 Introduction
APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features
APPLICATION NOTE AT07175: SAM-BA Bootloader for SAM D21 Atmel SAM D21 Introduction Atmel SAM Boot Assistant (Atmel SAM-BA ) allows In-System Programming (ISP) from USB or UART host without any external
RS-485 Protocol Manual
RS-485 Protocol Manual Revision: 1.0 January 11, 2000 RS-485 Protocol Guidelines and Description Page i Table of Contents 1.0 COMMUNICATIONS BUS OVERVIEW... 1 2.0 DESIGN GUIDELINES... 1 2.1 Hardware Design
AVR106: C Functions for Reading and Writing to Flash Memory. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE
AVR 8-bit Microcontrollers AVR106: C Functions for Reading and Writing to Flash Memory APPLICATION NOTE Introduction The Atmel AVR devices have a feature called Self programming Program memory. This feature
ROC Protocol Specifications Manual
Part Number D301053X012 June 2015 ROC Protocol Specifications Manual Remote Automation Solutions ROC Protocol Specifications Manual Revision Tracking Sheet June 2015 This manual may be revised periodically
Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine
7 Objectives After completing this lab you will: know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine Introduction Branches and jumps provide ways to change
UART Boot Loader Design on the Kinetis E Series
Freescale Semiconductor Application Note Document Number: AN4767 Rev. 0, 7/2013 UART Boot Loader Design on the Kinetis E Series by Wang Peng Many applications and products need to upgrade the firmware
Hagenberg Linz Steyr Wels. API Application Programming Interface
Hagenberg Linz Steyr Wels API Application Programming Interface Version 1.1 October 2015 FH OÖ Forschungs & Entwicklungs GmbH Franz-Fritsch-Strasse 11 / Top 3 4600 Wels Austria Research Center Hagenberg
OVERVIEW Playbacks: Shortcuts: Memories: Data Entry Wheels: Touchpad: Master and Blackout:
OVERVIEW The MIDIcon is a USB MIDI control panel designed to work alongside the Elation lighting software packages. The Midicon is USB powered and uses the USB class drivers so that no driver needs to
1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded
1 Gbit, 2 Gbit, 4 Gbit, 3 V SLC NAND Flash For Embedded Distinctive Characteristics Density 1 Gbit / 2 Gbit / 4 Gbit Architecture Input / Output Bus Width: 8-bits / 16-bits Page Size: x8 = 2112 (2048 +
(Refer Slide Time: 00:01:16 min)
Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control
Non-Volatile Memory Programming on the Agilent 3070
Non-Volatile Memory Programming on the Agilent 3070 Paul Montgomery Agilent Technologies Cleveland, Ohio [email protected] BACKGROUND The trend in non-volatile memory, like the general trend
DS1821 Programmable Digital Thermostat and Thermometer
ma www.maxim-ic.com FEATURES Requires no external components Unique 1-Wire interface requires only one port pin for communication Operates over a -55 C to +125 C (67 F to +257 F) temperature range Functions
AN1304. NFC Type MIFARE Classic Tag Operation. Application note PUBLIC. Rev. 1.3 2 October 2012 130413. Document information
NFC Type MIFARE Classic Tag Operation Document information Info Content Keywords NDEF, NDEF data mapping, NDEF Data Exchange Format MIFARE Classic 1K, MIFARE Classic 4K, MIFARE Classic 1K/4K, MIFARE Plus
Phoenix Technologies Ltd.
PC Division Desktop Product Line Subject: Standard BIOS 32-bit Service Directory Proposal Revision: 0.4 Revision Date: June 22, 1993 Document ID: Author: ATBIOS Thomas C. Block Origin Date: May 24, 1993
Tutorial for MPLAB Starter Kit for PIC18F
Tutorial for MPLAB Starter Kit for PIC18F 2006 Microchip Technology Incorporated. All Rights Reserved. WebSeminar Title Slide 1 Welcome to the tutorial for the MPLAB Starter Kit for PIC18F. My name is
The basic mode for adjusting a time zone clock are primarily: 21, 24 and 51-1 (51-1 is for Alpha Characters) Entering Mode Programming
Adjusting Time Zone Clocks The basic mode for adjusting a time zone clock are primarily: The basic mode for adjusting a time zone clock are primarily: 21, 24 and 51-1 (51-1 is for Alpha Characters) Mode
Modbus RTU Communications RX/WX and MRX/MWX
15 Modbus RTU Communications RX/WX and MRX/MWX In This Chapter.... Network Slave Operation Network Master Operation: RX / WX Network Master Operation: DL06 MRX / MWX 5 2 D0 Modbus Network Slave Operation
8051 hardware summary
8051 hardware summary 8051 block diagram 8051 pinouts + 5V ports port 0 port 1 port 2 port 3 : dual-purpose (general-purpose, external memory address and data) : dedicated (interfacing to external devices)
Stack Allocation. Run-Time Data Structures. Static Structures
Run-Time Data Structures Stack Allocation Static Structures For static structures, a fixed address is used throughout execution. This is the oldest and simplest memory organization. In current compilers,
Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface
Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface Application te Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface Abstract This
INTEGRATED CIRCUITS I CODE SLI. Smart Label IC SL2 ICS20. Functional Specification. Product Specification Revision 3.1 Public. Philips Semiconductors
INTEGRATED CIRCUITS I CODE SLI Smart Label IC SL2 ICS20 Product Specification Revision 3.1 February July 2005 2001 Public Philips Semiconductors CONTENTS 1 FEATURES...4 1.1 I CODE SLI RF Interface (ISO/IEC
http://computernetworkingnotes.com/ccna-study-guide/cisco-ios-naming-convention-explainedwith-examples.html
IOS is the most critical part of any cisco device. We should always keep a backup copy of IOS to deal with any unwanted situation. In this article I will explain the backup and restore process of IOS in
CPU Organisation and Operation
CPU Organisation and Operation The Fetch-Execute Cycle The operation of the CPU 1 is usually described in terms of the Fetch-Execute cycle. 2 Fetch-Execute Cycle Fetch the Instruction Increment the Program
8254 PROGRAMMABLE INTERVAL TIMER
PROGRAMMABLE INTERVAL TIMER Y Y Y Compatible with All Intel and Most Other Microprocessors Handles Inputs from DC to 10 MHz 8 MHz 8254 10 MHz 8254-2 Status Read-Back Command Y Y Y Y Y Six Programmable
LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES
page 1/10 This document is designed as a quick-start primer to assist industrial automation programmers who are familiar with PLCs and Relay Ladder Logic programming to better understand the corresponding
CCNA 2 Chapter 5. Managing Cisco IOS Software
1 CCNA 2 Chapter 5 Managing Cisco IOS Software The default source for Cisco IOS Software depends on the hardware platform; most commonly, though, the router looks to the configuration commands that are
Hello, and welcome to this presentation of the STM32 SDMMC controller module. It covers the main features of the controller which is used to connect
Hello, and welcome to this presentation of the STM32 SDMMC controller module. It covers the main features of the controller which is used to connect the CPU to an SD card, MMC card, or an SDIO device.
AT89LP Flash Data Memory. Application Note. AT89LP Flash Data Memory API. 1. Introduction. 2. Theory of Operation. 2.1 Flash Memory Operation
AT89LP Flash Data Memory API 1. Introduction Many embedded systems rely on nonvolatile parameters that are preserved across reset or power-loss events. In some systems this static information is used to
Chapter 6 Updating Software Images and Configuration Files
Chapter 6 Updating Software Images and Configuration Files This chapter describes how to copy and save configuration files and software image files. Downloading and Uploading a Software Image on a TFTP
Instruction Set Architecture
Instruction Set Architecture Consider x := y+z. (x, y, z are memory variables) 1-address instructions 2-address instructions LOAD y (r :=y) ADD y,z (y := y+z) ADD z (r:=r+z) MOVE x,y (x := y) STORE x (x:=r)
NAND Flash Memories. Understanding NAND Flash Factory Pre-Programming. Schemes
NAND Flash Memories Understanding NAND Flash Factory Pre-Programming Schemes Application Note February 2009 an_elnec_nand_schemes, version 1.00 Version 1.00/02.2009 Page 1 of 20 NAND flash technology enables
Computer-System Architecture
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture 2.1 Computer-System Architecture 2.2 Computer-System
An Introduction to MPLAB Integrated Development Environment
An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to
ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER
ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER Pierre A. von Kaenel Mathematics and Computer Science Department Skidmore College Saratoga Springs, NY 12866 (518) 580-5292 [email protected] ABSTRACT This paper
Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2
Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of
Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive
Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive Products Group within Microchip. This web seminar today
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV UNIT I THE 8086 MICROPROCESSOR 1. What is the purpose of segment registers
AN1066. MiWi Wireless Networking Protocol Stack CONSIDERATIONS INTRODUCTION TERMINOLOGY FEATURES
MiWi Wireless Networking Protocol Stack Author: INTRODUCTION Implementing applications with wireless networking is becoming commonplace. From consumer devices to industrial applications, there is a growing
Field Software Updates Using TPMS LF An example using the Low Frequency radio (LFR) for wireless software updating
Freescale Semiconductor Document Number: AN5149 Application Note Rev. 1.0, 8/2015 Field Software Updates Using TPMS LF An example using the Low Frequency radio (LFR) for wireless software updating 1 Introduction
512 Mbit (64 Mbyte), 256 Mbit (32 Mbyte), 128 Mbit (16 Mbyte) 1.8V/3.0V HyperFlash Family
SKLS / SKSS SKLS / SKSS SKLS / SKSS Mbit ( Mbyte), Mbit ( Mbyte), Mbit ( Mbyte).V/.V HyperFlash Family Distinctive Characteristics HyperBus Low Signal Count Interface.V I/O, bus signals Single ended clock.v
ROM Monitor. Entering the ROM Monitor APPENDIX
APPENDIX B This appendix describes the Cisco router ROM monitor (also called the bootstrap program). The ROM monitor firmware runs when the router is powered up or reset. The firmware helps to initialize
A3 Computer Architecture
A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray [email protected] www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2000 1 / 1 6. Stacks, Subroutines, and Memory
