NEC ELECTRONICS GLOBAL
nec electronics global
HOME
APPLICATIONS
PRODUCTS
TECHNOLOGY
SUPPORT
BUY ONLINE
NEWS & EVENTS
ABOUT US
header
GO
AdvancedParametric
SITE MAP CONTACT US

Flash Programming

Contents

    
FAQ-ID = writ-nnnn
0001: Flash programming basics
0002: Does the operation differ for the emulator and flash version?
0003: Connection to flash memory programmer
0004: Port status during programming
0005: Port settings during flash programming
0006: Selection of data transfer mode (3-wire serial and UART)
0007: Clock during on-board programming
0008: Relationship between programming time and serial clock speed
0009: Data transfer could not be performed when the UART serial clock is 4.19MHz.
0010: Is clock connection required during flash programming (CLK >> X1)?
0011: Connection of Vpp pin during normal operation
0013: An initialize error is output during on-board programming.
0014: "Target Signature Error" is displayed during programming.
0015: What should be done when replacing the flash memory version with the mask ROM version?
0016: Can internal flash memory be rewritten more than 20 times?
0017: What is the data value in areas that are not programmed?
0018: I want to read the contents written to the internal flash memory.
0019: Is self-programming possible? [uPD78F0058]
0020: Flash programming time
writ
-0001
Flash programming basics
Q1
What are the basics of flash programming?
A1
1. Outline
There are two major types of programming of internal flash memory in microcontrollers, as follows.
- Programming of stand-alone chip
- Programming of device on target system

These two programming methods differ only in the state of the target device; the basic programming method is the same.
Other than that, some devices support self-programming, but this will not be covered here.

In the case of programming of a stand-alone chip, in addition to the programmer, a socket adapter for setting the target device is also required.
Normally, it is simpler to use the adapter (FA Series) manufactured by Naito Densei Machida Mfg. Co., Ltd.) for this.
During device programming on the target system (called on-board programming), signals are simply exchanged between the powered target system and the programmer.

2. Required equipment
The following equipment is required for programming.
- Writer(Examples: PG-FP4 manufactured by NEC Electronics, FL-PR4 by Naito Densei Machida Mfg. Co., Ltd.)
- Parameter file (Downloaded from NEC Electronics homepage)
- PC for control
- FA adapter with the required wiring (in the case of stand-alone programming)
  (target system in the case of on-board programming)

3. Device/programmer interface
To perform programming, signals are exchanged between the device and the programmer.
Basically, three types of signals are employed:
- Power supply/control-related (VDD, VPP, RESET)
- Serial signals
- Operating clock (when required)

Among the power supply/control-related signals, VPP, in addition to being used as a power supply for programming, is also used to specify the mode to be used for serial communication between the device and programmer.

Moreover, VDD, during programming of a stand-alone chip, can be supplied from the programmer, but in the case of on-board programming, it does not have the capacity to drive the entire board, so a separate power supply is required.

For the serial signal, select a signal according to the communication mode that is actually used.
Use one of the available serial ports for on-board programming.
(Since the communication mode differs according to the target device, please select the communication mode according to each device.)
The programming time can be shortened the most using 3-wire serial communication with handshake.
However, this mode is not supported by the FL-PR2.

The operating clock can be supplied from the programmer if no clock generation function is provided on the device side in stand-alone programming.
However, the frequency is somewhat restricted in this case.
In the case of on-board programming, the clock is basically generated by the target system, and does not need to be supplied from the programmer.

4. Basic exchanges between the device and programmer (Initialization)
When performing programming, the programmer first supplies VDD to the device.
After the lapse of the rise time of the power supply, VPP is supplied, and after waiting for the rise time, RESET is released.
Then the system waits for the clock oscillation stabilization time.

The device goes into the flash programming mode through RESET release and clock supply (oscillation).
Then, the programmer notifies the device about the type of interface used for communication by converting VPP into a pulse.
Since this processing must be performed within a given interval of time, make sure that no circuit that greatly prolongs the time until device RESET is actually released after the programmer releases RESET is inserted.

