Demo/Emulation Manual
NLP-5x Toolkits
© 2010 Sensory Inc.
P/N 80-0314-A
23
Timers in Turbo Mode
Timers #0, #1 and #3 will run twice as fast in Turbo Mode on the NLP-5x Demo/Emulation chipset than on the
actual NLP-5x. When not in Turbo Mode, they run at the same rate on both platforms.
A global variable platform can be tested by software to determine when the program is running on the NLP-5x-
DE. This is done automatically in library functions such as _SetupTimer0(). Here is an example of explicitly
setting up timer 3 when in Turbo Mode, where the prescale value is selected based on the platform. This
example is from the Timers sample in the FluentChip™ 5 for NLP-5x library.
if
(_platform
&
1
)
timerCtrl
=
(timerCtrl
&
0xff00
)
+
3
;
// Emulator: use prescale = 16
else
timerCtrl
=
(timerCtrl
&
0xff00
)
+
2
;
// Real NLP-5x: prescale = 8
Other Differences
•
XM Mode (i.e., internal OTP memories disabled) is not emulated by the NLP-5x Demo/Emulation board.
•
The Low Voltage Detect NMI Interrupt is not emulated.
•
The NLP-5x has more interrupt channels than are emulated by the NLP-5x Demo/Emulation board.
Normally, applications will not need to use these additional interrupt channels. The FluentChip™ 5 for
NLP-5x library will not use interrupt channels that cannot be emulated.
•
The External Memory Interface is not electrically identical to the real NLP-5x, because it is emulated by
an FPGA chip that has somewhat different characteristics, such as drive strength etc. The NLP-5x-
Demo/Emulation board has permanent 200K-ohm pull-up resistors on the address, data, and control
signals of the External Memory Interface, whereas the real NLP-5x can control whether each pull-up is
present when the address and/or data lines are used as general purpose I/O pins.
•
The NLP-5x Demo/Emulation board operating voltage is fixed at 3.3V.
•
VSI403 Errata: the VSI403 chip uses an earlier version of the ZSP processor than that used in the
NLP-5x. There are some problems in the VSI403 that have been fixed in the NLP-5x processor. Some
of these are discussed in the Emulator Features chapter of the NLP-5x datasheet. The most important
issue is that using a bitc, bits, or biti with the %ireq register may cause interrupts to be lost, and since
the processor in the VSI403 uses edge-sensitive interrupts, the program may appear to “lock up” for
lack of interrupts. The solution is to re-register interrupts after using one of the listed problematic
instructions. Writing 0x1f to the miStatus register will re-register the 5 merged interrupt sources. Most
application level programs will not need to modify the %ireq register.