
dsPIC30F Flash Programming Specification
DS70102K-page 22
2010 Microchip Technology Inc.
clocked out. The programmer can begin to clock out
the response 20
μsec after PGD is brought low, and it
must provide the necessary amount of clock pulses to
receive the entire response from the programming
executive.
Once the entire response is clocked out, the
programmer should terminate the clock on PGC until it
is time to send another command to the programming
executive. This protocol is illustrated in
Figure 7-2.
7.3
SPI Rate
In Enhanced ICSP mode, the dsPIC30F operates from
the fast internal RC oscillator, which has a nominal
frequency of 7.37 MHz. This oscillator frequency yields
an effective system clock frequency of 1.84 MHz. Since
the SPI module operates in Slave mode, the
programmer must limit the SPI clock rate to a
frequency no greater than 1 MHz.
Note:
If the programmer provides the SPI with a
clock faster than 1 MHz, the behavior of
the programming executive will be
unpredictable.
7.4
Time Outs
The programming executive uses no Watchdog Timer
or time out for transmitting responses to the
programmer. If the programmer does not follow the flow
control mechanism using PGC, as described in
col”, it is possible that the programming executive will
behave unexpectedly while trying to send a response
to the programmer. Since the programming executive
has no time out, it is imperative that the programmer
correctly follow the described communication protocol.
As a safety measure, the programmer should use the
command time outs identified in
Table 8-1. If the
command time out expires, the programmer should
reset
the
programming
executive
and
start
programming the device again.
FIGURE 7-2:
PROGRAMMING EXECUTIVE – PROGRAMMER COMMUNICATION PROTOCOL
1
2
15 16
1
2
15 16
PGC
PGD
PGC = Input
PGC = Input (Idle)
Host Transmits
Last Command Word
PGD = Input
PGD = Output
P8
1
2
15 16
MSB X X X LSB
1
0
P9b
P10
PGC = Input
PGD = Output
P9a
Programming Executive
Processes Command
Host Clocks Out Response
P11