CR16MCS5VJI8 Datasheet

  • CR16MCS5VJI8

  • Family of 16-bit CAN-enabled CompactRISC Microcontrollers

  • 713.21KB

  • 156页

  • NSC

扫码查看芯片数据手册

上传产品规格书

PDF预览

self as no instruction or data can be fetched from it while it is
being programmed. All program and erase operations must
be preceded immediately by writing the proper key to the pro-
gram memory key register PGMKEY.
The flash EEPROM program memory is divided into 256
pages, each page containing 64 words (each 16 bits wide).
Each page is further divided into two adjacent rows. A page
erase will erase one page. Programming is done by writing to
all the words within a row, one word following another se-
quentially within one single high voltage pulse. This is sup-
ported through a double-buffered write-data buffer scheme.
Byte programming is not supported. Programming should be
done on erased rows.
A mass erase requires the following code sequence (assum-
ing that this sequence will not be interrupted to do another
flash erase or programming):
1. Check for MSTAT.PGMBUSY not set.
2. Set up flash timing reload registers for mass erase oper-
ation.
3. Set FLCSR.MERASE = 1.
4. If interrupt was enabled, disable interrupt.
5. Write proper key value to PGMKEY.
6. Write to any valid location within the flash EEPROM pro-
gram memory.
7. If interrupt was disabled in step 4, re-enable interrupt.
8. Wait for MSTAT.PGMBUSY to clear.
9. Set FLCSR.MERASE = 0.
10. Restore flash timing reload registers for normal opera-
tion.
A page erase requires the following code sequence (assum-
ing that this sequence will not be interrupted to do another
flash erase or programming):
1.
2.
3.
4.
5.
6.
7.
Check for MSTAT.PGMBUSY not set.
Set FLCSR.ERASE = 1.
If interrupt was enabled, disable interrupt.
Write proper key value to PGMKEY.
Write to any valid location within the page to be erased.
If interrupt was disabled in step 3, re-enable interrupt.
Set FLCSR.ERASE = 0.
separation of the program memory into rows is transparent to
the user, as the transition is handled by the flash program
memory interface. Figure 3 shows a flowchart for a program-
ming sequence.
start
MSTAT.PGMBUSY
=1?
No
Yes
disable interrupt
if necessary
write PGMKEY
write memory
re-enable interrupt
if necessary
last word?
No
Yes
done
When programming, the data to be written into the flash EE-
PROM program memory is first written into a double-buffered
write-data buffer. When a piece of data is written to the page
while the flash EEPROM program memory is idle, the write
cycle will start. Due to the double-buffered nature of the write-
data buffer, a second word can be written to the flash EE-
PROM program memory. This will then set FLCSR.PML-
FULL flag indicating the buffer is now full. When the first write
is done, the memory address would be incremented, and the
second word would be written to that address while keeping
the high voltage pulse active; the FLCSR.PMLFULL flag is
cleared. Another word can then be written to the buffer, and
this programming will repeat until there are no more words to
be programmed. This allows pipelined writes to different
words on the same row within the same high voltage pulse.
If the programming sequence exceeds a row, the flash pro-
gramming interface will automatically initiate a programming
pulse for the next row. The FLCSR.PMLFULL bit is also
cleared when programming of the last word of the current
row is completed, e.g. programming of the entire row is com-
pleted and MSTAT.PGMBUSY is cleared. This means, the
Yes
FLCSR.PMLFULL
=0?
No
Figure 2. Programming Sequence for
the Program Memory
9.1.5
Erase and Programming Timing
The internal hardware of the device handles the timing of
erase and programming operations. To drive the timing con-
trol circuits, the device divides the system clock by a pro-
grammable prescaler factor. You should select a prescaler
value to produce a program/erase clock of 200 kHz (or as
close as possible to 200 kHz without exceeding 200 kHz).
For the timing control circuit to operate correctly, you must
23
www.national.com

CR16MCS5VJI8相关型号PDF文件下载

您可能感兴趣的PDF文件资料

热门IC型号推荐

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈
返回顶部

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!