After completing the interface condition settings, the programmer sends the initialize command to the device a maximum of 16 times, using a serial signal.
If the ACK signal is returned from the device within these 16 times, the device is ready to communicate.
(If there is an error in the processing up to this point, the error message "Target initialize error" is displayed.)

5. Programming and verifying Normally, the EPV command is used during programming, but in this case, V (Verify) processing is performed within the device and verify of individual data is not performed.

To more accurately check the write data itself, execute the verify command by itself after programming.

The flash programming data cannot be read out externally, for program protection purposes.
Moreover, from the same viewpoint, verify cannot be executed by specifying an address.

6. Parameter file
A parameter file is provided for each individual device.
Moreover, the parameter file may also differ depending on the device version, the clock that is used, or the interface conditions, so use the parameter file that matches the device to be programmed.
Is this information useful for you ?
back to top  
(2006/04)

writ
-0002
Does the operation differ for the emulator and flash version?
Q1
When the HEX file generated at the same time as the load module file operating on the emulator is written to the flash memory on the device, the device does not operate.
(The device does not operate even after reset is applied.)
A1
If the same object operates on the emulator and not in the flash memory, assuming that there is no problem with the flash programming, then the following are some of the possible causes that may be considered.

(1) Variables with an initial value are not correctly initialized. (ROMization was not performed correctly.)
(2) The clock does not oscillate properly.
(3) Power-on reset is not functioning properly. (The time is too short.)
(4) Resources that are not included on the device are used.
(5) There is a problem with the power supply capacity.(The emulator only monitors the power supply and does not use the target device's power supply.)
In addition, with regard to flash memory:

(6) Errors may have occurred when writing to flash memory.
(7) Vpp pin handling may be incorrect.(In the mask ROM version, IC pin handling may be incorrect.)

Items (2) and (3), which are hardware-related issues, are items that cannot be evaluated with the emulator.
Please check these points as hardware.
If simple programs can be successfully run, it is unlikely that the problem is a hardware-related one.

Item (4) is also related to the emulator settings.
Is the program size greater than the device memory, or is emulation memory allocated in the emulator?
Is this information useful for you ?
back to top  
(2006/04)

writ
-0003
Connection to flash memory programmer
Q1
Are there any documents regarding connection of the uPD78F0058 to the flash memory programmer?
A1
There are two basic programming methods, programming of a stand-alone device, and on-board programming of a device mounted on the target system.

When writing to a stand-alone device, use a flash programmer and adapter (FA-80GC or FA-80GK, both manufactured by Naito Densei Machida Mfg. Co., Ltd.) to perform the necessary wiring layout.
For the signal required for programming, select one of the three interfaces listed in CHAPTER 26 of the User's Manual of the uPD780058 Subseries.
Other than this signal, supply the clock normally.
Since the other pins are not used during programming, handle them as unused pins.

As a reference document, see the target manual in Naito Densei Machida Mfg. Co.'s ASMIS web site cited above.

During on-board programming, make sure that no conflict occurs between the signals that are used for programming and internal signals.
Specifically, make the serial signal used for programming either unused for the system or switchable.

Also, make it possible to execute reset from the programmer.
Moreover, provide a switch or jumper so that the Vpp pin is connected to Vss during normal use, and can only be applied from the programmer during programming.
Is this information useful for you ?
Q2
Could you describe connection to the uPD78F0058 for on-board programming?
A2
Please make the circuit configuration as follows.
Vpp During programming connect a programmer via a switch or jumper, and during normal operation, connect to ground.
RESET Design the circuit so that reset can be applied both on the board or from the programmer.
Also, design the circuit to enable switching to the programmer side during programming, and to the board circuit side during normal operation.
X1, X2 Leave the circuit unchanged so that the clock on the board can continue being used. (Don't do anything.)
Serial Design the circuit so that the serial channel for programming can be connected to the programmer.
Vdd, Vss Make connection to the programmer possible.
The other signals can be left in the normal operation state.
Is this information useful for you ?
back to top  
(2006/04)

writ
-0004
Port status during programming
Q1
During on-board flash programming, what is the status of the ports that are not related to programming?
A1
The ports that are not used during programming remain in their after-reset status, in other words, they are input ports.
Is this information useful for you ?
back to top  

writ
-0005
Port settings during flash programming
Q1
Are serial and other port settings required during flash programming?
A1
Settings are not required.
When the flash programming mode is set, the internal firmware performs the settings that are required for programming, so it is OK to just connect the signal used for programming to the programmer.
Is this information useful for you ?
back to top  

writ
-0006
Selection of data transfer mode (3-wire serial and UART)
Q1
In the uPD78F0034A, either 3-wire serial or UART can be used as the data transfer mode for programming.
How can the microcontroller recognize the mode?
A1
The mode is specified by the Vpp pulse count at the beginning of the flash programming mode.
For details, refer to section 6. Flash Memory Programming in the data sheet.
Is this information useful for you ?
back to top  

writ
-0007
Clock during on-board programming
Q1
Can programming be done from the flash programmer with a crystal resonator mounted on the target system (connected to X1, X2)?
A1
Yes, programming is possible regardless of whether there is a crystal resonator mounted on the target board or not.
Is this information useful for you ?
back to top  

writ
-0008
Relationship between programming time and serial clock speed
Q1
During flash programming, I increased the serial clock frequency from 1MHz to 2MHz, but the programming time hardly changed.
A1
The clock changes only for the data transfer time; additional factors that affect the programming time include the internal processing speed and the programming conditions defined in the parameter file.

Thus, even if the serial clock frequency is doubled, this will not halve the programming time.
Is this information useful for you ?
back to top  

writ
-0009
Data transfer could not be performed when the UART serial clock is 4.19MHz.
Q1
I have problems with programming via the uPD78F9116's UART using the 4.19 MHz frequency.
However, there is no problem when I set the frequency to 5MHz.
A1
The parameters required for the baud rate setting are determined by measuring the pulse width of the 00 data transmit signal from the programmer.
At this time, the CPU performs time measurement by firmware and sets the baud rate parameter to the BRGC register.

The baud rate and the setting value, as well as the error for each clock, are as follows.
Baud RateBRGC5.0MHz4.9152MHz4.1943MHz
9600 40H 1.73% 0 -14.6%
19200 30H 1.73% 0 -14.6%
In other words, when using a 4.1943MHz clock, the error is too large for use.
Is this information useful for you ?
back to top  

writ
-0010
Is clock connection required during flash programming (CLK >> X1)?
Q1
p.24 and p.25 of the uPD78F0058 data sheet describe the CLK >> X1 connection, but is this connection required in the case of oscillation via a crystal resonator?
A1
No.
This is simply an example when supplying the clock from the programmer side.
Therefore, during normal use when the device itself generates the clock, this connection is not required.
Is this information useful for you ?
back to top  

writ
-0011
Connection of Vpp pin during normal operation
Q1
During normal operation, can the Vpp pin be connected to Vss via a resistor instead of directly?
A1
In the case of a flash version, considering the programmer's drive capacity and the device's noise tolerance, Vpp can be pulled down to Vss with a resistor of approximately 10kΩ.

However, whether the noise tolerance is a problem during mounting needs to be evaluated.
In the case of the mask version, since the pin corresponding to Vpp is a test pin, Vpp must always be directly connected to Vss.
If it is not directly connected to Vss, the operation cannot be guaranteed.
Is this information useful for you ?
back to top  

writ
-0013
An initialize error is output during on-board programming.
Q1
An initialize error occurs during on-board programming of the uPD78F9488 using the FL-PR3.
A1
The initialize error indicates that the device and programmer cannot communicate at all.
This is normally the case when there is a problem with the connection, or when the device does not operate.

Please check the following points.
The connection on p.290 of the user's manual is the signal connection during normal write.
For on-board programming, the power supply and clock are supplied on the board, and no clock is supplied from the programmer.

Moreover, at this time, set the TARGET VDD SWITCH of the FL-PR3 to the IN side.
In addition, switch the device's VPP and reset to the FL-PR3 during programming.
In this status, signals other than CLK should be connected as described in the manual and, if there is no problem with the clock oscillation, programming should be possible.
Is this information useful for you ?
back to top  
(2001/07)

writ
-0014
"Target Signature Error" is displayed during programming.
Q1
A target signature error is output during uPD78F4216A programming using FlashPro III.
A1
First, check that you are using the correct parameter file.
The programming method differs depending on whether the target is the uPD78F4216 or the uPD78F4216A (and it also differs depending on the specifications), and the parameter file differs accordingly.

Therefore, be sure to select the parameter file that matches the device and programming method.
The parameter files are available for download from the NEC Electronics homepage

http://www.necel.com/micro/ods/eng/index.html

In this homepage, select Parameter Files, then select 78K4 Series, read the comments in the 78F416A parameter file, and then download the parameter file that matches your purposes.
Is this information useful for you ?
back to top  
(2001/07)

writ
-0015
What should be done when replacing the flash memory version with the mask ROM version?
Q1
During development using the flash version of the uPD78F9177Y, when replacing the device with the mask ROM version, do I need to make modifications to the program?
A1
There is no particular need for modifications.
In the case of assembly, create the program file using the uPD789177Y device file, and then check its operation with the flash version.
Is this information useful for you ?
back to top  
(2001/08)

writ
-0016
Can internal flash memory be rewritten more than 20 times?
Q1
The flash microcontroller data sheet describes a maximum number of 20 rewrites, does this also apply at the debugging stage?
A1
No, it does not.
What the data sheet actually means is that "20 times" is the number of times that write can be performed and the data still be guaranteed for 10 years after it is written.

At the debugging stage, when such a guarantee is not necessary, more than 20 rewrites can be performed with no problem.
Is this information useful for you ?
back to top  

writ
-0017
What is the data value in areas that are not programmed?
Q1
When performing programming with FlashPro in the uPD78F0034A, what is the data in areas that are not programmed?
A1
The data in such areas is 0xFF.
Is this information useful for you ?
back to top  

writ
-0018
I want to read the contents written to the internal flash memory.
Q1
How can I read the data written to internal flash memory?
A1
The contents written to the internal flash memory with a programmer cannot be read.
This is in order to protect the written program.

If it is absolutely necessary to read the program, consult your authorized NEC Electronics distributor.
In some cases, it may be possible to take the device to NEC Electronics and have its contents read.
Is this information useful for you ?
back to top  
(2001/08)

writ
-0019
Is self-programming possible? [uPD78F0058]
Q1
Is programming of the internal flash memory of the uPD78F0058 possible by software?
A1
Unfortunately, flash reprogramming using the user's own program is not supported.
For firmware reprogramming, connect the programmer (Flashpro) via a serial interface externally and perform reprogramming from the programmer.
Is this information useful for you ?
back to top  

writ
-0020
Flash programming time
Q1
What is the programming time and the verify time?
A1
Answer: The times are outlined below.

EPV: Erase >> Program >> Verify
V: Verify only

V850 Series
Part NumberEPVVConditions
uPD70F3003A 20 to 30s 5 to 6s 3-wire serial with handshake
uPD70F3017A 30s   1MHz, HS mode used, fxx=20MHz
uPD70F3025A 2.5min 30s 3-wire serial
uPD70F3040 30s 14s 3-wire serial with handshake, 2MHz

78K Series
Part NumberEPVVConditions
uPD78F0818 51s 25s fx=8MHz, SIO 1MHz
78s 51s fx=8MHz. UART 76.8kbps
uPD78F0833Y 1.5min 20s 3-wire serial
uPD78F4938A 1.5min 10s Handshake mode, 1Mbps
3.5min 30s Normal mode, 1Mbps
3min 3s 3-wire serial with handshake, 1Mbps
uPD78F9046 30s Approx. 15s 3-wire serial
uPD78F9136 30s 15s 3-wire serial
uPD78F9177 40s 10s 3-wire serial
uPD78F9850 16s 8s SIO 1.25MHz, fxx=8.00MHz
22s 15s UART 76kbps
Is this information useful for you ?
back to top  









































 LEGAL  RSS Feeds       © 1995-2008  NEC Electronics Corporation