VA10800/VA10820 ARM Cortex - M0 Based Processor Programmers Guide
VA10800/VA10820 ARM Cortex - M0 Based Processor Programmers Guide
1 Overview
This document describes the programmer’s view of the VORAGO VA10800/VA10820 ARM®
Cortex®-M0 based microcontrollers.
• IEEE
• VORAGO Documents
www.voragotech.com page 1
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Contents
1 Overview ............................................................................................................................... 1
1.1 Related Documents .......................................................................................................... 1
4 Peripherals........................................................................................................................... 17
4.1 System Configuration Peripheral (Software label = SYSCONFIG) ..................................... 17
www.voragotech.com page 2
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.1.17 ROM_SBE Register................................................................................................. 24
4.1.18 ROM_MBE Register ............................................................................................... 24
www.voragotech.com page 3
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.4.7 SYND_CHECK_32_52_DATA/SYND_CHECK_32_52_SYND Registers ..................... 46
4.4.8 PERID Register ....................................................................................................... 47
www.voragotech.com page 4
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.6.9 PERID Register ....................................................................................................... 68
4.7 UART Peripheral (Software label = UARTA & UARTB) ..................................................... 69
4.8 SPI Peripheral (Software label = SPIA, SPIB & SPIC) ........................................................ 81
www.voragotech.com page 5
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.8.8 IRQ_RAW Register................................................................................................. 90
4.8.9 IRQ_END Register ................................................................................................. 90
www.voragotech.com page 6
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
5.3 eFuse ......................................................................................................................... 121
5.3.1 eFuse read procedure .......................................................................................... 123
www.voragotech.com page 7
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
2 Functional Description
The VA10800 and VA10820 MCUs contains an ARM® Cortex®-M0 processor, and a related
set of peripherals.
2.1 Features
• Processor Core
o ARM® Cortex®-M0 processor
§ Up to 50 MHz
§ SysTick Counter
§ Single Cycle Multiply
o ARM Cortex®-M0 built-in Nested Vectored Interrupt Controller (NVIC)
®
www.voragotech.com page 8
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
• FIFO overflow
• Framing error
• Parity error
• Break detection
§ Configurable Interrupt generation
• FIFO level (fully configurable)
• Receive Timeout
• Error
o 3 SPI Ports (One is designated Master only)
§ Supports all 4 modes of Motorola’s SPI Specification
§ Word/Frame size of 4 to 16 bits
§ 16 word Transmit and Receive FIFOs
§ Block mode support for larger Frame sizes
§ Master mode rates up to 1/4 the system clock
§ Slave mode rates up to 1/12 the system clock
§ Configurable Interrupt generation
• FIFO level (fully configurable)
• FIFO Overflow
• Receive Timeout
§ 2 Ports Configurable as Master or Slave
§ 1 Port is Master Only
• Uses the SPI Boot ROM pins after startup
2
o IC
§ Standard I2C-compliant bus inference
§ Dedicated open-drain pins supporting I2C Fast-mode
§ Configurable as Master or Slave
§ 16 word Transmit and Receive FIFOs
§ Configurable Interrupt generation
• FIFO empty/full level programmable
§ Note: Fast-Mode non-obstruct feature is not supported
o GPIO
§ 2 GPIO Ports, Up to 56 pins total
• 32-bit port A
• 24-bit port B
§ Configurable direction control of individual bits
www.voragotech.com page 9
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
§ Bit level mask register allows single instruction setting or clearing of any
bits in one port.
§ Configurable interrupt detect on individual bits
• Level or Edge sensitive
§ Configurable Pulse mode on individual bits
§ Configurable (0-3) cycle delay on individual bits
o IO Configuration
§ Manages GPIO/SPI/UART IO configurations:
• Glitch filters
• Pull-up/Pull-down
• Signal inversion
• Pseudo open-drain
• Maps Timer, SPI and UART blocks to specific pins
o Counters/Timers
§ 24 Counter/Timers
§ Advanced trigger modes
• Start/Stop based on other Counter/Timers or GPIO signals
• Multiple trigger sources
§ Configurable output event
• One cycle zero detect
• Active mode
• Divide by 2
• PWM compare
o Interrupt Select
§ Maps >100 possible interrupt sources to the 32 NVIC inputs
§ Configurable source for alternate Interrupts
• NMI
• Watchdog Reset
• Memory Error Reset
• Processor Receive Event
o System Configuration
§ Memory Control
• Data memory clear on reset
• Code memory reload on reset
• Code memory write protect
• Code/Data memory Scrub rate (VA10820 Only)
www.voragotech.com page 10
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
• Code/Data memory error injection for testing (VA10820 Only)
• Code/Data memory SBE/MBE counters (VA10820 Only)
• Code/Data memory SBE/MBE Interrupt control (VA10820
Only)
• EDAC Syndrome calculation support (VA10820 Only)
§ Register for Scrub rate control. (Performs EDAC read sequentially
through both data and code memory.) (VA10820 Only)
§ GPIO Glitch Filter rate control
§ Peripheral Configuration
• Enable/Disable/Reset individual peripherals
• JTAG
o 2 Serial Controllers on same pins
o M0 Debug Controller
§ Provides access to M0 Debug port
o VORAGO Controller
§ Provides standard boundary scan
§ Provides BIST access to memories
§ Provides eFuse access
§ Provides Test mode access
• Scan
• IDDQ
• I/O Parametric
• Configuration of Boot sequence
• Configuration of Memory Margin
• eFuse
o 32-bit Unique ID Number Support
o Custom part configuration information
§ SPI ROM interface – Delay, Speed, Size, Checking
o Multiple reconfiguration support (limited to 30 times)
www.voragotech.com page 11
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
2.2 Block Diagram
AHB-LITE BUS
A
P
System Config Timers/Counters
B
B
IO Pin Config I2C Pins
U I2Cs
S
www.voragotech.com page 12
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
2.3 Memory Map
The processor chip contains several memory areas shown below:
The Power-Up sequence is triggered by the internal Power-On-Reset detection logic and
controlled by the internal nominal 1MHz oscillator. When the Power-Up condition is
triggered, the primary internal logic (and the ARM® Cortex®-M0 processor) is held in reset
until the Power-Up sequence completes. This sequence consists of the following steps:
www.voragotech.com page 13
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
1. 1ms delay from 1000 cycles of the nominal 1MHz oscillator (this allows VDD/VDDIO
to reach higher levels)
2. Read internal eFuse to get the configuration data.
3. Timed delay based on eFuse configuration data and the nominal 1MHz oscillator.
4. Release of reset to the SPI boot controller. This begins the process of loading the
internal code memory with data from the external SPI boot memory. The memory is
read starting at address 0, in blocks of 128 bytes. Some aspects of this SPI based
boot process are customizable (such as SPI speed, SPI latency, boot memory size,
etc.); these are documented in the JTAG and eFuse sections.
5. Release of reset to the ARM® Cortex®-M0 processor. This begins the execution of
code by the processor.
The EXTRESETn pin can also be used to delay the Power-Up Sequence. If EXTRESETn is active
(low) at any time during the initial 1ms delay, the Power-Up sequence is stalled until
EXTRESETn is inactive (high).
In addition to loading the code memory, the Power-Up reset sequence (step 4) will initialize
the data memory to all zero values. This allows correct error-detect and correct (EDAC)
syndromes to be generated for all memory data.
The CLK pin must be valid starting at step 4. Valid clock means stable values (below VIL or
above VIH) and meeting the minimum Clock high and low times. This allows the clock to be off
as long as the level is valid. Steps 4 and 5 clock source is the CLK pin. If the CLK pin, does
not have a valid input, steps 4 and 5 will not occur and no code will be executed.
www.voragotech.com page 14
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
2.5 Other Resets
In addition to the Power-Up reset, the device can be reset from other events:
• EXTRESETn pin
• SYSRESETREQ from software
• Hardware events configured by IRQ Selector Peripheral or the System Controller
Peripheral:
o Processor Lockup
o Watchdog Timer
o Memory Errors (Single or Multibit errors from the EDAC memory controller)
Note, that due to the ESD protection used in the HARDSILTM process, the device does not meet
the non-obstruct feature of I2C Fast-Mode when this device is powered off. If this non-obstruct
feature is required in a system using this part, it will need to be implemented external to the
device.
www.voragotech.com page 15
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
3 ARM® Cortex®-M0 processor
Primary documentation on the Cortex®-M0 processor can be found in the ARM® Documents:
www.voragotech.com page 16
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4 Peripherals
www.voragotech.com page 17
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
ROM_MBE RW 0x044 Count of ROM MBE Errors 0x0000
0000
IOCONFIG_CLKDIV0 R 0x048 IO Filter Clock 0 Divide 0x0000
value 0000
IOCONFIG_CLKDIV1 RW 0x04c IO Filter Clock 1 Divide 0x0000
value 0000
IOCONFIG_CLKDIV2 RW 0x050 IO Filter Clock 2 Divide 0x0000
value 0000
IOCONFIG_CLKDIV3 RW 0x054 IO Filter Clock 3 Divide 0x0000
value 0000
IOCONFIG_CLKDIV4 RW 0x058 IO Filter Clock 4 Divide 0x0000
value 0000
IOCONFIG_CLKDIV5 RW 0x05c IO Filter Clock 5 Divide 0x0000
value 0000
IOCONFIG_CLKDIV6 RW 0x060 IO Filter Clock 6 Divide 0x0000
value 0000
IOCONFIG_CLKDIV7 RW 0x064 IO Filter Clock 7 Divide 0x0000
value 0000
ROM_RETRIES RO 0x068 ROM Boot Retry Count 0x0000
0000
REFRESH_CONFIG RW 0x06c Register Refresh Rate 0x0000
0000
TIM_RESETS RW 0x070 TIM Reset Control 0xFFFF
FFFF
TIM_CLK_ENABLES RW 0x074 TIM Clock Enable Control 0x0000
0000
PERIPHERAL_RESET RW 0x078 Peripheral Reset Control 0xFFFF
FFFF
PERIPHERAL_CLK_ENABLES RW 0x07c Peripheral Clock Enable 0x0000
Control 0000
LOCKUP_RESET RW 0x080 Lockup Reset Enable 0x0000
0001
- - 0x084 Reserved -
–
0xFEC
EF_CONFIG RO 0xFF0 eFuse Config Register -
EF_ID RO 0xFF4 eFuse ID Register -
PROCID RO 0xFF8 Processor ID Register See Details
PERID RO 0xFFC Peripheral ID Register 0x0180
07e1
www.voragotech.com page 18
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.1.1 RST_STAT Register
The system reset status register reports the source of the last system reset (including Power On
Reset events). Multiple bits may be set if multiple resets were asserted at the same time. Bits
are set in this registers by reset events. Bits are cleared by writing to this register.
www.voragotech.com page 19
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
3 LOCKUP System LOCKUP asserted 1
4 WATCHDOG Watchdog Reset asserted 1
5 MEMERR Memory Error Reset asserted 1
31:6 Reserved Reserved, Reads as 0
Note that the scrub controller does not exist in the VA10800 version.
www.voragotech.com page 20
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
request is issued. Each scrub request checks a single 32-bit memory word, and increments a
scrub address register.
Note that the scrub controller does not exist in the VA10800 version.
www.voragotech.com page 21
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.1.9 RAM_TRAP_ADDR Register
The RAM EDAC TRAP ADDRESS register along with the RAM EDAC TRAP SYND register
provides a way to write bad EDAC data to the Data RAM (RAM) for testing purposes. When
TRAP is ENABLEd and a write operation to the configured memory address is requested, then
the RAM EDAC TRAP SYND register is used instead of the normal computed Syndrome bits.
Note that since memory is configured as a 32-bit word, the lower 2 address bits are not used
in the compare. Also, only those address bits that access the Memory are compared.
Note that EDAC is not supported in the VA10800 version, so these interrupt sources do not
exist in that version.
www.voragotech.com page 22
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
1 RAMMBE Enable from Data RAM multi-bit error 0
2 ROMSBE Enable from Code RAM (ROM) single-bit 0
error
3 ROMMBE Enable from Code RAM (ROM) multi-bit 0
error
31:4 Reserved Reserved, Reads as 0
www.voragotech.com page 23
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
3 ROMMBE IRQ from Code RAM (ROM) multi-bit error
31:4 Reserved Reserved
www.voragotech.com page 24
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Bit Symbol Description Power-on-
Reset
value
15:0 COUNT Error Count 0
31:16 Reserved Reserved, Reads as 0
Note that the refresh controller does not exist in the VA10800 version.
www.voragotech.com page 25
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
clocked every (DIVCOUNT+1)*16
cycles.
29:16 Reserved Reserved, Reads as 0
31:30 TESTMODE Special Test Mode configuration 0x0
00/01 Normal
10 Force refresh off
11 Force refresh on constantly
www.voragotech.com page 26
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
9:8 UART[i] Resetn of UART ports 3
15:10 Reserved Reserved 0x3f
17:16 I2C[i] Resetn of I2C ports 3
19:18 Reserved Reserved 3
20 SYSTEM Resetn of System Config 1
21 IRQSEL Resetn of IRQ Selector 1
22 IOCONFIG Resetn of IO Config 1
23 UTILITY Resetn of Utility Peripheral 1
24 PORTIO Resetn of PORT IO interface 1
31:25 Reserved Reserved 0xffff
Note: For a peripheral to access any GPIO, both the peripheral and the IOCONFIG module
clocks must be enabled.
www.voragotech.com page 27
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.1.26 Lockup Reset Register
The Lockup reset register controls if the system is reset on a processor lockup event or not.
www.voragotech.com page 28
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
is based on cycles of the internal nominal 1MHz
oscillator.
0 – 1 cycles (~ 0ms)
1 – 1000 cycles (~1ms)
2 – 3000 cycles (~3ms)
3 – 10000 cycles (~10ms)
4 – 30000 cycles (~30ms)
5 – 100000 cycles (~100ms)
6 – 300000 cycles (~300ms)
7 – 500000 cycles (~500ms)
16:9 0x03 ROM_READ SPI ROM read instruction code.
21:1 0x00 ROM_LATENC Number of bits of latency from Address until data from
7 Y the SPI ROM.
23:2 0x1 ROM_ADDRES Rom Address Mode. Specifies the number of bits/bytes
2 S to use for addressing the SPI ROM.
0 – 16 bit / 2 bytes
1 – 24 bit / 3 bytes
2 – 32 bit / 4 bytes
24 1 ROM_DLYCAP ROM SPI Delayed capture. When 1, the ROM_SI data
is captured on clock falling edge instead of the normal
SPI mode of the rising edge. This allows almost a full
SCK clock cycle for the SPI ROM to respond from
address to data. This mode allows a faster SPI cycle
time.
25 0 ROM_STATUS In this mode, the first data byte from the SPI ROM
following an address is taken as a status byte. A Zero
status data byte indicates valid data follows. A non-
zero status data byte indicates the device is busy, and
that the SPI transaction should be restarted.
26- 0x0 These bits control internal read timing and must be
30 maintained at this value (0x0).
31 0 ENABLE Enables the config settings. When this bit is 0, the other
bits in this register are ignored. When this bit is 1, the
other bits in this register are used.
www.voragotech.com page 29
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.1.29 PROCID Register
This is a read-only register that identifies the processor ID.
www.voragotech.com page 30
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.2 IRQ Selector Peripheral (Software label = IRQSEL)
The IRQ selector peripheral contains registers that configure which internal interrupt sources
are connected to the interrupt signals feeding the processor NVIC (Nested Vectored Interrupt
Controller). The NVIC controller provides 32 maskable interrupts, and one Non-Maskable
Interrupt (NMI). In addition, an interrupt source can be configured to generate a RXEV event
signal to the processor, trigger the WatchDog reset condition, or trigger the MemoryError
reset condition.
Figure 2 - Block diagram of IRQ selector peripheral
The IRQ Selector provides one register for each possible internal interrupt source. This
register contains the index number of which destination it is connected to. Multiple internal
interrupt sources can be connected to the same destination; in which case all the sources are
ORed together.
www.voragotech.com page 31
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
The peripheral must have its clock enabled to update any of the registers. The clock enable is
controlled by the Clock Enable in the System Configuration Peripheral. Once the peripheral
has been configured, the clock need not be enabled to allow interrupts to pass through the
block.
www.voragotech.com page 32
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
SPI[2] RW 0x198 SPI 2 IRQ 0XFFFF
FFFF
- RW 0x19C Reserved 0XFFFF
FFFF
I2C_MS[0] RW 0x1A0 I2C 0 Master IRQ 0XFFFF
FFFF
I2C_MS[1] RW 0x1A4 I2C 1 Master IRQ 0XFFFF
FFFF
- 0x1A8- Reserved 0XFFFF
0x1AC FFFF
I2C_SL[0] RW 0x1B0 I2C 0 Slave IRQ 0XFFFF
FFFF
I2C_SL[1] RW 0x1B4 I2C 1 Slave IRQ 0XFFFF
FFFF
- 0x1B8- Reserved 0XFFFF
0x1BC FFFF
INT_RAM_SBE RW 0x1C0 Internal memory RAM SBE IRQ 0XFFFF
FFFF
INT_RAM_MBE RW 0x1C4 Internal memory RAM MBE IRQ 0XFFFF
FFFF
INT_ROM_SBE RW 0x1C8 Internal memory ROM SBE IRQ 0XFFFF
FFFF
INT_ROM_MBE RW 0x1CC Internal memory ROM MBE IRQ 0XFFFF
FFFF
TXEV RW 0x1D0 Processor TXEV 0XFFFF
FFFF
- - 0x1D4- Reserved -
0x7FC
www.voragotech.com page 33
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
- RW 0x900- Reserved -
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0181
07e1
www.voragotech.com page 34
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.2.2 Interrupt Status Register
Each of the interrupt status registers (IRQS[0] through NMI) contains a value that indicates if
the given Interrupt (or pseudo interrupt) is active.
www.voragotech.com page 35
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.3 IO Configuration Peripheral (Software label = IOCONFIG)
The following diagram shows a general block diagram of the Interface associated with each
IO pin.
Filter Clocks
APB BUS INTERFACE
Comparators
Input Mux
INV DATA In
ZI
PARAMEN
DIR
OE PAD En
A Open Drain
PAD A
INV Data Out
PAD PLDN
www.voragotech.com page 36
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
The IO configuration peripheral contains registers that configure behavior and function
associated with the GPIO pins. Input pins can be configured with: glitch filtering or clock
synchronization logic, pull-up, pull-down, and input inversion logic. Outputs can be
configured as open-drain and output inversion logic.
Input glitch filtering is done by sampling the signal from 2 to 5 times and requiring that all the
samples be the same value. The sample clock can be picked from 8 different clock sources
that are defined in the System Configure Peripheral as IO Filter clocks 0-7 (0 is always the
system clock).
The default reset value results in clock synchronization being selection on all inputs. When a
pin is configured as MISO of a master SPI port it is recommended that the clock
synchronization be turned off to reduce the input latency. This is valid as this signal should
already be synchronized to the output SPI clock.
The peripheral must have its clock enabled to update any of it configuration registers. The
clock enable is controlled by the Clock Enable in the System Configuration Peripheral. The
clocks to input filtering logic are not disabled when the peripheral clock is disabled. As such,
once the peripheral has been configured, the clock need not be enabled to allow IO function
to operate.
www.voragotech.com page 37
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
- RW 0x1E0- Reserved -
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0182
07e1
www.voragotech.com page 38
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.3.2 Loopback Mode
A special Loop-Back mode is enabled when IODIS is enabled (is 1) and IEWO is enabled (is
1). In this mode, the internal GPIO is connected to itself, if no function is selected (FUNSEL),
or the GPIO is connected to the selected function (FUNSEL).
Note the GPIO PORTA and PORTB input registers can always read the pin input value no
matter what function is selected on the pins. The UART and SPI interface will only receive the
value on the pins when the proper function mode is selected for the pin. When nothing is
configured to be connected to the UART or SPI peripheral signals, these peripherals will
receive a 1 on the SPI_SSELx and UARTx_RX signals, and 0 on all other signals.
Note: If multiple pins are configured as the same UART or SPI function that is an input, the
UART/SPI input will receive the logical AND or OR of the pin values. SPI_SSELx and
UARTx_RX pins are logical ANDed while all other pins are logical ORed. In general the part
should not be configured to do this.
When a pin configured as one of the selection choices (other than GPIO), the pin direction is
configured based selected peripheral. So, when connected to an SPI signal the direction is
based on the SPI peripherals master/slave mode selection. When connected to a UART the
signal direction is output for Tx/RTSn and input for Rx/CTSn. When connect to TIM or other
status signals the direction is output.
www.voragotech.com page 39
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
PORTA[23] SPI_SSELAn[5] SPI_SSELBn[5] SPI_SSELCn[1]
PORTA[22] SPI_SSELAn[6] SPI_SSELBn[6] SPI_SSELCn[2]
PORTA[21] SPI_SSELAn[7] SPI_SSELBn[7] SPI_SSELCn[3]
PORTA[20] SPI_SSELCn[1] SPI_SCKB SPI_SSELCn[4]
PORTA[19] SPI_SSELCn[2] SPI_MOSIB UARTB_TX
PORTA[18] SPI_SSELCn[3] SPI_MISOB UARTB_RX
PORTA[17] SPI_TXEMPTYA SPI_SSELBn[0] UARTA_TX
PORTA[16] SPI_TXEMPTYB SPI_SSELBn[1] UARTA_RX
PORTA[15] TIM[15] SPI_SSELBn[2] UARTA_RTSn
PORTA[14] TIM[14] SPI_SSELBn[3] UARTA_CTSn
PORTA[13] TIM[13] SPI_SSELBn[4] UARTB_RTSn
PORTA[12] TIM[12] SPI_SSELBn[5] UARTB_CTSn
PORTA[11] TIM[11] SPI_SSELBn[6] LOCKUP (Out)2
PORTA[10] TIM[10] SPI_SSELBn[7] SYSRESETREQ
(Out)2
PORTA[9] TIM[9] UARTA_TX SLEEPING (Out)2
PORTA[8] TIM[8] UARTA_RX HALTED (Out)2
PORTA[7] TIM[7] UARTA_RTSn TXEV (Out)2
PORTA[6] TIM[6] UARTA_CTSn RXEV (In)2
PORTA[5] TIM[5] UARTB_RTSn EDBGRQ (In)2
PORTA[4] TIM[4] UARTB_CTSn
PORTA[3] TIM[3] UARTB_TX I2CB_SCL1
PORTA[2] TIM[2] UARTB_RX I2CB_SDA1
PORTA[1] TIM[1] I2CA_SCL1 DBGRESTARTED
(Out)2
PORTA[0] TIM[0] I2CA_SDA1 DBGRESTART (In)2
www.voragotech.com page 40
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
PORTB[10] SPI_SSELBn[6] SPI_SSELBn[2] TIM[10]
1 – This I2C mapping to GPIO pins is primarily intended for device testing.
2 – These processor status/control signals are available for special purpose use. They are not
intended for general use.
www.voragotech.com page 41
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.4 Utility Peripheral (Software label = UTILITY)
The utility peripheral contains registers that access dedicated hardware support engines. This
includes:
The EDAC syndrome encoders and checkers all used the same input registers (SYND_DATA0,
SYND_DATA1, and SYND_SYND). The outputs of each of the different encoders and
checkers are available in unique registers.
The peripheral must have its clock enabled to update any of it registers. The clock enable is
controlled by the Clock Enable in the System Configuration Peripheral.
www.voragotech.com page 42
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
SYND_CHECK_64_ SYND R 0x024 32/37 Edac Decode -
Syndrome Register
SYND_ENC_32_52 R 0x028 32/52 Edac Encode -
Register
SYND_CHECK_32_52_DATA R 0x02c 32/52 Edac Decode Data -
Register
SYND_CHECK_32_52_ R 0x030 32/52 Edac Decode -
SYND Syndrome Register
- - 0x034 Reserved -
–
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0084
07e1
www.voragotech.com page 43
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.4.1 SYND_DATA0/SYND_DATA1/SYND_SYND Registers
The 3 registers SYND_DATA0, SYND_DATA1, and SYND_SYND provide input values to the
various EDAC encoder and decoder logic blocks. SYND_DATA0 and SYND_DATA1 provide
up to a 64 bit data input register, and SYND_SYND provides up to a 20 bit Syndrome input
register.
www.voragotech.com page 44
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
detected and the corrected syndrome if a single bit error is detected; in addition, this register
contains the check status bits.
www.voragotech.com page 45
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
www.voragotech.com page 46
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
www.voragotech.com page 47
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.5 General Purpose IO Peripheral (Software label = GPIO)
The following diagram shows a general block diagram of the GPIO Interface.
Data Control
A Regs
H
B
Data
DATA In/Out Out
B Regs Control
U
S DATA IN IO
Intf GPIO Pins
I
N DIR Reg
T
E
R
F IRQ Logic
IRQ Control
A IRQs
Regs
C
E
STATUS Logic STATUS
Bus
The general purpose IO (GPIO) peripheral consists of 2 GPIO banks. The first bank is
PORTA and is 32 bits wide. The second bank is PORTB and is 24 bits wide. This gives a total
of 56 GPIO pins.
The IO Configuration peripheral controls which bits of the GPIO peripheral are actually
connected to the GPIO pins.
www.voragotech.com page 48
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
The peripheral must have its clock enabled to update any of it registers. The clock enable is
controlled by the Clock Enable in the System Configuration Peripheral.
www.voragotech.com page 49
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
IRQ_RAW R 0x044 Raw Interrupt Status 0x0000
0000
IRQ_END R 0x048 Enabled Interrupt Status 0x0000
0000
EDGE_STATUS R 0x04c Edge Detect Status 0x0000
0000
- - 0x050- Reserved -
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0040
07e1
When a pin is configured as an output (either by the DIR register, or the function selection),
the IENWO bit of the IO configuration register can be used to enable the input buffer for
reading the output value.
When a pin is configured as an output (either by the DIR register, or the function selection),
the IENWO bit of the IO configuration register can be used to enable the input buffer for
reading the output value.
www.voragotech.com page 50
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.5.3 DATAOUT Register
The DATAOUT register provides write access to the output data value for the GPIO port. The
data bits written are masked with the DATAMASK register, so only the bits enabled by the
DATAMASK are updated.
www.voragotech.com page 51
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.5.7 TOGOUT Register
The TOGOUT register provides alternate write access to the GPIO output value. For those bits
that contain a 1 in the write value to this register the matching bit in the GPIO output value
register will be inverted from its current value. For those bits that contain a 0 in the write
value to this register the matching bit in the GPIO output value will remain unchanged.
Updating of the data out register with this register is NOT dependent on the DATAMASK
register.
As an example, if PULSE mode is enabled for a bit and the corresponding PULSEBASE value
is 0, then setting a 1 to the corresponding data bit will cause the GPIO bit to go high for
www.voragotech.com page 52
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
exactly one system clock cycle, and then reset back to 0 on the next system clock cycle.
Setting the corresponding data bit to 0 results in no change to the GPIO bit.
When configured to detect edge transition, the output status is active for a single cycle when
the edge is detected. In addition, an edge detect status register is set to record the edge
www.voragotech.com page 53
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
detection. This edge detect status register can be read (as EDGE_STATUS) to get it values,
which also clears it. The persistent edge detect status register is not used for interrupt
generation or GPIO output status.
The IRQ_EDGE register configures dual edge detection when edge detection is enabled.
The IRQ_EVT register configures the level value or edge type that triggers the status.
Note that even if the IRQ_ENB bits are disabled, the status detection logic is still active and
can detect edges. The status logic can be used independent of the interrupt enable to control
cascade sources of the TIM peripheral.
www.voragotech.com page 54
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Table 20 IRQ_EVT Register
Enabling interrupts allows the peripheral to generate interrupts. For the processor to see the
interrupt it must also be configured in the IRQ Selector Peripheral to one of the processor
interrupts, and enabled in the processors NVIC.
www.voragotech.com page 55
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.5.16 IRQ_END Register
The IRQ_END status register provides read access to the Enabled interrupt status of each
GPIO bit. This is the logical AND of the IRQ_RAW status bits and the IRQ_ENB bits.
www.voragotech.com page 56
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.6 Timer/Counter Peripheral (Software label = TIMER)
The following diagram shows a general block diagram of the Timer/Counter Interface.
I
Control Reg Counter Control
N
T
E
R
Counter
F
A VALUE OUT
C
E
IRQ Logic
IRQs
www.voragotech.com page 57
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Selection table in the IOCONFIG section for which port pins are associated with the 24 timer
channels.
GPIO(52) IRQs
TIM(24) IRQs
IRQ BUS
Figure 6 – Timer peripheral chip interconnect
www.voragotech.com page 58
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
TIM9 0x09000-0x09FFC TIM 9
TIM10 0x0A000-0x0AFFC TIM 10
TIM11 0x0B000-0x0BFFC TIM 11
TIM12 0x0C000-0x0CFFC TIM 12
TIM13 0x0D000-0x0DFFC TIM 13
TIM14 0x0E000-0x0EFFC TIM 14
TIM15 0x0F000-0x0FFFC TIM 15
TIM16 0x10000-0x10FFC TIM 16
TIM17 0x11000-0x11FFC TIM 17
TIM18 0x12000-0x12FFC TIM 18
TIM19 0x13000-0x13FFC TIM 19
TIM20 0x14000-0x14FFC TIM 20
TIM21 0x15000-0x15FFC TIM 21
TIM22 0x16000-0x16FFC TIM 22
TIM23 0x17000-0x17FFC TIM 23
www.voragotech.com page 59
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
- - 0x024- Reserved -
0xFC8
- - 0xFD0- Reserved -
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0111
07e1
• Enable the clock source for the GPIO and IOCONFIG in the
PERIPHERAL_CLK_ENABLE register the SYSCONFIG peripheral
• Enable the clock source of the Timer in the TIM_CLK_ENABLE of the SYSCONFIG
peripheral
• Set pin assignment for port pin in the IO Function select register in the IOCONFIG
peripheral.
• Set the period of the PWM in RST_VALUE (TIM restart value)
• Set the duty cycle of the PWM in PWMA_VALUE
• If using interrupts:
o Set the IRQ_ENB bit in the CTRL register
o Configure the IRQ Selector Peripheral
o Set the NVIC priority of the interrupt
o Enable the NVIC interrupt
• If using timer as other timer cascade input:
o Set the IRQ_ENB bit in the CTRL register
• Configure the CTRL register to ENABLE the block and to set the STATUS_SEL field to
PWMA.
The peripheral must have its clock enabled and the counter enabled too for it to count. The
clock enable is controlled by the Clock Enable in the System Configuration Peripheral. When
the ENABLE bit is set to zero, the counter will no longer count. Disabling the clock from the
www.voragotech.com page 60
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
System Configuration Peripheral will not disable the clock until the counter is no longer
ACTIVE.
The counter has a concept of Enabled and Active. Enabled means it can count as determined
by the cascade settings. Active means the counter has started counting, but not finished.
Started counting, means the count value has changed its value at least once since it was
enabled to count. The counter ACTIVE bit goes to 0 from several different cases:
www.voragotech.com page 61
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
www.voragotech.com page 62
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
6 PWMA active mode.
1 when CounterValue <= PWMA Value and >0
0 otherwise
7 Reserved
8 STATUS_INV Invert the value selected by STATUS_SEL 0
9 REQ_STOP When 1, the counter is requested to stop
(changing the ENABLE bit to 0, and changing the
ACTIVE bit to 0) on the next normal count cycle
(even if the counter is not yet at zero).
31: - Reserved 0
10
Note:
1. Enabling interrupts allows the peripheral to generate interrupts. For the processor to
see the interrupt it must also be configured in the IRQ Selector Peripheral to one of the
processor interrupts, and enabled in the processors NVIC.
Note if this value is set to 0, the counter becomes a divide by 1 counter; which is basically an
always done counter. This may be useful for special cascading modes.
www.voragotech.com page 63
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Bit Symbol Description Reset value
0 ENABLE Enables the counter (1 is enabled) 0
31:1 Reserved
www.voragotech.com page 64
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
counting (is ACTIVE) the Cascade control is
ignored.
8 CSDEN2 Cascade control 2. When this bit is 1, the counter 0
will stop (ENABLE will go to 0) instead of
decrementing at the next update time, if the
selected Cascade signal is active. This mode is
similar to the REQ_STOP control bit, but it is
signaled by a Cascade source.
9 CSDINV2 Invert Cascade 2. When this bit is 0 the Cascade 0
signal 2 is active high, when this bit is 1 it is
active low.
10 CSDTRG2 Cascade control 2 (if enabled) is used in Trigger 0
mode. In trigger mode, the counter is
automatically disabled (ENABLE and ACTIVE bits
will go to 0) if the corresponding Cascade2 level-
sensitive input source is active when the count
reaches 0. If the counter is not zero, the
Cascade control is ignored. Note: Do not use
edge sensitive cascade sources in this mode.
The source of the cascade input is the interrupt output from GPIO, other Timer channels, the
memory check unit, the transmit event (TXEV) signal from the M0 core or the I/O
configuration clock dividers. The interrupt must be enabled on the sourcing peripheral block.
www.voragotech.com page 65
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
0 TIM_CAS_SRC_PORTA_0 PORTA[0] RAW IRQ RAW Status from
PORTA
1-30 TIM_CAS_SRC_PORTA_1 PORTA[1-30] RAW
TIM_CAS_SRC_PORTA_30 IRQ
31 TIM_CAS_SRC_PORTA_31 PORTA[31] RAW IRQ
32 TIM_CAS_SRC_PORTB_0 PORTB[0] RAW IRQ RAW Status from
PORTB
33-54 TIM_CAS_SRC_PORTB_1 PORTB[1-22] RAW
TIM_CAS_SRC_PORTB_22 IRQ
55 TIM_CAS_SRC_PORTB_23 PORTB[23] RAW IRQ
56-64 - Reserved
64 TIM_CAS_SRC_TIM_0 TIM 0 TIMERDONE Timer Done
signals from
TIM1
65-86 TIM_CAS_SRC_TIM_1 TIM 1-22
TIM_CAS_SRC_TIM_22 TIMERDONE
87 TIM_CAS_SRC_TIM_23 TIM 23 TIMERDONE
88-95 - Reserved
96 TIM_CAS_SRC_RAM_SBE RAM_SBE Single-Bit Error
from Data RAM
97 TIM_CAS_SRC_RAM_MBE RAM_MBE Multi-Bit Error
from Data RAM
98 TIM_CAS_SRC_ROM_SBE ROM_SBE Single-Bit Error
from Code RAM
(ROM)
99 TIM_CAS_SRC_ROM_MBE ROM_MBE Multi-Bit Error
from Code RAM
(ROM)
100 TIM_CAS_SRC_TXEV TXEV Processor TXEV
signal
101- - Reserved
119
120 TIM_CAS_SRC_IOCONFIG_CLKDIV_0 IOCONFIG_CLKDIV0 IO Configuration
Clock Divider 0
121- TIM_CAS_SRC_IOCONFIG_CLKDIV_1 IOCONFIG_CLKDIV1- IO Configuration
126 TIM_CAS_SRC_IOCONFIG_CLKDIV_6 6 Clock Divider 1-
6
127 TIM_CAS_SRC_IOCONFIG_CLKDIV_7 IOCONFIG_CLKDIV7 IO Configuration
Clock Divider 7
Notes:
www.voragotech.com page 66
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
1. TIMERDONE is a one cycle pulse generated by each timer when it transitions to a
count value of zero.
The below figure provides an example PWM waveform with PWMA set to 0x0D00.
Figure 7 - Example waveform with PWMA being selected
www.voragotech.com page 67
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Using the Timer in PWMB mode allows for other channels to have edges occur slightly offset
which can be useful in motor control applications. PWMB also allows PWM waveforms to be
center-aligned which can greatly help reduce harmonics of high frequency power switching
devices. The below figure shows an example waveform on a port pin with PWMB selected.
Figure 8 - Example of PWMB mode of operation.
www.voragotech.com page 68
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.7 UART Peripheral (Software label = UARTA & UARTB)
The following diagram shows a general block diagram of the UART Interface.
Transmit Receive
A FIFO FIFO
P 16x8 16x8
B
IRQ Reg
Status/Control/IRQ IRQs
Logic
The UART peripheral contains 2 UART banks. Each UART bank provides a general UART with
independent Transmit and Receive sections, each with a 16 byte FIFO.
To have the UART connected to input/output pins, the IO Configuration peripheral must be
properly configured to connect the UART to some pins. It is recommended that the pins be
configured in the IO Configuration peripheral before enabling a given UART.
www.voragotech.com page 69
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
www.voragotech.com page 70
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
RXFIFORTSTRG RW 0x040 Rx Fifo RTS Trigger level register 0x0000
000e
STATE R 0x044 Rx/Tx State Machine data -
- - 0x038- Reserved -
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0112
07e1
The following UART signals can be connected to GPIO pins using the IO Configuration
peripheral. X being A or B (port).
Name Description
UARTX_TX UART Transmit for port X
UARTX_RX UART Receive for port X
UARTX_RTSn UART RTSn for port X
UARTX_CTSn UART CTSn for port X
www.voragotech.com page 71
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.7.2 DATA Register
The DATA provides access to the UART input or output FIFOs. Any data written to the register
is loaded into the transmit FIFO. Reads from the register return an item from the receive FIFO.
The peripheral must have its clock enabled and the receiver enabled to send UART
transactions; and have its clock enabled and the transmitter enabled to transmit UART
transactions. The clock enable is controlled by the Clock Enable in the System Configuration
Peripheral. When either the RXENABLE bit or the TXENABLED bit is changed to zero, the
corresponding interface will become disabled when the interface is idle (completes any
pending transaction). Similarly, disabling the clock from the System Configuration Peripheral
will not disable the clock until any pending transactions have completed.
www.voragotech.com page 72
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Bit Symbol Description Reset
value
0 PAREN Parity Enable 0
1 PAREVEN When parity is enabled: 1 selects even parity, 0 0
selects odd parity
2 PARMAN Enables manual parity mode. When enabled the 0
transmitter uses the DPARITY bit from the data word
as the parity bit to transmit.
When enabled and not in 9-bit mode, the receiver
computes the XOR of the received parity and the
PAREVEN value (of the control register); this value
is stored in DPARITY bit of the data word, and is
used as the parity error interrupt.
When enabled and in 9-bit mode, the receiver uses
received parity values to store in DPARITY bit of the
data word, and as the parity error interrupt. This
allows interrupt generation on address match.
3 STOPBITS Select the number of stop bits: 0 is 1 stop bit, 1 is 2 0
stop bits.
5:4 WORDSIZE Selects the word size: 0x3
0x0 – 5 bits
0x1 – 6 bits
0x2 – 7 bits
0x3 – 8 bits
6 LOOPBACK Loopback mode. When 1, then the Receiver input is 0
connected to the Transmitter output and CTSn input
is connected to RTSn output.
7 LOOPBACKBLK Loopback block mode. When 1 and LOOPBACK is 0
1, then the Transmitter output (to the IO block) is
held high during loopback mode. In addition the
RTSn signal is held at the DEFRTS value.
8 AUTOCTS Enable auto CTS Mode. When enabled the 0
Transmitter is paused if CTSn is high, and a transmit
would normally start (data is ready in FIFO).
9 DEFRTS This specifies the value for the RTSn signal when 1
AUTORTS is not enabled or when the Receiver is
not enabled.
10 AUTORTS Enable auto RTS Mode. When enabled the RTSn 0
signal is auto generated from the FIFO level and
the RXFIFORTSTRG register. When RX FIFO Count
>= RXFIFORTSTRG level, then RTSn will be High,
www.voragotech.com page 73
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
otherwise it will be Low. When not enabled the
DEFRTS value is output on RTSn.
11 BAUD8 When 0, a standard 16x baud clock is used. When 0
1 an 8x baud clock is used.
31:12 - Reserved, Read as 0
• X = ClockFrequency/(BaudRate*BaudMode)
• BaudMode = 16 or 8 based on BAUD8 control bit
• INT = integer_part_of(X)
• FRAC = integer_part_of(64 * (X - INT) + 0.5)
• REGISTER = INT * 64 + FRAC
www.voragotech.com page 74
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Table 28 - UART Baud Rate Values
Bits 7-5 reflect that status of the next data in the data register and can only be non-zero when
there is valid data in the DATA register (as indicated by bit 0). Thus a parity error means that
the next data word to be read from the Data register had a parity error. Break means that
next data word is a break (and will have 0 for the DATA value). Once data is read from the
DATA register the status reflects the next data word.
www.voragotech.com page 75
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
6 RXPAR A 1 indicates there has been a receive parity error, 0
or an address match in 9-bit mode
7 RXBRK A 1 indicates there has been a receive break
condition
8 RXBUSYBRK A 1 indicates that a break has been received, but 0
the receiver is still busy waiting from the break to
end.
9 RXADDR9 The 9-bit Address match register. A 1 indicates 0
there has been an address match in 9-bit mode.
14:10 Reserved Reserved, read as 0
15 RXRTSN Output value of RTSn signal -
31:16 Reserved Reserved, read as 0
www.voragotech.com page 76
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
transmit FIFO similar to data requests. The break duration is measured in character periods,
and will be the BRKCNT value plus about 1 3/4.
Using a BRKCNT value of 0x7f will result in a continuous break. In this mode the transmitter
sends a break of one-character length; then it goes idle while leaving the Transmit value at 0
(break level). To exit continuous break mode another break must be sent that is not
continuous. After that valid data can be sent again. Note that in continuous break mode, the
software is responsible for the duration of the break, since it continues until another break
request is loaded in the transmitter. Data should not be sent while in continuous break mode,
as it will exit continuous break mode, but the receiver will most likely get a framing error.
In 9-bit mode the parity bit of each received word is check to determine if the word is address
or data. If the word is an address it is checked against the 9-bit receive match address using
the ADDR9MASK (bits that are 1 in the ADDR9MASK register determines which address bits
are compared). If the address matches, the AddressMatch register is set; if it does not match,
the AddressMatch register is cleared. If a received word is determined to be data, it is
ignored if the address match register is currently clear, and it is loaded into the FIFO as
normal data if the address match register is currently set.
Note, that the matched address is loaded into the receive FIFO with the DPARITY bit set. This
allows the actual received address to be examined when the ADDR9MASK has been used to
match multiple addresses. Having the DPARITY bit set acts as a parity error; so the parity
interrupt can be used to detect new address matches.
Enabling 9-bit mode does not affect the UART transmitter. To Transmit in 9-bit mode the
PAREN and PARMAN bits should be set in the control register. Then a word is transmitted as
address or data by using the DPARITY bit in the data register.
www.voragotech.com page 77
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Bit Symbol Description Reset
value
7:0 DATA receive match address for 9-bit mode 0
14:0 - Reserved 0
15 ENB9BIT Enable 9-bit mode 0
31:16 - Reserved, Read as 0
Enabling interrupts allows the peripheral to generate interrupts. For the processor to see the
interrupt it must also be configured in the IRQ Selector Peripheral to one of the processor
interrupts, and enabled in the processors NVIC.
www.voragotech.com page 78
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
6 IRQ_TX_EMPTY Transmitter interrupt flush enable. Generates an 0
interrupt when the transmit FIFO is empty and
TXBUSY is 0.
7 IRQ_TX_CTS Transmitter interrupt enable when CTSn changes 0
value.
31:7 - Reserved, Read as 0 0
Note only the Overflow status bits can be cleared. All other interrupt bits depend on data
levels in the FIFOs, or Read Status bits that are cleared by reading the data word.
www.voragotech.com page 79
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Bit Symbol Description Reset
value
4:0 LEVEL Specifies the AUTORTS trigger level for the Receive 0x0e
FIFO
31:5 - Reserved, Read as 0
www.voragotech.com page 80
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.8 SPI Peripheral (Software label = SPIA, SPIB & SPIC)
The following diagram shows a general block diagram of the SPI Interface.
Transmit Receive
FIFO FIFO
16x16 16x16
A
P
B
B Tx
U CLK IO
S Generator Inter SPI Pins
face
I
N
T Rx
E
R
F Status/Control
A Control Reg
C
E Status Reg
Status/Control/IRQ IRQs
Logic
IRQ Reg
The SPI peripheral contains 3 SPI banks. The first 2 SPI banks provide a general SPI that can
be configured as a master or slave. The third SPI bank can only be configured as a master,
and uses the pins associated with the SPI ROM boot port. The SPI ROM boot process uses its
own unique SPI controller; then after the boot process completes the pins are connected to
the processor SPI controller.
Each SPI contains a linked Transmit and Receive section, each with a 16 word FIFO.
www.voragotech.com page 81
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
To have the SPI connected to input/output pins, the IO Configuration peripheral must be
properly configured to connect the SPI to some pins. It is recommended that the pins be
configured in the IO Configuration peripheral before enabling a given SPI.
SPI2 is always connected to the ROM_SCK (as SPI_SCKC), ROM_CSn (as SPI_SSELCn[0]),
ROM_SI (as SPI_MISOC), and ROM_SO (as SPI_MOSIC) pins. Additionally, several more
chip selects can be configured with the IO Configuration peripheral.
www.voragotech.com page 82
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
TXFIFOIRQTRG RW 0x028 Tx FIFO Trigger level register 0x0000
0008
FIFO_CLR W 0x02C Clear FIFO Register -
STATE R 0x030 Rx/Tx State Machine data -
- - 0x030- Reserved
0xFF8
PERID RO 0xFFC Peripheral ID Register 0x0113
07e1
The following SPI signals can be connected to GPIO pins using the IO Configuration
peripheral. X being A, B or C (port).
Name Description
SPI_SCKX SPI Clock for port X
SPI_MISOX SPI Master Input Slave Output for port X
SPI_MOSIX SPI Master Output Slave Input for port X
SPI_SSELXn[0] SPI Chip Select 0 for port X (active low)
SPI_SSELXn[1] SPI Chip Select 1 for port X (active low)
SPI_SSELXn[2] SPI Chip Select 2 for port X (active low)
SPI_SSELXn[3] SPI Chip Select 3 for port X (active low)
SPI_SSELXn[4] SPI Chip Select 4 for port X (active low)
SPI_SSELXn[5] SPI Chip Select 5 for port X (active low)
SPI_SSELXn[6] SPI Chip Select 6 for port X (active low)
SPI_SSELXn[7] SPI Chip Select 7 for port X (active low)
4.8.1.1 Configuration
A typical sequence for configuring the SPI controller is summarized below:
• Set the MS bit in CTRL1 as desired for Master/Slave (don’t ENABLE interface).
• Configure the IO Configuration Peripheral to enable SPI pins as needed.
• Configure CTRL0, CTRL1, and CLKPRESCALE as desired for transaction type (don’t
ENABLE interface)
• If using interrupts:
o Load the IRQ_ENB register
www.voragotech.com page 83
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
o Configure the IRQ Selector Peripheral
o Set the NVIC priority of the interrupt
o Enable the NVIC interrupt
• Set the ENABLE bit in the CTRL1 register to enable the interface
• Set the MTXPAUSE bit in CTRL1 (in case we are interrupt while loading data)
• Set the proper CS enable in CTRL1
• Load the desired data into the DATA (FIFO) register
• Clear the MTXPAUSE bit in CTRL1
• Read/Poll the STATUS register until transaction is completed
• Read the returned SPI data from the DATA (FIFO) register
o If data is to be ignored, the FIFO could just be cleared with the FIFO_CLR
register
Notes:
1. SPO and SPH determine the SPI Clock Polarity and Phase. When SPO is 0 the off state
of the clock is 0; when SPO is 1 the off state of the clock is 1. When SPH is 0 data
changes on the falling edge of the clock and is captured on the rising edge of the
clock; when SPH is 1 data changes on the rising edge of the clock and is captured on
the falling edge of the clock.
2. See the CLKPRESCALE register for a description of the SCRDV use.
www.voragotech.com page 84
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
The following diagrams show the different SPI modes of SPO and SPH, for an 8 bit SIZE.
www.voragotech.com page 85
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.8.3 CTRL1Register
The CTRL1 register configures the SPI. When configuring the SPI peripheral, the ENABLE bit
should be set last, that is after all the other configuration changes have been made. This
allows the logic to initialize the Master/Slave choice (which controls I/O port enabling)
before the channel is enabled. Failure to do this can cause output glitches on I/O signals lines
when enabling the channel.
The peripheral must have its clock enabled and the interface enabled to send or receive SPI
transactions. The clock enable is controlled by the Clock Enable in the System Configuration
Peripheral. When the ENABLE bit is changed to zero, the interface will become disabled
when the controller is idle (completes any pending transaction). Similarly, disabling the clock
from the System Configuration Peripheral will not disable the clock until any pending
transactions have completed.
www.voragotech.com page 86
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Bit Symbol Description Reset
value
0 LBM Loopback Mode 0
1 ENABLE Enable SPI interface 0
2 MS Master(0) or Slave(1) 0
3 SOD Slave Output Disable (All CSn are 1, when 0
disabled)
6:4 SS Slave Select Value. Decoded to generate up to 8 0x0
slave select outputs. These are SPI_SSELXn[0-7].
7 BLOCKMODE Enable Block Mode. When enabled all data in the 0
FIFO is transmitted as a single SPI frame, unless the
BMSTOP bit is set on a data word. An SPI frames is
defined as CSn being active for the duration of
multiple data words.
8 BMSTART Enable Block Mode Start status. When enabled, bit 0
31 in the DATA in word will indicate the
RXDATAFIRST status. This signifies which Data word
is the first received byte in BLOCKMODE.
9 BMSTALL Enable Block Mode Stall. When transmitting in 0
BLOCKMODE and the Transmitter FIFO is empty
this enables stalling of the SCK until data is loaded
in the FIFO. Note that to end a transmission when
BMSTALL is active the BMSTOP bit must be set in
the DATA word. This bit only applies to
Master/Transmit mode.
10 MDLYCAP Enable Master Delayed Capture mode. This mode 0
is only available when configured as a Master.
When enabled this delays the capture of SI data by
half a clock cycle, so the data is captured on the
same edge as the SO data changes. This can be
used to run the SPI faster, provided the external
device holds data this long (which is normally the
case). Internal part timing is such that data will
always be captured on rising SCK before SCK rises
external to the chip.
11 MTXPAUSE Pause the Master Transmitter. This allows loading 0
of the Tx FIFO, without transmitting until pause is
released.
31:12 - Reserved, Read as 0
www.voragotech.com page 87
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.8.4 DATA Register
The DATA register that provides access to the SPI input or output FIFOs. Any data written to
the register is loaded into the transmit FIFO. Reads from the register return an item from the
receive FIFO.
www.voragotech.com page 88
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.8.6 CLKPRESCALE Register
The CLKPRESCALE register configures the SPI 2x clock generator. Together with SCRDV (bits
15:8 in the CTRL0 register) these define 2 divide counts that are used to build the final SPI
clock in master mode.
The SPI clock is primarily used in Master mode. In Slave mode the input SCK clock is used to
time transaction. The Slave uses versions of the input signals that are synchronized to the
system clock. As a result, the SPI slave is limited to running at 1/12 of the system clock
frequency.
Where:
Enabling interrupts allows the peripheral to generate interrupts. For the processor to see the
interrupt it must also be configured in the IRQ Selector Peripheral to one of the processor
interrupts, and enabled in the processors NVIC.
www.voragotech.com page 89
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
1. The Receive Timeout occurs, when the receive FIFO has not been read within 32
clocks ticks (of the SPICLKx2 clock) of receive FIFO being not empty. Reading data
from receive FIFO resets the timeout counter. Clearing the RXIM in interrupt status
register also resets the time counter. The SPICLKx2 used to clock the timeout register is
twice the configured SPI clock rate. Note that when the SPI interface is configured as a
slave, the configured SPI clock rate it not used for normal operation (as data is
clocked by the SPI clock); but the timeout counter is still clocked by the configured
clock rate.
www.voragotech.com page 90
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.8.11 RXFIFOIRQTRG Register
The RXFIFOIRQTRG register configures the RX FIFO half full level.
www.voragotech.com page 91
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.9 I2C Peripheral (Software label = I2CA and I2CB)
The following diagram shows a general block diagram of the I2C Interface.
Master Slave
Controller Controller
with FIFO with FIFO
A
P
B
ICLK
B
Generator IO
U
and I2C Interface
S I2C Pins
Status And
Master Bit
I Controller Filters
N
T
E
R
F Status/Control
A Control Regs
C
E Status Reg
Status/Control/IRQ IRQs
Logic
IRQ Regs
Each I2C contains a linked Transmit and Receive section, each with a 16 word FIFO.
Both the Master and the Slave support clock stretching under conditions when data it not
available for transmitting. See the CTRL and S0_ CTRL registers for details.
The I2C interfaces have dedicated pins that are not shared for other purposes.
www.voragotech.com page 92
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Table 32 – I2C Bank Location
www.voragotech.com page 93
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
- 0x04c-0xFC Reserved
S0_CTRL RW 0x100 Slave0 Control register 0x0000
0000
S0_MAXWORDS RW 0x104 Slave0 MaxWord Count 0x0000
register 0000
S0_ADDRESS RW 0x108 Slave0 Address register 0x0000
0000
S0_ADDRESSMASK RW 0x10C Slave0 Address Mask register 0x0000
0000
S0_DATA RW 0x110 Slave0 Data register 0x0000
0000
S0_LASTADDRESS R 0x114 Slave0 Last Address register -
S0_STATUS R 0x118 Slave0 I2C Controller Status -
register
S0_STATE R 0x11C Slave0 Controller State -
register
S0_TXCOUNT R 0x120 Slave0 TX Count register -
S0_RXCOUNT R 0x124 Slave0 Rx Count register -
S0_IRQ_ENB RW 0X128 Slave0 Interrupt Enable 0x0000
0000
S0_IRQ_RAW R 0x12C Slave0 Raw Interrupt Status -
S0_IRQ_END R 0x130 Slave0 Enabled Interrupt -
Status
S0_IRQ_CLR W 0x134 Slave0 Clear Interrupt Status -
S0_RXFIFOIRQTRG RW 0x138 Slave0 Rx Fifo Trigger level 0x0000
register 0008
S0_TXFIFOIRQTRG RW 0x13C Slave0 Tx Fifo Trigger level 0x0000
register 0008
S0_FIFO_CLR W 0x140 Slave0 FIFO Clear register -
S0_ADDRESSB RW 0x144 Slave0 Address B register 0x0000
0000
S0_ADDRESSMASKB RW 0x148 Slave0 Address B Mask 0x0000
register 0000
www.voragotech.com page 94
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
status registers can be monitored to determine completion, or interrupts can be used. Once
completed the status needs to be checked to see if the transaction completed as expected.
• Load the CLKSCALE register based on clock and I2C mode (STD/FAST).
• Load the CTRL register as desired
• Set the ENABLE bit in the CTRL register
www.voragotech.com page 95
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
• Load the CMD register with 0x03 (Start with Stop)
• If using interrupts:
o Disable the NVIC interrupt
o Clear RX FIFO
o Setup the IRQ_ENB register with only requested sources (Beware that some
interrupts may be pending prior to the FIFO being loaded)
o If using the Half Full interrupt, set the half full level in RXFIFOIRQTRG
o Configure the IRQ Selector Peripheral
o Set the NVIC priority of the interrupt
o Enable the NVIC interrupt
• If not using interrupts: Read/Poll the STATUS register until transaction is completed
• Verify transaction completed as desired, potential errors:
o Negative acknowledge of address
o Insufficient data received
o Arbitration lost
• If the transaction completed abnormally, clear the receive FIFO of unwanted data
• Load the WORDS register with the size of the write transaction
• Load the ADDRESS register with the destination address and Write active
• Load the required data into the DATA (FIFO) register
• Load the CMD register with 0x01 (Start without Stop)
• Read/Poll the STATUS register until transaction is completed
• Verify transaction completed as desired, potential errors:
o Negative acknowledge of address
o Negative acknowledge of data prior to completion
o Arbitration lost
• If the transaction completed abnormally:
o Clear the transmit FIFO of pending data
o Load the CMD register with 0x02 (to stop the bus if still the owner)
o Exit flow
• Load the WORDS register with the size of the read transaction
• Load the ADDRESS register with the destination address and Read active
• Load the CMD register with 0x03 (Start [this will be a ReStart] with Stop)
• Read/Poll the STATUS register until transaction is completed
www.voragotech.com page 96
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
• Verify transaction completed as desired, potential errors:
o Negative acknowledge of address
o Insufficient data received
• If the transaction completed abnormally, clear the receive FIFO of unwanted data
The peripheral must have its clock enabled and the master interface enabled to generate I2C
commands. The clock enable is controlled by the Clock Enable in the System Configuration
Peripheral. When the clock is enabled but the master interface is not enabled the I2C bus
status (BUSY/IDLE) is still maintained. This status is needed to know when it is valid to start
transactions.
When the ENABLE bit is changed to zero, the interface will be disabled (ENABLED going to
zero) when the master controller is idle (completes any pending transaction). Similarly, the
CLKENABLED bit will go to zero when the interface clock is disabled and both the master and
slave interfaces are idle. While the clock is disabled, all registers in the peripheral are
blocked from updates, and the I2C IO buffers are disabled.
www.voragotech.com page 97
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
0 – Stall - The I2C clock is stretched until data is
available.
1 – Negative Acknowledge
This bit determines what happens during a receive
operation when the receive FIFO is full. Either the
transaction is stalled or the transaction is ended
with a negative acknowledge.
Note that if the receive FIFO is full at the start of
the transaction (the first data byte) the transaction
is always stalled.
5 ALGFILTER Enable the analog delay glitch filter 0
6 DLGFILTER Enable the digital glitch filter 0
7 Reserved Reserved 0
8 LOOPBACK LoopBack Mode – Disconnect I2C interface from 0
any IO pins and directly connect the Master to the
Slave.
9 TMCONFIGENB Enable Timing Config register 0
31:10 - Reserved, Read as 0
The divide value needs to be configured to match the proper I2C bus rates. This divide value
must satisfy the follow formula:
www.voragotech.com page 98
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
Notes:
1. There is no recommended divide value, that will work for full speed 400kHz Fast
Mode.
For transmit operation, if the Word value is set to 0x7ff the transaction will not end until the
value is set to a value below the current TXCOUNT. For receive operation, the module never
enters into continuous operation if Word value is set to 0x7ff.
www.voragotech.com page 99
VA10800/VA10820 Programmers Guide V1.19
VA10800/VA10820
4.9.2.4 ADDRESS Register
The ADDRESS register controls the address used for the I2C transaction. This also includes the
direction bit as bit 0 of the register. The number of address bits used it determined by the
A10MODE setting.
Writes to this register are used to initiate I2C transactions by the controller. The START bit is
set to start a transaction, if the STOP is not also set, then a STOP will not be sent after the
transaction, allowing subsequent transaction to be started without releasing the bus. If the bus
is not released it can be released at the end of the next transaction, or by setting the STOP bit
alone.
The CANCEL bit is used to abort a transaction that has been started. Following a CANCEL
operation, the FIFOs should be reset by the software to clear out any remaining data.
Enabling interrupts allows the peripheral to generate interrupts. For the processor to see the
interrupt it must also be configured in the IRQ Selector Peripheral to one of the processor
interrupts, and enabled in the processors NVIC.
The slave uses data from the following Master side registers: CLKSCALE, CTRL bits 9-5 (Filter
controls, loopback, and timing), and TMCONFIG register if it is enabled.
The peripheral must have its clock enabled and the slave interface enabled to receive I2C
commands. The clock enable is controlled by the Clock Enable in the System Configuration
Peripheral. When the clock is enabled but the salve interface is not enabled the I2C bus status
(BUSY/IDLE) is still maintained. This status is needed to know when it is valid to start
transactions.
When the ENABLE bit is changed to zero, the interface will be disabled (ENABLED going to
zero) when the slave controller is idle (completes any pending transaction). Similarly, the
CLKENABLED bit will go to zero when the interface clock is disabled and both the master and
slave interfaces are idle. While the clock is disabled, all registers in the peripheral are
blocked from updates, and the I2C IO buffers are disabled.
Enabling interrupts allows the peripheral to generate interrupts. For the processor to see the
interrupt it must also be configured in the IRQ Selector Peripheral to one of the processor
interrupts, and enabled in the processors NVIC.
The second address is enabled with the ADDRESSBEN bit in the S0_ADDRESSB register. This
second address uses the A10MODE bit from the primary address register (so both addresses
are either in 7-bit or 10-bit mode at the same time).
The JTAG port is also used to read and program the on-chip eFuse block that controls the
power-up sequence of the part. The eFuse can be programmed up to 30 times. Each of these
30 programming cycles can change the 32-bit boot configuration or a 32-bit unique device ID
number. The unique device ID is loaded from the eFuse memory as the part boots and is
available in user space in the EF_ID register in the System Configuration peripheral.
The JTAG port can also be used to send encapsulated SPI commands to access an SPI ROM
attached to the devices SPI ROM Boot port. This can be used to do in-system programming of
the SPI ROM through the JTAG port without adding additional logic to the board to provide
access to the SPI ROM.
The JTAG port on the part consists of pins: TCK, TMS, TRSTn, TDI, and TDO.
Internal to the part there are 2 JTAG controllers. These 2 controllers are connected in series
such that the TDO of the first controller is connected to TDI of the second controller. The first
controller (connected to the TDI pin) is used to access the debug port of the ARM® Cortex®-
M0 processor. The second controller in the sequence is the controller used to access chip
level configuration and test.
One special note, when the chip level JTAG controller is used to enable SCAN mode, the
ARM® controller is removed from the TDI/TDO path. The part acts as if only one JTAG
controller exists at that point. This is done so that the ARM® controller can be switched to run
off the system clock and be included in scan testing. There is 1-bit flip-flop added in the
TDI/TDO path when in this mode; so that it acts like a normal BYPASS register still exists for
the missing controller. After exiting SCAN mode, the TRSTn should be asserted to reset the
JTAG controllers; as the ARM® controller will most likely be in an unknown state.
This data is also used as the read-test-data during a read operation. For normal reads, the
ER_WDATA registers should be set to 0. When bits in this registers are set to non-zero, the
eFuse controller will read the matching bit as if it is programmed.
See section 5.3 for details on the proper operation sequences for accessing the eFuse.
The SPI_ENCAP instruction does not have a standard JTAG register, but it is used to generate
an SPI packet on the ROM SPI Boot interface (with the ROM interface acting as the Master).
This allows interaction with the external SPI ROM via the JTAG port.
The external ChipSelect (ROM_CSn) is set active (low) while this instruction is active and the
JTAG controller is in the SHIFT_DR state. There is a one-bit register, similar to a by-pass
register that is inserted on the TDI data before it goes out the ROM_SO pin. Similarly, there is
a one-bit register on the ROM_SI pin data before it goes out TDO. These two registers stage
the data to reduce the long timing paths directly through the chip.
The SPI_CONFIG register is used to determine when during the SHIFT_DR state, the TCK is
passed through to the ROM_SCK (SPI Clock) pin. Since other JTAG devices (in bypass mode)
could be in the TDI/TDO chain, the SPI Leading bit count specifies the number of bypass bits
in the chain before this controller. Note that the ARM® Cortex®-M0 debug port is in the chain
before this controller; so the SPI Leading bit count would usually be set to one (if no other
devices are in the chain before it). The SPI Leading bit count should not include the built-in bit
(between TDI and ROM_SO), it is accounted for by the hardware. Application software
needs to account for these extra bits when sending JTAG data. The SPI Packet count is used
to specify the total number of clocks generated on the ROM_SCK pin (from the TCK pin) after
the leading bit count has been satisfied. Any additional clocks after the SPI Packet count
would be used to keep shifting data out the TDI/TDO JTAG chain, but won’t generate
ROM_SCK clocks.
Shown below is a sample JTAG transaction and the related SPI transaction. The assumed
starting state of the JTAG controller is as follows:
• 16 bit long
• Master transmit value: 0x8302 (SPI bit order, MSB first)
• Slave transmit value: 0x80c1 (SPI bit order, MSB first)
To measure the internal nominal 1MHz oscillator clock frequency release the Counter reset
(setting bit 0 to 1). Then start the counters by setting bit 1 to 1. Then release the start bit
(setting bit 1 to 0). Once started, the TCK clock is counted (in a 20 bit counter) until it reaches
the limit value (taken from EF_TIMING[19:0]). The internal nominal 1MHz oscillator clock is
5.3 eFuse
The internal eFuse is used to store default configuration data and part ID data. This data is
read from the eFuse following a reset event before the SPI ROM data is loaded.
The eFuse data is organized as 32 words of 32-bits of data. All bits in the eFuse are initially
zero before programming. Programming can be used to change individual bits to one (but
never back to zero). The 32 words provide 32 addressable locations in the eFuse memory.
Data is read from the eFuse after a reset. Address locations 0 and 1 contain an index of
where to find the configuration data and ID data in the rest of the address space (addresses
2 to 31).
Address Description
0 ID Index. This encodes the address of where the ID data is stored.
1 Configuration index. This encodes the address of where the Configuration
data is stored.
As the addresses index uses a priority encoding, the lowest addresses should always be used
first in programming the eFuse. When it is desired to replace the current configuration data,
the next available address location should be used, and the index updated accordingly.
Note that updating the eFuse requires that the index values be read to find the next available
address. Then the data needs to be written, and the index needs to be updated. Data should
always be read after it was written to insure that it was written correctly.
Before programming configuration settings, these settings should be verified by loading the
equivalent values into the proper JTAG registers and resetting the part with JTAG commands.
This can validate that the chosen values will work correctly in the system.
Email: [email protected]
Phone: (512) 347-1800
The JTAG port is also used to read and program the on-chip eFuse block that controls the
power-up sequence of the part. The eFuse can be programmed up to 30 times. Each of these
30 programming cycles can change the boot configuration or a unique device ID number.
The JTAG port can also be used to send encapsulated SPI commands to access an SPI ROM
attached to the devices SPI ROM Boot port. This can be used to do in-system programming of
the SPI ROM through the JTAG port without adding additional logic to the board to provide
access to the SPI ROM.
The JTAG port on the part consists of pins: TCK, TMS, TRSTn, TDI, and TDO.
Internal to the part there are 2 JTAG controllers. These 2 controllers are connected in series
such that the TDO of the first controller is connected to TDI of the second controller. The first
controller (connected to the TDI pin) is used to access the debug port of the ARM® Cortex®-
M0 processor. The second controller in the sequence is the controller used to access chip
level configuration and test.
One special note, when the chip level JTAG controller is used to enable SCAN mode, the
ARM® controller is removed from the TDI/TDO path. The part acts as if only one JTAG
controller exists at that point. This is done so that the ARM® controller can be switched to run
off the system clock and be included in scan testing. There is 1-bit flip-flop added in the
TDI/TDO path when in this mode; so that it acts like a normal BYPASS register still exists for
the missing controller. After exiting SCAN mode, the TRSTn should be asserted to reset the
JTAG controllers; as the ARM® controller will most likely be in an unknown state.
The order of pins in the boundary scan register is given below from TDI to TDO order:
When SCAN_EN is active, the chip will be in scan shift mode. Pins PORTA[15:0] will be in
input mode and will be used as inputs to the 16 scan chains. Pins PORTA[31:16] will be in
output mode and will be used as outputs from the 16 scan chains.
When SCAN_EN is inactive, (but SCAN mode is active), the part will clock logic as in normal
functional mode, but with the following exceptions:
• The internal memories will be in Test Data Bypass mode, which by-passes normal
operation.
• Special scan observation and control flops are enabled.
• Software configurable pull-downs on GPIO pins are all disabled.
• Software configurable pull-ups on GPIO pins are all enabled.
• I2C input/outputs are disabled.
• The eFuse block is in by-pass mode.
The order of the Parametric nand tree is given in the following table. The order is from the pin
farthest from the ROM_SO pin, to the pin closest to the ROM_SO pin.
Pins Bits
• DSTPOR
• TCK
• TRSTn
• TMS
• TDI
8.2.12 BIST_RST
The BIST_RST instruction does not access a register. While this instruction is active (loaded
into the JTAG controller instruction register), a reset signal is issued to the BIST logic; which
does the following:
8.2.15 BIST_RUN
The BIST_RUN instruction does not access a register. While this instruction is active (loaded
into the JTAG controller instruction register), the BIST start operation is enabled; this starts the
configured BIST test. Once the BIST_RUN has been started, the normal practice is to load the
BIST_STAT instruction and monitor the status until BIST_READY indicates that the run is
completed.
See section 8.3 for details on the proper operation sequences for accessing the eFuse.
The SPI_ENCAP instruction does not have a standard JTAG register, but it is used to generate
an SPI packet on the ROM SPI Boot interface (with the ROM interface acting as the Master).
This allows interaction with the external SPI ROM via the JTAG port.
The external ChipSelect (ROM_CSn) is set active (low) while this instruction is active and the
JTAG controller is in the SHIFT_DR state. There is a one-bit register, similar to a by-pass
register that is inserted on the TDI data before it goes out the ROM_SO pin. Similarly, there is
a one-bit register on the ROM_SI pin data before it goes out TDO. These two registers stage
the data to reduce the long timing paths directly through the chip.
The SPI_CONFIG register is used to determine when during the SHIFT_DR state, the TCK is
passed through to the ROM_SCK (SPI Clock) pin. Since other JTAG devices (in bypass mode)
could be in the TDI/TDO chain, the SPI Leading bit count specifies the number of bypass bits
in the chain before this controller. Note that the ARM® Cortex®-M0 debug port is in the chain
before this controller; so the SPI Leading bit count would usually be set to one (if no other
devices are in the chain before it). The SPI Leading bit count should not include the built-in bit
(between TDI and ROM_SO), it is accounted for by the hardware. Application software
needs to account for these extra bits when sending JTAG data. The SPI Packet count is used
to specify the total number of clocks generated on the ROM_SCK pin (from the TCK pin) after
Note that JTAG data is considered to be sent Least-Significant-Bit first and the SPI data is
considered to be sent Most-Significant-Bit first. The encapsulation hardware does not change
the bit order. The SPI bit order needs to be accounted for when generating the JTAG data
stream.
Shown below is a sample JTAG transaction and the related SPI transaction. The assumed
starting state of the JTAG controller is as follows:
• 16 bit long
• Master transmit value: 0x8302 (SPI bit order, MSB first)
• Slave transmit value: 0x80c1 (SPI bit order, MSB first)
8.3 eFuse
The internal eFuse is used to store default configuration data and part ID data. This data is
read from the eFuse following a reset event before the SPI ROM data is loaded.
The eFuse data is organized as 32 words of 32 bits of data. All bits in the eFuse are initially
zero before programming. Programming can be used to change individual bits to one (but
never back to zero). The 32 words provide 32 addressable locations in the eFuse memory.
Data is read from the eFuse after a power-on-reset. Address locations 0 and 1 contain an
index of where to find the configuration data and ID data in the rest of the address space
(addresses 2 to 31).
As the addresses index uses a priority encoding, the lowest addresses should always be used
first in programming the eFuse. When it is desired to replace the current configuration data,
the next available address location should be used, and the index updated accordingly.
Note that updating the eFuse requires that the index values be read to find the next available
address. Then the data needs to be written, and the index needs to be updated. Data should
always be read after it was written to insure that it was written correctly.