The ST7260xx devices are members of the ST7 microcontroller family designed for USB
applications running from 4.0 to 5.5 V. Different package options offer up to 19 I/O pins.
All devices are based on a common industry-standard 8-bit core, featuring an enhanced
instruction set and are available with Flash program memory. The ST7 family architecture
offers both power and flexibility to software developers, enabling the design of highly
efficient and compact application code.
The on-chip peripherals include a low speed USB interface and an asynchronous SCI
interface. For power economy, the microcontroller can switch dynamically into, Slow, Wait,
Active Halt or Halt mode when the application is in idle or stand-by state.
Typical applications include consumer, home, office and industrial products.
7/139
Block diagramST7260xx
8-BIT CORE
ALU
ADDRESS AND DATA BUS
OSCIN
OSCOUT
RESET
PORT B
16-bit TIMER
PORT A
PORT C
PB[7:0]
(8 bits)
PC[2:0]
(3 bits)
OSCILLATOR
INTERNAL
CLOCK
CONTROL
RAM
(384 bytes)
PA[7:0]
(8 bits)
V
SS
V
DD
POWER
SUPPLY
SCI
PROGRAM
(8 Kbytes)
MEMORY
(UART)
USB SIE
OSC/3
LVD
WATCHDOG
V
SSA
V
DDA
VPP/TEST
USB DMA
USBDP
USBDM
USBVCC
OSC/4 or OSC/2
for USB
1)
1)
12 or 24 MHz OSCIN frequency required to generate 6 MHz USB clock.
2 Block diagram
Figure 1.General block diagram
8/139
ST7260xxPin description
4
3
5
6
7
8
9
10
11 1215 16 17 18 19 20
21
22
23
24
25
26
27
28
29
30
3132333437383940
2
1
3536
13 14
V
DDA
V
DD
OSCOUT
OSCIN
VSS
USBOE/PC2
V
SSA
USBDP
USBDM
USBV
CC
NC
IT8/PB7
(10 mA)
IT7/PB6(10 mA)
TDO/PC1
RDI/PC0
RESET
NC
IT6/PB5
(10 mA)
V
PP
/TEST
PA7/OCMP2/IT4
PB0
(10 mA)
PB1(10 mA)
PB2(10 mA)
PB3(10 mA)
PB4(10 mA)/IT5
PA3/EXTCLK
PA4/ICAP1/IT1
PA5/ICAP2/IT2
PA6/OCMP1/IT3
NCNCNCNCNCNCPA2
(25 mA)/ICCCLK
PA1
(25 mA)/ICCDATA
NC
NC
PA0/MCO
Note: NC=Do not connect
14
13
11
12
15
16
17
18
PA2(25 mA)/ICCCLK
PA1
(25 mA)/ICCDATA
PA0/MCO
V
SSA
PA7/OCMP2/IT4
PA5/ICAP2/IT2
PA4/ICAP1/IT1
1
2
3
4
5
6
7
8
9
10
V
DD
RDI/PC0
TDO/PC1
V
SS
PA3/EXTCLK
IT7/PB6
(10mA)
19
20
VPP/TEST
PB3
(10 mA)
PB2(10 mA)
USBDP
RESET
/
OSCOUT
USBOE/PB1
(10 mA)
PB0(10 mA)
OSCIN
21
22
23
24
USBDM
USBVcc
3 Pin description
Figure 2.40-lead QFN package pinout
Figure 3.24-pin SO package pinout
9/139
Pin descriptionST7260xx
RESET (see Note 1): Bidirectional. This active low signal forces the initialization of the MCU.
This event is the top priority non maskable interrupt. This pin is switched low when the
Watchdog is triggered or the V
is low. It can be used to reset external peripherals.
DD
OSCIN/OSCOUT: Input/Output Oscillator pin. These pins connect a parallel-resonant
crystal, or an external source, to the on-chip oscillator.
V
DD/VSS
V
DDA/VSSA
(see Note 2): Main power supply and ground voltages.
(see Note 2): Power supply and ground voltages for analog peripherals.
Alternate functions: Several pins of the I/O ports assume software programmable
alternate functions as shown in the pin description.
Note:1Note 1: Adding two 100 nF decoupling capacitors on the Reset pin (respectively connected
to VDD and VSS) will significantly improve product electromagnetic susceptibility
performance.
2To enhance the reliability of operation, it is recommended that V
together on the application board. This also applies to V
and VSS.
SSA
and VDD be connected
DDA
3The USBOE alternate function is mapped on Port C2 in QFN40 devices. In SO24 devices it
is mapped on Port B1.
4The timer OCMP1 alternate function is mapped on Port A6 in QFN40 pin devices. In SO24
devices it is not available.
Legend / abbreviations for Figure 2, Figure 3 and Ta bl e 2 , Tab l e 3 :
Type: I = input, O = output, S = supply
In/Output level: CT = CMOS 0.3 V
/ 0.7 VDD with input trigger
DD
Output level: 10 mA = 10 mA high sink (Fn N-buffer only)
25 mA = 25 mA very high sink (on N-buffer only)
Port and control configuration:
●Input:float = floating, wpu = weak pull-up, int = interrupt
●Output: OD = open drain, PP = push-pull, T = True open drain
The RESET configuration of each pin is shown in bold. This configuration is kept as long as
the device is under reset state.
As shown in Figure 4, the MCU is capable of addressing 8 Kbytes of memories and I/O
registers.
The available memory locations consist of up to 384 bytes of RAM including 64 bytes of
register locations, and up to 8 Kbytes of user program memory in which the upper 32 bytes
are reserved for interrupt vectors. The RAM space includes up to 128 bytes for the stack
from 0100h to 017Fh.
The highest address bytes contain the user reset and interrupt vectors.
Note:Important: memory locations noted “Reserved” must never be accessed. Accessing a
reserved area can have unpredictable effects on the device.
Figure 4.Memory map
14/139
ST7260xxRegister & memory map
Table 4.Interrupt vector map
Vector addressDescriptionMasked byRemarks
FFE0h-FFEDh
FFEEh-FFEFh
FFF0h-FFF1h
FFF2h-FFF3h
FFF4h-FFF5h
FFF6h-FFF7h
FFF8h-FFF9h
FFFAh-FFFBh
FFFCh-FFFDh
FFFEh-FFFFh
Table 5.Hardware register memory map
AddressBlock Register labelRegister name
0000h
0001h
0002h
0003h
0004h
0005h
.
Reserved area
USB interrupt vector
SCI interrupt vector
Reserved area
TIMER interrupt vector
IT1 to IT8 interrupt vector
USB end suspend mode interrupt vector
Flash start programming interrupt vector
TRAP (software) interrupt vector
RESET vector
Por t A
Por t B
Por t C
PA DR
PA DD R
PBDR
PBDDR
PCDR
PCDDR
I- bit
I- bit
I- bit
I- bit
I- bit
I- bit
None
None
Port A Data Register
Port A Data Direction Register
Port B Data Register
Port B Data Direction Register
Port C Data Register
Port C Data Direction Register
Exit from Halt
Internal interrupt
Internal interrupt
Internal interrupt
External interrupt
External interrupts
Internal interrupt
CPU interrupt
Reset
status
00h
00h
00h
00h
1111 x000b
1111 x000b
0006h
to
Reserved (2 bytes)
0007h
0008hITCITIFREInterrupt Register 00hR/W
mode
No
No
No
Ye s
Ye s
Ye s
No
Ye s
Remarks
R/W
R/W
R/W
R/W
R/W
R/W
0009hMISCMISCRMiscellaneous Register00hR/W
000Ah
to
Reserved (2 bytes)
000Bh
000ChWDGWDGCRWatchdog Control Register7FhR/W
000Dh to
0010h
Reserved (4 bytes)
15/139
Register & memory mapST7260xx
Table 5.Hardware register memory map (continued)
AddressBlock Register labelRegister name
0011h
0012h
0013h
0014h
0015h
0016h
0017h
0018h
0019h
001Ah
001Bh
001Ch
001Dh
001Eh
001Fh
0020h
0021h
0022h
0023h
0024h
TIM
SCI
TCR2
TCR1
TCSR
TIC1HR
TIC1LR
TOC1HR
TOC1LR
TCHR
TCLR
TACHR
TAC LR
TIC2HR
TIC2LR
TOC2HR
TOC2LR
SCISR
SCIDR
SCIBRR
SCICR1
SCICR2
Timer Control Register 2
Timer Control Register 1
Timer Control/Status Register
Timer Input Capture High Register 1
Timer Input Capture Low Register 1
Timer Output Compare High Register 1
Timer Output Compare Low Register 1
Timer Counter High Register
Timer Counter Low Register
Timer Alternate Counter High Register
Timer Alternate Counter Low Register
Timer Input Capture High Register 2
Timer Input Capture Low Register 2
Timer Output Compare High Register 2
Timer Output Compare Low Register 2
SCI Status Register
SCI Data Register
SCI Baud Rate Register
SCI Control Register 1
SCI Control Register 2
Reset
status
00h
00h
00h
xxh
xxh
80h
00h
FFh
FCh
FFh
FCh
xxh
xxh
80h
00h
C0h
xxh
00h
x000 0000b
00h
Remarks
R/W
R/W
R/W
Read only
Read only
R/W
R/W
Read only
R/W
Read only
R/W
Read only
Read only
R/W
R/W
Read only
R/W
R/W
R/W
R/W
0025h
0026h
0027h
0028h
0029h
002Ah
002Bh
002Ch
002Dh
002Eh
002Fh
0030h
0031h
0032h
0036h
0037hFlashFCSRFlash Control /Status Register00hR/W
USB Endpoint 0 Register A
USB Endpoint 0 Register B
USB Endpoint 1 Register A
USB Endpoint 1 Register B
USB Endpoint 2 Register A
USB Endpoint 2 Register B
Reserved (5 Bytes)
Reserved (8 bytes)
x0h
xxh
x0h
00h
00h
06h
00h
0000 xxxxb
80h
0000 xxxxb
0000 xxxxb
0000 xxxxb
0000 xxxxb
Read only
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
16/139
ST7260xxFlash program memory
5 Flash program memory
5.1 Introduction
The ST7 dual voltage High Density Flash (HDFlash) is a non-volatile memory that can be
electrically erased as a single block or by individual sectors and programmed on a byte-bybyte basis using an external V
The HDFlash devices can be programmed and erased off-board (plugged in a programming
tool) or on-board using ICP (in-circuit programming) or IAP (in-application programming).
The array matrix organization allows each sector to be erased and reprogrammed without
affecting other sectors.
5.2 Main features
●3 Flash programming modes:
–Insertion in a programming tool. In this mode, all sectors including option bytes
can be programmed or erased.
–ICP (in-circuit programming). In this mode, all sectors including option bytes can
be programmed or erased without removing the device from the application board.
–IAP (in-application programming). In this mode, all sectors, except Sector 0, can
be programmed or erased without removing the device from the application board
and while the application is running.
●ICT (in-circuit testing) for downloading and executing user application test patterns in
RAM
●Readout protection
●Register Access Security System (RASS) to prevent accidental programming or
erasing
supply.
PP
5.3 Structure
The Flash memory is organized in sectors and can be used for both code and data storage.
Depending on the overall Flash memory size in the microcontroller device, there are up to
three user sectors (seeTa bl e 6 ). Each of these sectors can be erased independently to avoid
unnecessary erasing of the whole Flash memory when only a partial erasing is required.
The first two sectors have a fixed size of 4 Kbytes (see Figure 5). They are mapped in the
upper part of the ST7 addressing space so the reset and interrupt vectors are located in
Sector 0 (F000h-FFFFh).
Table 6.Sectors available in Flash devices
Flash size (bytes)Available sectors
4KSector 0
8KSectors 0, 1
>8KSectors 0, 1, 2
17/139
Flash program memoryST7260xx
4Kbytes
4Kbytes
Sector 1
Sector 0
Sector 2
8K16K
32K
Flash
FFFFh
EFFFh
DFFFh
7FFFh
24 Kbytes
memory size
8Kbytes
BFFFh
5.3.1 Readout protection
Readout protection, when selected, provides a protection against program memory content
extraction and against write access to Flash memory. Even if no protection can be
considered as totally unbreakable, the feature provides a very high level of protection for a
general purpose microcontroller.
In Flash devices, this protection is removed by reprogramming the option. In this case, the
entire program memory is first automatically erased.
Readout protection is enabled and removed through the FMP_R bit in the option byte.
Figure 5.Memory map and sector address
18/139
ST7260xxFlash program memory
ICC connector
ICCDATA
ICCCLK
RESET
V
DD
HE10 connector type
Application
power supply
1
246810
975 3
Programming tool
ICC connector
Application board
ICC cable
(See note 3)
10kΩ
V
SS
ICCSEL/VPP
ST7
OSC1
OSC2
See note 1
See note 2
Application
reset source
Application
I/O
(see note 4)
Optional
5.4 ICC interface
ICC needs a minimum of 4 and up to 6 pins to be connected to the programming tool (see
Figure 6). These pins are:
–RESET
–V
–ICCCLK: ICC output serial clock pin
–ICCDATA: ICC input/output serial data pin
–ICCSEL/V
–OSC1 (or OSCIN): main clock input for external source (optional)
–V
Figure 6.Typical ICC interface
: device reset
: device power supply ground
SS
: programming voltage
PP
: application board power supply (seeFigure 6, Note 3).
DD
1. If the ICCCLK or ICCDATA pins are only used as outputs in the application, no signal isolation is
necessary. As soon as the programming tool is plugged to the board, even if an ICC session is not in
progress, the ICCCLK and ICCDATA pins are not available for the application. If they are used as inputs by
the application, isolation such as a serial resistor has to be implemented in case another device forces the
signal. Refer to the Programming Tool documentation for recommended resistor values.
2. During the ICC session, the programming tool must control the RESET
between the programming tool and the application reset circuit if it drives more than 5mA at high level
(PUSH-pull output or pull-up resistor <1K). A schottky diode can be used to isolate the application reset
circuit in this case. When using a classical RC network with R>1K or a reset management IC with open
drain output and pull-up resistor >1K, no additional components are needed. In all cases the user must
ensure that no external reset is generated by the application during the ICC session.
3. The use of Pin 7 of the ICC connector depends on the programming tool architecture. This pin must be
connected when using most ST programming tools (it is used to monitor the application power supply).
Please refer to the programming tool manual.
4. Pin 9 has to be connected to the OSC1 (OSCIN) pin of the ST7 when the clock is not available in the
application or if the selected clock option is not programmed in the option byte. ST7 devices with multioscillator capability need to have OSC2 grounded in this case.
19/139
pin. This can lead to conflicts
Flash program memoryST7260xx
5.5 ICP (in-circuit programming)
To perform ICP the microcontroller must be switched to ICC (in-circuit communication) mode
by an external controller or programming tool.
Depending on the ICP code downloaded in RAM, Flash memory programming can be fully
customized (number of bytes to program, program locations, or selection serial
communication interface for downloading).
When using an STMicroelectronics or third-party programming tool that supports ICP and
the specific microcontroller device, the user needs only to implement the ICP hardware
interface on the application board (see Figure 6). For more details on the pin locations, refer
to the device pinout description.
5.6 IAP (in-application programming)
This mode uses a BootLoader program previously stored in Sector 0 by the user (in ICP
mode or by plugging the device in a programming tool).
This mode is fully controlled by user software. This allows it to be adapted to the user
application, (such as user-defined strategy for entering programming mode, choice of
communications protocol used to fetch the data to be stored). For example, it is possible to
download code from the SCI, or USB interface and program it in the Flash. IAP mode can be
used to program any of the Flash sectors except Sector 0, which is write/erase protected to
allow recovery in case errors occur during the programming operation.
5.7 Related documentation
For details on Flash programming and ICC protocol, refer to the ST7 Flash Programming
Reference Manual and to the ST7 ICC Protocol Reference Manual
5.7.1 Flash control/status register (FCSR)
This register is reserved for use by programming tool software. It controls the Flash
programming and erasing operations.
FCSRReset value:0000 0000 (00h)
76543210
00000000
R/WR/WR/WR/WR/WR/WR/WR/W
Table 7.Flash control/status register address and reset value
Address (Hex)Register label76543210
0037hFCSR reset value00000000
.
20/139
ST7260xxCentral processing unit (CPU)
Accumulator
X index register
Y index register
Stack pointer
Condition code register
Program counter
70
1C11HI NZ
Reset value = reset vector @ FFFEh-FFFFh
70
70
70
0
7
158
PCH
PCL
15
870
Reset value = stack higher address
Reset value = 1X11X1XX
Reset value = XXh
Reset value = XXh
Reset value = XXh
X = undefined value
6 Central processing unit (CPU)
6.1 Introduction
This CPU has a full 8-bit architecture and contains six internal registers allowing efficient 8bit data manipulation.
6.2 Main features
●63 basic instructions
●Fast 8-bit by 8-bit multiply
●17 main addressing modes
●Two 8-bit index registers
●16-bit stack pointer
●Low power modes
●Maskable hardware interrupts
●Non-maskable software interrupt
6.3 CPU registers
The six CPU registers shown in Figure 7 are not present in the memory mapping and are
accessed by specific instructions.
Figure 7.CPU registers
21/139
Central processing unit (CPU)ST7260xx
6.3.1 Accumulator (A)
The Accumulator is an 8-bit general purpose register used to hold operands and the results
of the arithmetic and logic calculations and to manipulate data.
6.3.2 Index registers (X and Y)
In indexed addressing modes, these 8-bit registers are used to create effective addresses or
as temporary storage areas for data manipulation. (The Cross-Assembler generates a
precede instruction (PRE) to indicate that the following instruction refers to the Y register.)
The Y register is not affected by the interrupt automatic procedures (not pushed to and
popped from the stack).
6.3.3 Program counter (PC)
The program counter is a 16-bit register containing the address of the next instruction to be
executed by the CPU. It is made of two 8-bit registers PCL (Program Counter Low which is
the LSB) and PCH (Program Counter High which is the MSB).
6.3.4 Condition code register (CC)
The 8-bit Condition Code register contains the interrupt mask and four flags representative
of the result of the instruction just executed. This register can also be handled by the PUSH
and POP instructions. These bits can be individually tested and/or controlled by specific
instructions.
CCReset value: 111x1xxx
76543210
111HINZC
R/WR/WR/WR/WR/W
Table 8.CC register description
BIt NameFunction
Half carry
This bit is set by hardware when a carry occurs between bits 3 and 4 of the ALU
during an ADD or ADC instructions. It is reset by hardware during the same
4H
instructions.
0: No half carry has occurred.
1: A half carry has occurred.
This bit is tested using the JRH or JRNH instruction. The H bit is useful in BCD
arithmetic subroutines.
22/139
ST7260xxCentral processing unit (CPU)
Table 8.CC register description
BIt NameFunction
Interrupt mask
This bit is set by hardware when entering in interrupt or by software to disable all
interrupts except the TRAP software interrupt. This bit is cleared by software.
0: Interrupts are enabled.
1: Interrupts are disabled.
3I
2N
1Z
This bit is controlled by the RIM, SIM and IRET instructions and is tested by the JRM
and JRNM instructions.
Note: Interrupts requested while I is set are latched and can be processed when I is
cleared. By default an interrupt routine is not interruptible because the I bit is set by
hardware at the start of the routine and reset by the IRET instruction at the end of the
routine. If the I bit is cleared by software in the interrupt routine, pending interrupts are
serviced regardless of the priority level of the current interrupt routine
Negative
This bit is set and cleared by hardware. It is representative of the result sign of the last
arithmetic, logical or data manipulation. It is a copy of the result 7th bit.
0: The result of the last operation is positive or null.
1: The result of the last operation is negative (that is, the most significant bit is a logic
1.
This bit is accessed by the JRMI and JRPL instructions.
Zero (Arithmetic Management bit)
This bit is set and cleared by hardware. This bit indicates that the result of the last
arithmetic, logical or data manipulation is zero.
0: The result of the last operation is different from zero.
1: The result of the last operation is zero.
This bit is accessed by the JREQ and JRNE test instructions.
0C
Carry/borrow
This bit is set and cleared by hardware and software. It indicates an overflow or an
underflow has occurred during the last arithmetic operation.
0: No overflow or underflow has occurred.
1: An overflow or underflow has occurred.
This bit is driven by the SCF and RCF instructions and tested by the JRC and JRNC
instructions. It is also affected by the ‘bit test and branch’, shift and rotate instructions.
The Stack Pointer is a 16-bit register which is always pointing to the next free location in the
stack. It is then decremented after data has been pushed onto the stack and incremented
before data is popped from the stack (see Figure 8).
Since the stack is 128 bytes deep, the 9 most significant bits are forced by hardware.
Following an MCU reset, or after a Reset Stack Pointer instruction (RSP), the Stack Pointer
contains its reset value (the SP7 to SP0 bits are set) which is the stack higher address.
The least significant byte of the Stack Pointer (called S) can be directly accessed by an LD
instruction.
Note:When the lower limit is exceeded, the Stack Pointer wraps around to the stack upper limit,
without indicating the stack overflow. The previously stored information is then overwritten
and therefore lost. The stack also wraps in case of an underflow.
The stack is used to save the return address during a subroutine call and the CPU context
during an interrupt. The user may also directly manipulate the stack by means of the PUSH
and POP instructions. In the case of an interrupt, the PCL is stored at the first location
pointed to by the SP. Then the other registers are stored in the next locations as shown in
Figure 8.
●When an interrupt is received, the SP is decremented and the context is pushed on the
stack.
●On return from interrupt, the SP is incremented and the context is popped from the
stack.
A subroutine call occupies two locations and an interrupt five locations in the stack area.
Figure 8.Stack manipulation example
24/139
ST7260xxReset and clock management
7 Reset and clock management
7.1 Reset
The Reset procedure is used to provide an orderly software start-up or to exit low power
modes.
Three reset modes are provided: a low voltage (LVD) reset, a watchdog reset and an
external reset at the RESET
A reset causes the reset vector to be fetched from addresses FFFEh and FFFFh in order to
be loaded into the PC and with program execution starting from this point.
An internal circuitry provides a 4096 CPU clock cycle delay from the time that the oscillator
becomes active.
Caution:When the ST7 is unprogrammed or fully erased, the Flash is blank and the RESET vector is
not programmed. For this reason, it is recommended to keep the RESET
until programming mode is entered, in order to avoid unwanted behavior
7.2 Low voltage detector (LVD)
pin.
pin in low state
Low voltage reset circuitry generates a reset when VDD is:
●below V
●below V
During low voltage reset, the RESET
devices.
It is recommended to make sure that the V
device is exiting from Reset, to ensure the application functions properly.
when VDD is rising,
IT+
when VDD is falling.
IT-
7.2.1 Watchdog reset
When a watchdog reset occurs, the RESET pin is pulled low permitting the MCU to reset
other devices in the same way as the low voltage reset (Figure 9).
7.2.2 External reset
The external reset is an active low input signal applied to the RESET pin of the MCU.
As shown in Figure 12, the RESET
CPU clock cycles.
An internal Schmitt trigger at the RESET
pin is held low, thus permitting the MCU to reset other
supply voltage rises monotonously when the
DD
signal must stay low for a minimum of one and a half
pin is provided to improve noise immunity.
25/139
Reset and clock managementST7260xx
LOW VOLTAGE
V
DD
FROM
WATCHDOG
RESET
RESET
INTERNAL
DETECTOR
RESET
RESET
V
DD
V
IT+
V
IT-
V
DD
Addresses
$FFFE
Temporization (4096 CPU clock cycles)
V
IT+
Figure 9.Low voltage detector functional diagram
Figure 10. Low voltage reset signal output
Note:Hysteresis (V
IT+-VIT-
) = V
hys
Figure 11. Temporization timing diagram after an internal reset
26/139
ST7260xxReset and clock management
V
DD
OSCIN
f
CPU
FFFF
FFFE
PC
RESET
WATCHDOG RESET
t
DDR
t
OXOV
4096 CPU
CLOCK
CYCLES
DELAY
Figure 12. Reset timing diagram
Note:Refer to Electrical Characteristics for values of t
DDR
, t
OXOV
, V
IT+
, V
IT-
and V
hys
7.3 Clock system
7.3.1 General description
The MCU accepts either a crystal or ceramic resonator, or an external clock signal to drive
the internal oscillator. The internal clock (f
frequency (f
), which is divided by 3 (and by 2 or 4 for USB, depending on the external
OSC
clock used). The internal clock is further divided by 2 by setting the SMS bit in the
Miscellaneous Register.
Using the OSC24/12 bit in the option byte, a 12 MHz or a 24 MHz external clock can be
used to provide an internal frequency of either 2, 4 or 8 MHz while maintaining a 6 MHz for
the USB (refer to Figure 15).
The internal clock signal (f
) is also routed to the on-chip peripherals. The CPU clock
CPU
signal consists of a square wave with a duty cycle of 50%.
The internal oscillator is designed to operate with an AT-cut parallel resonant quartz or
ceramic resonator in the frequency range specified for f
recommended when using a crystal, and Ta bl e 9 lists the recommended capacitance. The
crystal and associated components should be mounted as close as possible to the input
pins in order to minimize output distortion and start-up stabilisation time.
) is derived from the external oscillator
CPU
. The circuit shown in Figure 14 is
osc
27/139
Reset and clock managementST7260xx
OSCIN
OSCOUT
EXTERNAL
CLOCK
NC
OSCIN
OSCOUT
C
OSCIN
C
OSCOUT
R
P
Table 9.Recommended values for 24 MHz crystal resonator
SymbolValues
(1)
1. R
R
SMAX
C
OSCIN
C
OSCOUT
R
P
is the equivalent serial resistor of the crystal (see crystal specification).
SMAX
20 Ω25 Ω70 Ω
56pF47pF22pF
56pF47pF22pF
1-10 MΩ1-10 MΩ1-10 MΩ
7.3.2 External clock
An external clock may be applied to the OSCIN input with the OSCOUT pin not connected,
as shown on Figure 13. The t
input. The equivalent specification of the external clock source should be used instead of
t
(see Section 16.5: Clock and timing characteristics).
OXOV
Figure 13. External clock source connections
specifications do not apply when using an external clock
OXOV
Figure 14. Crystal/ceramic resonator
28/139
ST7260xxReset and clock management
%3
CPU and
8, 4 or 2 MHz
6 MHz (USB)
24 or
peripherals)
%2
1
0
%2
12 MHz
Crystal
%2
0
1
OSC24/12
SMS
%2
Figure 15. Clock block diagram
29/139
InterruptsST7260xx
8 Interrupts
The ST7 core may be interrupted by one of two different methods: maskable hardware
interrupts as listed in Table 10: Interrupt mapping and a non-maskable software interrupt
(TRAP). The Interrupt processing flowchart is shown in Figure 16.
The maskable interrupts must be enabled clearing the I bit in order to be serviced. However,
disabled interrupts may be latched and processed when they are enabled (see external
interrupts subsection).
When an interrupt has to be serviced:
●Normal processing is suspended at the end of the current instruction execution.
●The PC, X, A and CC registers are saved onto the stack.
●The I bit of the CC register is set to prevent additional interrupts.
The PC is then loaded with the interrupt vector of the interrupt to service and the first
instruction of the interrupt service routine is fetched (refer to Table 10: Interrupt mapping for
vector addresses).
The interrupt service routine should finish with the IRET instruction which causes the
contents of the saved registers to be recovered from the stack.
Note:As a consequence of the IRET instruction, the I bit will be cleared and the main program will
resume.
Priority management
By default, a servicing interrupt cannot be interrupted because the I bit is set by hardware
entering in interrupt routine.
In the case several interrupts are simultaneously pending, a hardware priority defines which
one will be serviced first (see Table 10: Interrupt mapping).
Non-maskable software interrupts
This interrupt is entered when the TRAP instruction is executed regardless of the state of
the I bit. It will be serviced according to the flowchart on Figure 16.
Interrupts and low power mode
All interrupts allow the processor to leave the Wait low power mode. Only external and
specific mentioned interrupts allow the processor to leave the Halt low power mode (refer to
the “Exit from HALT“ column in Table 10: Interrupt mapping).
External interrupts
The pins ITi/PAk and ITj/PBk (i=1,2; j= 5,6; k=4,5) can generate an interrupt when a rising
edge occurs on this pin. Conversely, the ITl/PAn and ITm/PBn pins (l=3,4; m= 7,8; n=6,7)
can generate an interrupt when a falling edge occurs on this pin.
Interrupt generation will occur if it is enabled with the ITiE bit (i=1 to 8) in the ITRFRE
register and if the I bit of the CCR is reset.
30/139
Loading...
+ 109 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.