參數(shù)資料
型號(hào): VIRTUAL
英文描述: Virtual Flash EEPROM Driver for the M16C/62
中文描述: 虛擬閃存EEPROM的雙隨機(jī)PWM驅(qū)動(dòng)
文件頁(yè)數(shù): 4/7頁(yè)
文件大小: 255K
代理商: VIRTUAL
M16C/62
int clearsrd()
Clears the flash SRD register.
Virtual Flash EEPROM Driver for the M16C/62
int readEE(int tag, int *value)
Upon return, *value contains the EEPROM value at the address “tag”. Returns 1 on no errors, 0 on
invalid tag.
6. Notes
Interrupts assigned to the fixed vector table CANNOT occur during any write to flash operation. This
includes all the function calls above except for readsrd() and readEE(). As a ”safety” feature, interrupts
are suspended during flash operations. The worst case suspend time is over 600 ms (maximum erase
block time). If this delay is unacceptable, remove the “interruptoff” line at the beginning of the function
ramcodestrt() in the file RAM62.c, move the variable vector table to RAM, and then set the “intb” register
accordingly.
Note as the size of the EEPROM increases, so can the time to execute the writeEE() function. For
example, an EEPROM size of 3FF0h or greater requires an erase of both flash blocks and rewrite every
time a value is updated. For sizes near the max. of 7FF0h a rewrite to an EEPROM location could take
up to 4 seconds!
7. Demonstration Program
The driver file virtEE.c contains a demonstration “main.c” (remove or comment out when implementing as
a driver). The program was developed to run on the MSV1632, but it also works with any M16C/62 flash
system running the KD30 debugger in single chip mode.
The following steps are required to run the Demonstration (it is assumed the user has a general
understanding of the KD30 debugger):
1.
Connect the MDECE0620 board to power and the host PC.
2.
Start KD30. In the “INIT” screen, click on the tab “run mode” and select “free run mode”.
3.
Load the “virtEE.x30” file.
4.
Insert a breakpoint in the main() function at the first “y= *read_val;”.
5.
Run the code: debug-> go free.
6.
Hit the red “stop” button on KD30 (in “free run” mode, KD30 does not respond automatically to
breakpoints).
7.
View the global “y” from the C watch window.
8.
Remove the breakpoint and insert one at the next “y= *read_val;”.
9.
Repeat steps 5–8 until you reach the end of main().
10.
You can view the flash blocks and/or change the variables passed (e.g. size, tag, values), recompile,
and run again to see how the changes affect operation.
AN-DECE-MCU-31-A
February 2002
3
相關(guān)PDF資料
PDF描述
VIT5000 Optoelectronic
VIVL224 LIGHT FITTING OFFICE
VIVL224EMIN LIGHT FITTING OFFICE
VIWT826A VDSL FILTER SOLUTIONS
VJ0612 Multilayer Ceramic Chip Capacitors LowInductance
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
VI-RU 制造商:VICOR 制造商全稱(chēng):Vicor Corporation 功能描述:50 to 600W Autoranging AC-DC Switchers
VI-RU011-EUUU-BC 制造商:VICOR 制造商全稱(chēng):Vicor Corporation 功能描述:50 to 600 W Autoranging AC-DC Switchers
VI-RU011-EUUU-BM 制造商:VICOR 制造商全稱(chēng):Vicor Corporation 功能描述:50 to 600 W Autoranging AC-DC Switchers
VI-RU011-EUUU-OC 制造商:VICOR 制造商全稱(chēng):Vicor Corporation 功能描述:50 to 600 W Autoranging AC-DC Switchers
VI-RU022-EYYY 制造商:Vicor Corporation 功能描述:VI Series AC/DC Switcher; 1-95 Vdc, Several outputs; 50 600 W