
dsPIC30F Flash Programming Specification
DS70102K-page 60
2010 Microchip Technology Inc.
APPENDIX A: DEVICE-SPECIFIC
INFORMATION
A.1
Checksum Computation
16-bit computation can be made for each dsPIC30F
device. Computations for read code protection are
shown both enabled and disabled. The checksum
values assume that the Configuration registers are also
erased. However, when code protection is enabled, the
value of the FGS register is assumed to be 0x5.
A.2
dsPIC30F5011 and dsPIC30F5013
A.2.1
ICSP PROGRAMMING
The dsPIC30F5011 and dsPIC30F5013 processors
require that the FBS and FSS registers be programmed
with 0x0000 before the device is chip erased. The steps
A.2.2
ENHANCED ICSP PROGRAMMING
The dsPIC30F5011 and dsPIC30F5013 processors
require that the FBS and FSS registers be programmed
with 0x0000 using the PROGC command before the
ERASEB command is used to erase the chip.
TABLE A-1:
CHECKSUM COMPUTATION
Device
Read Code
Protection
Checksum Computation
Erased
Value
Value with
0xAAAAAA at 0x0
and Last
Code Address
dsPIC30F2010
Disabled
CFGB+SUM(0:001FFF)
0xD406
0xD208
Enabled
CFGB
0x0404
dsPIC30F2011
Disabled
CFGB+SUM(0:001FFF)
0xD406
0xD208
Enabled
CFGB
0x0404
dsPIC30F2012
Disabled
CFGB+SUM(0:001FFF)
0xD406
0xD208
Enabled
CFGB
0x0404
dsPIC30F3010
Disabled
CFGB+SUM(0:003FFF)
0xA406
0xA208
Enabled
CFGB
0x0404
dsPIC30F3011
Disabled
CFGB+SUM(0:003FFF)
0xA406
0xA208
Enabled
CFGB
0x0404
dsPIC30F3012
Disabled
CFGB+SUM(0:003FFF)
0xA406
0xA208
Enabled
CFGB
0x0404
dsPIC30F3013
Disabled
CFGB+SUM(0:003FFF)
0xA406
0xA208
Enabled
CFGB
0x0404
dsPIC30F3014
Disabled
CFGB+SUM(0:003FFF)
0xA406
0xA208
Enabled
CFGB
0x0404
dsPIC30F4011
Disabled
CFGB+SUM(0:007FFF)
0x4406
0x4208
Enabled
CFGB
0x0404
dsPIC30F4012
Disabled
CFGB+SUM(0:007FFF)
0x4406
0x4208
Enabled
CFGB
0x0404
dsPIC30F4013
Disabled
CFGB+SUM(0:007FFF)
0x4406
0x4208
Enabled
CFGB
0x0404
dsPIC30F5011
Disabled
CFGB+SUM(0:00AFFF)
0xFC06
0xFA08
Enabled
CFGB
0x0404
dsPIC30F5013
Disabled
CFGB+SUM(0:00AFFF)
0xFC06
0xFA08
Enabled
CFGB
0x0404
dsPIC30F5015
Disabled
CFGB+SUM(0:00AFFF)
0xFC06
0xFA08
Enabled
CFGB
0x0404
Item Description:
SUM(a:b) = Byte sum of locations a to b inclusive (all 3 bytes of code memory)
CFGB
= Configuration Block (masked) = Byte sum of ((FOSC&0xC10F) + (FWDT&0x803F) +
(FBORPOR&0x87B3) + (FBS&0x310F) + (FSS&0x330F) + (FGS&0x0007) + (FICD&0xC003))