![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
(R) ST10F163 16-bit MCU with 128KByte Flash Memory DATA SHEET s High performance CPU 4-stage pipeline s 80ns instruction cycle time @ 25MHz CPU PEC Interrupt Controller P.4 P.1 P.0 facilities s Additional instructions to support HLL and operating systems s Single-cycle context switching support PLL s 400 ns multiplication (16 x 16 bits) s 800 ns division (32 / 16 bit) s Enhanced boolean bit manipulation EBC s Up to 16 MBytes linear address space for code and data (1MByte with SSP used) s 1 KBytes on-chip RAM s 128 KBytes on-chip Flash memory s 4 independently erasable banks of Flash SSP BRG BRG ASC s Memory organization GPT1&2 P.6 P.5 P.3 P.2 s Fast and flexible bus s Programmable EBC s 8-Bit or 16-bit external data bus s Multiplexed or demultiplexed external s Clock generation s On-chip PLL s Direct or prescaled clock input address/data buses s Five programmable chip-select signals s Hold and hold-acknowledge bus arbitration support s Up to 77 general purpose I/O lines s Idle and power down modes s Serial channels s Synchronous/asynchronous s High-speed synchronous serial port SSP s On-chip bootstrap loader s Fail-safe protection s Programmable watchdog timer s Oscillator Watchdog s Development support s C-compilers, macro-assembler s Interrupt s 8-channel interrupt-driven single-cycle packages, emulators, evaluation boards, HLL-debuggers, simulators, logic analyzer disassemblers, programming boards data transfer facilities via peripheral event controller (PEC) s 16-priority-level interrupt system with 20 sources, sample-rate down to 40 ns s Package s 100-Pin Thin Quad Flat Pack (TQFP) s Timers s Two general purpose timer units with 5 timers 7099474 A 5, Nov 1998 Watchdog CPU clock RAM s High performance 16-bit CPU with FLASH - ST10F163 Data Sheet Table of Contents 1 2 3 4 5 5.1 5.1.1 5.1.2 Introduction - - - - - - - - - - - - - - - - - - - - - - - - - - 4 Pin Data - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 Functional Description - - - - - - - - - - - - - - - - - - - 10 Memory Organization - - - - - - - - - - - - - - - - - - - - 11 Flash Memory - - - - - - - - - - - - - - - - - - - - - - - - 12 Programming/erasing with ST Embedded Algorithm Kernel - - 13 Return values - - - - - - - - - - - - - - - - - - - - - - - - - - - - 16 Programming examples - - - - - - - - - - - - - - - - - - - - - - - 17 5.2 5.3 6 6.1 7 8 9 9.1 9.2 Flash memory configuration - - - - - - - - - - - - - - - - - 18 Flash protection - - - - - - - - - - - - - - - - - - - - - - - 19 External Bus Controller - - - - - - - - - - - - - - - - - - - 20 Programmable chip select timing control - - - - - - - - - - - 21 Central Processing Unit (CPU) - - - - - - - - - - - - - - - 22 Interrupt System - - - - - - - - - - - - - - - - - - - - - - 23 General Purpose Timer (GPT) Unit - - - - - - - - - - - - - 26 GPT1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 26 GPT2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - 27 2/75 7099474 A ST10F163 Data Sheet 10 11 12 13 14 15 16 16.1 16.2 16.3 16.4 16.4.1 16.4.2 16.4.3 16.4.4 16.4.5 16.4.6 16.4.7 16.4.8 16.4.9 16.4.10 16.4.11 16.4.12 16.4.13 16.4.14 - Parallel Ports - - - - - - - - - - - - - - - - - - - - - - - - 29 Serial Channels - - - - - - - - - - - - - - - - - - - - - - - 29 Watchdog Timer - - - - - - - - - - - - - - - - - - - - - - 31 - - - - - - - - - - - - - - - - 32 Oscillator Watchdog (OWD) Instruction Set Summary - - - - - - - - - - - - - - - - - - 33 Special Function Register Overview - - - - - - - - - - - - 36 Electrical Characteristics Absolute maximum ratings Parameter Interpretation DC characteristics - - - AC characteristics - - - Test waveforms - - - - - - Definition of internal timing - Clock generation modes - - Prescaler operation - - - - - Direct drive - - - - - - - - - Oscillator Watchdog (OWD) Phase locked loop - - - - - Memory cycle variables - - - External clock drive XTAL1 - Multiplexed bus - - - - - - Demultiplexed bus - - - - - CLKOUT and READY - - - External bus arbitration - - - Synchronous serial port timing - - - - - - - - - - - - - - - - - - 41 41 41 42 45 45 45 47 47 48 48 49 50 51 52 59 66 68 71 17 18 19 Package Mechanical Data - - - - - - - - - - - - - - - - - - 73 Ordering Information - - - - - - - - - - - - - - - - - - - - 73 Revision History - - - - - - - - - - - - - - - - - - - - - - 74 7099474 A 3/75 1-Introduction ST10F163 Data Sheet 1 Introduction The ST10F163 is a Flash derivative of the STMicroelectronics ST10 family of 16-bit microcontrollers. It combines high CPU performance (up to 12.5 million instructions per second) with high peripheral functionality and enhanced IO-capabilities. 128KBytes of an electrically erasable and re-programmable Flash EPROM is provided on-chip. VDD XTAL1 XTAL2 RSTIN RSTOUT NMI EA READY ALE RD WR/WRL Port 5 6-bit VSS Port 0 16-bit Port 1 16-bit Port 2 8-bit Port 3 15-bit Port 4 8-bit Port 6 8-bit ST10F163 Figure 1 Logic symbol 4/75 7099474 A ST10F163 Data Sheet 2-Pin Data 2 Pin Data P5.12/T6IN P5.11/T5EUD P5.10/T6EUD P2.15/EX7IN P2.14/EX6IN P2.13/EX5IN P2.12/EX4IN P2.11/EX3IN P2.10/EX2IN P2.9/EX1IN P2.8/EX0IN P6.7/BREQ P6.6/HLDA P6.5/HOLD P6.4/CS4 P6.3/CS3 P6.2/CS2 P6.1/CS1 P6.0/CS0 NMI RSTOUT RSTIN VDD VSS P1H.7/A15 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 P5.13/T5IN P5.14/T4EUD P5.15/T2EUD VSS XTAL1 XTAL2 VDD P3.0 P3.1/T6OUT P3.2/CAPIN P3.3/T3OUT P3.4/T3EUD P3.5/T4IN P3.6/T3IN P3.7/T2IN P3.8 P3.9 P3.10/TxD0 P3.11/RxD0 P3.12/BHE/WRH P3.13 P3.15/CLKOUT P4.0/A16 P4.1/A17 P4.2/A18 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 P1H.6/A14 P1H.5/A13 P1H.4/A12 P1H.3/A11 P1H.2/A10 VSS VDD P1H.1/A9 P1H.0/A8 P1L.7/A7 P1L.6/A6 P1L.5/A5 P1L.4/A4 P1L.3/A3 P1L.2/A2 P1L.1/A1 P1L.0/A0 P0H.7/AD15 P0H.6/AD14 P0H.5/AD13 P0H.4/AD12 P0H.3/AD11 P0H.2/AD10 P0H.1/AD9 P0H.0/AD8 ST10F163 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 P4.3/A19 VSS VDD P4.4/A20/SSPCE1 P4.5/A21/SSPCE0 P4.6/A22/SSPDAT P4.7/A23/SSPCLK RD WR/WRL READY ALE EA VDD VSS VPP P0L.0/AD0 P0L.1/AD1 P0L.2/AD2 P0L.3/AD3 P0L.4/AD4 P0L.5/AD5 P0L.6/AD6 P0L.7/AD7 VDD VSS Figure 2 TQFP pin configuration (top view) 7099474 A 5/75 2-Pin Data Pin Number Input (I) Function Output (O) (TQFP) 98-100 1- 3 98 99 100 1 2 3 XTAL1 XTAL2 5 6 I I I I I I I I I O ST10F163 Data Sheet Symbol P5.10 - P5.15 6-bit input-only port with Schmitt-Trigger characteristics. Port 5 pins also serve as timer inputs: P5.10 P5.11 P5.12 P5.13 P5.14 P5.15 T6EUD T5EUD T6IN T5IN T4EUD T2EUD GPT2 Timer T6 Ext.Up/Down Ctrl.Input GPT2 Timer T5 Ext.Up/Down Ctrl.Input GPT2 Timer T6 Count Input GPT2 Timer T5 Count Input GPT1 Timer T4 Ext.Up/Down Ctrl.Input GPT1 Timer T2 Ext.Up/Down Ctrl.Input XTAL1: Input to the oscillator amplifier and input to the internal clock generator XTAL2: Output of the oscillator amplifier circuit. To clock the device from an external source, drive XTAL1, while leaving XTAL2 unconnected. Minimum and maximum high/low and rise/fall times specified in the AC Characteristics must be observed. P3.0 - P3.13, P3.15 8- 21 22 I/O I/O 15-bit (P3.14 is missing) bidirectional I/O port, bit-wise programmable for input or output via direction bits. For a pin configured as input, the output driver is put into high-impedance state. Port 3 outputs can be configured as push/pull or open drain drivers. The following Port 3 pins have alternate functions: P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 P3.10 P3.11 P3.12 T6OUT CAPIN T3OUT T3EUD T4IN T3IN T2IN TxD0 RxD0 BHE WRH P3.15 GPT2 Timer T6 Toggle Latch Output GPT2 Register CAPREL Capture Input GPT1 Timer T3 Toggle Latch Output GPT1 Timer T3 Ext.Up/Down Ctrl.Input GPT1 Timer T4 Input for Count/Gate/Reload/ Capture GPT1 Timer T3 Count/Gate Input GPT1 Timer T2 Input for Count/Gate/Reload/ Capture ASC0 Clock/Data Output (Asyn./Syn.) ASC0 Data Input (Asyn.) or I/O (Syn.) Ext. Memory High Byte Enable Signal, Ext. Memory High Byte Write Strobe 9 10 11 12 13 14 15 18 19 20 O I IO I I I I O I/O O O 22 O CLKOUT System Clock Output (=CPU Clock) Table 1 Pin definitions and functions 6/75 7099474 A ST10F163 Data Sheet Pin Number Input (I) Function Output (O) (TQFP) 23-26 29-32 I/O 2-Pin Data Symbol P4.0 - P4.7 8-bit bidirectional I/O port, bit-wise programmable for input or output via direction bits. For a pin configured as input, the output driver is put into high-impedance state. For external bus configuration, Port 4 can be used to output the segment address lines: P4.0 ... P4.3 P4.4 A16 ... A19 A20 Least Significant Segment Addr. Line ... Segment Address Line Segment Address Line 23 ... 26 29 O ... O O O SSPCE1 SSP Chip Enable Line 1 P4.5 A21 Segment Address Line 30 O O SSPCE0 SSP Chip Enable Line 0 P4.6 A22 Segment Address Line 31 O I/O SSPDAT SSP Data Input/Output Line P4.7 A23 Most Significant Segment Addr. Line 32 O O SSPCLK SSP Clock Output Line External Memory Read Strobe. RD is activated for every external instruction or data read access. External Memory Write Strobe. In WR-mode this pin is activated for every external data write access. In WRL-mode this pin is activated for low byte data write accesses on a 16-bit bus, and for every data write access on an 8-bit bus. See WRCFG in register SYSCON for mode selection. Ready Input. When the READY function is enabled, a high level at this pin during an external memory access will force the insertion of memory cycle time waitstates until the pin returns to a low level. Address Latch Enable Output. Can be used for latching the address into external memory or an address latch in the multiplexed bus modes. External Access Enable pin. A low level at this pin during and after Reset forces the device to begin instruction execution out of external memory. A high level forces execution out of the internal flash EPROM. RD 33 34 O O WR/WRL READY 35 I ALE 36 O EA 37 I Table 1 Pin definitions and functions (Continued) 7099474 A 7/75 2-Pin Data Pin Number Input (I) Function Output (O) (TQFP) I/O 41-48 51-58 ST10F163 Data Sheet Symbol PORT0: P0L.0P0L.7 P0H.0P0H.7 Two 8-bit bidirectional I/O ports P0L and P0H, bit-wise programmable for input or output via direction bits. For a pin configured as input, the output driver is put into high-impedance state. In case of an external bus configuration, PORT0 serves as the address (A) and address/data (AD) bus in multiplexed bus modes and as the data (D) bus in demultiplexed bus modes. Demultiplexed bus modes Data Path Width: P0L.0 - P0L.7: P0H.0 - P0H.7: 8-bit D0 - D7 I/O 16-bit D0 - D7 D8 - D15 Multiplexed bus modes Data Path Width: P0L.0 - P0L.7: P0H.0 - P0H.7: PORT1: P1L.0P1L.7 P1H.0P1H.7 RSTIN 59-66 67, 68 71-76 79 I I/O 8-bit AD0 - AD7 A8 - A15 16-bit AD0 - AD7 AD8 - AD15 Two 8-bit bidirectional I/O ports P1L and P1H, bit-wise programmable for input or output via direction bits. For a pin configured as input, the output driver is put into high-impedance state. PORT1 is used as the 16-bit address bus (A) in demultiplexed bus modes and also after switching from a demultiplexed bus mode to a multiplexed bus mode. Reset Input with Schmitt-Trigger characteristics. A low level at this pin for a specified duration while the oscillator is running resets the device. An internal pullup resistor permits power-on reset using only a capacitor connected to VSS. Internal Reset Indication Output. This pin is set to a low level when the part is executing either a hardware-, a software- or a watchdog timer reset. RSTOUT remains low until the EINIT (end of initialization) instruction is executed. Non-Maskable Interrupt Input. A high to low transition at this pin causes the CPU to vector to the NMI trap routine. When the PWRDN (power down) instruction is executed, the NMI pin must be low in order to force the ST10R65 to go into power down mode. If NMI is high, when PWRDN is executed, the part will continue to run in normal mode. If not used, pin NMI should be pulled high externally. RSTOUT 80 O NMI 81 I Table 1 Pin definitions and functions (Continued) 8/75 7099474 A ST10F163 Data Sheet Pin Number Input (I) Function Output (O) (TQFP) 82-89 I/O 2-Pin Data Symbol P6.0P6.7 8-bit bidirectional I/O port, bit-wise programmable for input or output via direction bits. For a pin configured as input, the output driver is put into high-impedance state. Port 6 outputs can be configured as push/pull or open drain drivers. The following Port 6 pins have alternate functions: P6.0 ... P6.4 P6.5 CS0 ... CS4 HOLD Chip Select 0 Output ... Chip Select 4 Output External Master Hold Request Input (Master mode: O, Slave mode: I) 82 ... 86 87 O ... O I 88 89 P2.8 - P2.15 90 - 97 I/O O I/O P6.6 P6.7 HLDA BREQ Hold Acknowledge Output Bus Request Output Port 2 is an 8-bit bidirectional I/O port. It is bit-wise programmable for input or output via direction bits. For a pin configured as input, the output driver is put into high-impedance state. Port 2 outputs can be configured as push/pull or open drain drivers. The following Port 2 pins also serve for alternate functions: P2.8 ... P2.15 EX0IN ... EX7IN Fast External Interrupt 0 Input ... Fast External Interrupt 7 Input 90 ... 97 VPP 40 I ... I - Flash programming voltage. This pin accepts the programming voltage for the on-chip flash EPROM. In the ST10F163, bit 4of SYSCON register serves as an enable/disable control for the OWD. Digital Supply Voltage: + 5 V during normal operation and idle mode. > 2.5 V during power down mode Digital Ground. VDD 7, 28, 38, 49, 69, 78 4, 27, 39, 50, 70, 77 - VSS - Table 1 Pin definitions and functions (Continued) 7099474 A 9/75 3-Functional Description ST10F163 Data Sheet 3 Functional Description The architecture of the ST10F163 combines the advantages of both RISC and CISC processors and an advanced peripheral subsystem. The following block diagram gives an overview of the different on-chip components and of the advanced, high bandwidth internal bus structure. 32 Internal FLASH Memory 16 CPU-Core 16 16 Internal RAM Watchdog 16 PEC Interrupt Controller 16 PLL OSC. 16 Port 0 SSP Ext. Bus Controller GPT1 T2 T3 T4 GPT2 T5 ASC (usart) 16 8 Port 4 Port 1 BRG Port 5 T6 BRG Port 3 Port 2 Port 6 8 6 15 8 Figure 3 Block diagram 10/75 7099474 A ST10F163 Data Sheet 4-Memory Organization 4 Memory Organization The memory space of the ST10F163 is configured in a Von-Neumann architecture. Code memory, data memory, registers and I/O ports are organized within the same linear address space which includes 16 MBytes. The entire memory space can be accessed bytewise or wordwise. Particular portions of the on-chip memory have additionally been made directly bit addressable. 1 KByte of on-chip RAM is provided as a storage for user defined variables, for the system stack, general purpose register banks and even for code. A register bank can consist of up to 16 wordwide (R0 to R15) and/or bytewide (RL0, RH0, ..., RL7, RH7) General Purpose Registers (GPRs). 1024 bytes (2 * 512 bytes) of the address space are reserved for the Special Function Register areas (SFR space and ESFR space). SFRs are wordwide registers which are used for controlling and monitoring functions of the different on-chip units. Unused SFR addresses are reserved for other/future members of the ST10 family. In order to meet the needs of system designs where more memory is required than is provided on chip, up to 16 MBytes of external RAM and/or ROM can be connected to the microcontroller. 7099474 A 11/75 5-Flash Memory ST10F163 Data Sheet 5 Flash Memory The ST10F163 provides 128KBytes of on-chip, electrically erasable and re-programmable Flash EPROM. The flash memory is organized in 32 bit wide blocks. This allows double word instructions to be fetched in one machine cycle. The flash memory can be used for both code and data storage. The flash memory is organized into four banks of sizes 8K, 24K, 48K and 48Kbytes (table 2). Each of these banks can be erased independently. This prevents unnecessary erasing of the whole flash memory when only a partial erasing is required. Bank 0 1 2 3 Addresses (Segment 0) 000000h to 001FFFh 002000h to 007FFFh 018000h to 023FFFh 024000h to 02FFFFh Addresses (Segment 1) 010000h to 011FFFh 012000h to 017FFFh 018000h to 023FFFh 024000h to 02FFFFh Size (bytes) 8K 24K 48K 48K Table 2 FLASH memory bank organisation Typical timing characteristics give 80s for word or double word programming and 800 ms for block erasing, at 25mhz system clock. the flash memory has a typical endurance of 1000 erasing/programming cycles. the flash memory can be programmed, either in a programming board, or in the target system. the code to program or erase the flash memory is executed from an external memory or from the on-chip ram, but not from the flash memory itself. as a flexible and cost-saving alternative, the on-chip bootstrap loader may be used to load and start the programming code. the following considerations must be taken into account for programming or erasing `on-line' in the target system: * While operations are in progress, the flash memory can not be accessed as usual, no branch can be made to the flash memory and no data reads can be taken from the flash memory. * If the two first blocks (8KB + 24KB) of the flash memory are mapped to segment 0, no interrupt or hardware trap must occur during programming or erasing, as this would require a `forbidden' branch to the flash memory. A flash memory protection option, when activated, prevents view access to the contents of the ROM and the on-chip RAM, code operation from within the flash memory continues as normal. During the initialization phase, the first two blocks of the flash memory (8KB + 24KB) can be mapped to segment 0 (addresses 00000h to 07FFFh), or to segment 1 (addresses 10000h to 17FFFh). This makes it possible to use external memory for additional system flexibility. 12/75 7099474 A ST10F163 Data Sheet 5-Flash Memory 5.1 Programming/erasing with ST Embedded Algorithm Kernel In order to secure flash programming and erasing operations, and also to simplify the software development for programming and erasing the Flash, the ST10F163 Flash is programmed or erased by executing a specific sequence of instructions (called `Unlock Sequence') with command and parameters loaded into GPRs. The Unlock Sequence' invokes embedded kernel routines that checks the validity of the parameters provided by the user, and decodes the command (programming or erasing) and executes it. When performing a programming command, the Embedded Algorithm Kernel automatically times the program pulse widths (taking in account the CPU period provided as a parameter by the user) and verifies proper cell programming. When performing an erasing command, the Embedded Algorithm Kernel automatically pre-programs the bank to be erased if it is not already programmed. During erase, the Embedded Algorithm Kernel automatically times the erase pulse widths (taking in account the CPU period provided as a parameter by the user) and verifies proper cell erasing. To start a program/erase operation, the user's application must perform an `Unlock Sequence' to trigger the flash ST Embedded Algorithms Kernel (STEAK). Before using STEAK, proper parameters must be assigned through the R0-R4 registers. The R0 register is the command register. The other registers handle the address and data to be programmed or sector to be erased. Table 3 defines the command sequence. A definition of the codes used in Table 3 is given in Table 4. COMMAND Single word programming Double Word programming Block programming Sector Erasing Read Status R0 55Ash DD4sh AA5sh EEEEh 7777h R1 AddOff AddOff BegAddOff 5555h nu R2 W DWL EndAddOff Bnk nu R3 nu DWH SourceAddr Bnk nu R4 2TCL 2TCL 2TCL 2TCL 2TCL Table 3 Command -parameters definition 7099474 A 13/75 5-Flash Memory Note ST10F163 Data Sheet The read status for registers R1 to R3 is not used except for the return values, refer to "Return values" on page 16 Definition Segment of the target flash memory cell Segment Offset of the target flash memory cell which must be even an value (word-aligned address). Data (word) to be written in flash. Data (double word, DHL = low word, DWH = high word to be written in Flash, Segment Offset of the FIRST target flash memory word to be written in a multiple programming command. This value must be even (word-aligned address) Segment Offset of the LAST Target Flash Memory word to be written in a Multiple programming command. Must be even value (word-aligned address). The value D = (EndAddOff - BegAddOff) must be: 0 <= D < 16384 (ie. up to one page (16 KBytes) can be written in the flash with one multi-word programming command). Start address for the source data (block) to be programmed. This address uses implicitly the data paging mechanism of the CPU. SourceAdd value must respect the rules: SourceAdd + (EndAddOff - BegAddOff) < 16384. Page 0 and 1 can NOT be used for source data if SYSCON bit ROMS1 = `1' Note: source data can be located in flash (In pages 0, 1, 6, 7, 8, 9, 10 or 11 if bit ROMS1 = `0', or in pages 4, 5, 6, 7, 8, 9, 10 or 11 if bit ROMS1 = `1'. Abbreviation s AddOff W DWL,DWH BegAddOff EndAddOff SourceAdd Bnk Number of the Bank to be erased. Note that for security, R2 and R3 must hold the same value. CPU clock period in nseconds (e.g. R4 = 40d means CPU frequency is 25MHz). 2TCL Table 4 Code definition The Flash Unlock Sequence consists of two consecutive writes: the direct addressing mode and the indirect addressing mode. The FCR must represent an even address in the active address space of the flash memory. Rwn can be any unused word GPR (R6 to R15), loaded with a value that results in the same even address as for FCR EXTS MOV #1, #2 FCR, R7 ; assumes flash is mapped in seg 1 ; first part 14/75 7099474 A ST10F163 Data Sheet MOV [R7], R7 ; second part 5-Flash Memory For easier coding, the standard data paging addressing scheme is overridden for the two MOV instruction of the Flash Trigger Sequence (EXTS instruction). This also locked both standard and PEC interrupts and class A hardware traps. Must be replace by ATOMIC instruction if standard DPP addressing scheme must be preserved. When the embedded programming/erasing algorithm returns to trigger point, information can be collected through register R0 so the user can take specific actions. Table 5 lists all of the error codes that can be returned in R0. ERROR CODE 00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah MEANING Operation was successful ROMEN bit inside SYSCON is not set Vpp voltage not present Programming operation failed Address value (R1) incorrect: not in Flash address area or odd CPU period out of range (must be between 10 ns to 1000 ns) Not enough free space on system stack for proper operation Incorrect bank number (R2,R3) specified Erase operation failed Bad source address for multi-word programming command Bad number of words to be copied in multi-word programming command: one destination will be out of flash, or one source operand will be out of the source page Unknown or bad command FFh Table 5 Error code definition Note The Flash Embedded Presto Algorithms require at least 45 words on the Internal System Stack for proper operation. The program verifies itself that there is enough free space on the System Stack before performing a programming or erasing operation (by comparing SP value with STKOV+90d). 7099474 A 15/75 5-Flash Memory ST10F163 Data Sheet 5.1.1 Return values After a single or double word programming command, R0 contains error code, R1 remains unchanged, R2 will contain the data in Flash for location Segment+Segment Offset (R0.[3:0] with R1), R3 will contain the data in Flash for location Segment+Segment Offset +2 (R0[3:0] with R1+2), R4 to R15 remain unchanged. After a multi-word programming command, R0 contains error code, R1 will contains the last segment offset address of the last written word in flash (failing flash address if R0 is not equal to zero), R2 and R3 are undefined, R4 to R15 remain unchanged. After erasing command, only R4 to R15 remain unchanged, R0 will contain error code, R1 to R3 are undefined. After status read command, R0 contains error code, R1 contains flash embedded revision, R2 and R3 contains circuit identifiers (R2 = #0787h and R3 = #0101h for this device), R4 to R15 remain unchanged. 16/75 7099474 A ST10F163 Data Sheet 5-Flash Memory 5.1.2 Programming examples Programming a double word: ; code hereafter assumes that flash is mapped in segment 1 ; i.e. bit ROMS1 = `1' in SYSCON register ; Flash must also be enabled, i.e. bit ROMEN = `1' in SYSCON. MOV R0, #PROGDW ; DD4xh: Double word programming command OR R0, #01h ; Selects segment 1 in flash memory MOV R1, #00224h ; Address to be programmed is 01'0224h MOV R2, #03456h ; Data to be programmed at 01'0224h MOV R3, #04567h ; Data to be programmed at 01'0226h MOV R4, #050d ; 50ns is 20 MHz CPU clock frequency MOV R7, #08000h ; R7 used for Flash trigger sequence #define FCR 08000h ; Flash Unlock Sequence: consists in two consecutive writes, with the direct addressing mode and then the indirect addressing mode. FCR must represent an even address in the active address space of the Flash memory, and Rwn can be any unused word GPR (R6 to R15)loaded with a value resulting in the same even address than FCR EXTS #1, #2 ; flash can be mapped in segment 0 or 1 MOV FCR, R7 ; first part MOV [R7], R7 ; second part NOP ; WARNING: place 2 NOP operations after NOP ; the Unlock sequence to avoid all possible ; pipeline conflict in STEAK programs Note For easier coding, the standard data paging addressing scheme is overrides for the two MOV instruction of the Flash Trigger Sequence (EXTS instruction).This also locked both standard and PEC interrupts and class A hardware traps. Must be replace by ATOMIC instruction if standard DPP addressing scheme must be preserved. 7099474 A 17/75 5-Flash Memory Programming a block of data: ST10F163 Data Sheet Address 01'9000h to 01'9FFEh (inclusive) is to be programmed. Source data (data to be copied into flash) is located in external RAM from address 03'1000h (to 03'1FFEh, implicitly): ; code hereafter assumes that flash is mapped in segment 1 ; i.e. bit ROMS1 = `1' in SYSCON register ; Flash must also be enabled, i.e. bit ROMEN = `1' in SYSCON. MOV R0, #PROGMW ; AA5xh: Multi word programming command OR R0, #01h ; Selects segment 1 in flash memory MOV R1, #09000h ; First Flash Segment Offset Address MOV R2, #09FFEh ; Last Flash Segment Offset Address MOV R3, #01000h ; Source data address: use DPP2 as ; data page pointer SCXT DPP2,#0Ch ; Source is in page 12 (0Ch): save previous ; DPP2 value and load it with source page ; number MOV R4, #050d ; 50ns is 20 MHz CPU clock frequency MOV R7, #08000h ; R7 used for Flash trigger sequence #define FCR 08000h EXTS #1, #2 ; flash can be mapped in segment 0 or 1 MOV FCR, R7 ; first part MOV [R7], R7 ; second part NOP ; WARNING: place 2 NOP operations after NOP ; the Unlock sequence to avoid all possible ; pipeline conflict in STEAK programs POP DPP2 ; restore DPP2 5.2 Flash memory configuration The default memory configuration is determined by the state of the EA pin at reset. This value is stored in the Internal ROM enable bit: ROMEN of the SYSCON Register. When ROMEN=0, the internal ROM is disabled and external ROM is used for start-up control. The first 32KBytes of the flash memory area must be re-mapped to segment 1, to enable their later use. This is done by setting the ROMS1 bit of SYSCON to 0. This is done by the externally supplied program, before the execution of the EINIT instruction. If program execution starts from external memory, but access to the flash memory (re-mapped to Bank 1) is required later, one of the following values has to be written to the SYSCON register, before the end of initialization: 18/75 7099474 A ST10F163 Data Sheet * If flash is to be mapped to segment 1: xxx100xxxxxxxxxxb (ROMS1=1,SGTDIS=0) 5-Flash Memory * If flash is to be mapped to segment 0: xxx000xxxxxxxxxxb (ROMS1=0,SGTDIS=0) All other parts of the flash memory (addresses 18000h - 1FFFFh) remain unaffected. The SGTDIS Segmentation Disable/Enable must be set to 0 so that the 64KBytes of on-chip memory can be used in addition to the external boot memory. The correct procedure for changing the segmentation registers must be observed, to prevent unwanted trap conditions: * Instructions that configure the internal memory must only be executed from external memory or from the internal RAM. * Whenever the internal memory is disabled, enabled or re-mapped, the DPPs must be explicitly (re)loaded to enable correct data accesses to the internal memory and/or external memory. 5.3 Flash protection The flash protection mode, prevents the reading of data operands in the flash memory by anything but a program executed from the flash memory itself. Flash protection mode permits program branches from, or into the flash memory, but does not permit erasing and programming of the flash memory. Flash protection is controlled by the Protection UPROM Programming Bit (UPROG). UPROG is a 'hidden' one-time programmable bit. It is only accessible in a special mode, entered, for example, via a flash EPROM programming board. If UPROG is set to `1', flash protection is active after reset. By default flash protection is disabled (UPROG=0). For deactivation of flash protection, where the flash memory has to be reprogrammed with updated program/variables, a zero value must be written at every even address in the active address space of the flash memory. This write can only be done by an instruction executed from the internal flash memory itself, e.g. MOV FLASH,ZEROS 7099474 A 19/75 6-External Bus Controller ST10F163 Data Sheet 6 External Bus Controller All of the external memory accesses are performed by a particular on-chip External Bus Controller (EBC). It can be programmed either to Single Chip Mode when no external memory is required, or to one of four different external memory access modes: * 16-/18-/20-/24-bit Addresses, 16-bit Data, Demultiplexed * 16-/18-/20-/24-bit Addresses, 16-bit Data, Multiplexed * 16-/18-/20-/24-bit Addresses, 8-bit Data, Multiplexed * 16-/18-/20-/24-bit Addresses, 8-bit Data, Demultiplexed In the demultiplexed bus modes, addresses are output on PORT1 and data is input/output on PORT0 or P0L, respectively. In the multiplexed bus modes both addresses and data use PORT0 for input/output. Important timing characteristics of the external bus interface (Memory Cycle Time, Memory Tri-State Time, Length of ALE and Read Write Delay) have been made programmable. This gives the choice of a wide range of different types of memories and external peripherals. In addition, up to 4 independent address windows may be defined (via register pairs ADDRSELx / BUSCONx). This gives access to different resources with different bus characteristics. These address windows are arranged hierarchically where BUSCON4 overrides BUSCON3 and BUSCON2 overrides BUSCON1. All accesses to locations not covered by these 4 address windows are controlled by BUSCON0. Up to 5 external CS signals (4 windows plus default) can be generated in order to save external glue logic. Access to very slow memories is supported via a particular `Ready' function. A HOLD/HLDA protocol is available for bus arbitration so that external resources can be shared with other bus masters. The bus arbitration is enabled by setting bit HLDEN in register SYSCON. After setting HLDEN once, pins P6.7...P6.5 (BREQ, HLDA, HOLD) are automatically controlled by the EBC. In Master Mode (default after reset) the HLDA pin is an output. By setting bit DP6.7 to'1' the Slave Mode is selected where pin HLDA is switched to input. This allows to directly connect the slave controller to another master controller without glue logic. For applications which require less than 16 MBytes of external memory space, this address space can be restricted to 1 MByte, 256 KByte or to 64 KByte. In this case Port 4 outputs four, two or no address lines at all. If an address space of 16 MBytes is used, it outputs all 8 address lines. Note When the on-chip SSP Module is to be used the segment address output on Port 4 must be limited to 4 bits (i.e. A19...A16) in order to enable the alternate function of the SSP interface pins. 7099474 A 20/75 ST10F163 Data Sheet 6-External Bus Controller 6.1 Programmable chip select timing control The position of the CSx lines can be changed by setting the CSCFG bit in the SYSCON register. By default the CSx lines change half a CPU clock cycle after the rising edge of ALE (20ns @ fCPU = 25 MHz). With the CSCFG bit set (section Figure 7), the CSx lines change with the rising edge of ALE. In this case, the CSx lines and address lines change at the same time. Segment (P4) Address (P1) ALE Normal Demultiplexed Bus Cycle ALE Lengthen Demultiplexed Bus Cycle Normal CSx Unlatched CSx BUS (P0) RD Data Data BUS (P0) WR Read/Write Delay Data Data Read/Write Delay Figure 4 Chip select delay 7099474 A 21/75 7-Central Processing Unit (CPU) ST10F163 Data Sheet 7 Central Processing Unit (CPU) CPU SP STKOV STKUN MDH MLD Mul./Div.-HW Bit-Mask Gen. General ALU 16-Bit Barrel-Shift Context Ptr ADDRSEL 1 ADDRSEL 2 ADDRSEL 3 ADDRSEL 4 Code Seg. Ptr. Purpose Registers R15 16 R15 128KBytes FLASH ROM 32 Exec. Unit Instr. Ptr Instr. Reg 4-Stage Pipeline PSW SYSCON BUSCON 0 BUSCON 1 BUSCON 2 BUSCON 3 BUSCON 4 Data Pg. Ptrs Internal RAM 1KByte R0 16 R0 Figure 5 CPU block diagram The main core of the CPU consists of a 4-stage instruction pipeline, a 16-bit arithmetic and logic unit (ALU) and dedicated SFRs. Additional hardware has been added for a separate multiply and divide unit, a bit-mask generator and a barrel shifter. Based on these hardware provisions, most of the ST10F163's instructions can be executed in one machine cycle. This requires 80ns at 25MHz CPU clock. For example, shift and rotate instructions are always processed in one machine cycle independent of the number of bits to be shifted. All multiple-cycle instructions have been optimized for speed: branches in 2 cycles, a 16 x 16 bit multiplication in 5 cycles and a 32-/16 bit division in 10 cycles. The `Jump Cache' pipeline optimization, reduces the execution time of repeatedly performed jumps in a loop, from 2 cycles to 1 cycle. The CPU includes an actual register context. This consists of up to 16 wordwide GPRs physically allocated in the on-chip RAM area. A Context Pointer (CP) register determines the base address of the active register bank to be accessed by the CPU. The number of register banks is only restricted by the available internal RAM space. For easy parameter passing, one register bank may overlap others. A system stack of up to 1024 bytes is provided as a storage for temporary data. The system stack is allocated in the on-chip RAM area, and it is accessed by the CPU via the stack 22/75 7099474 A ST10F163 Data Sheet 8-Interrupt System pointer (SP) register. Two separate SFRs, STKOV and STKUN, are implicitly compared against the stack pointer value upon each stack access for the detection of a stack overflow or underflow. The basic instruction length is either 2 or 4 bytes. Possible operand types are bits, bytes and words. A variety of direct, indirect or immediate addressing modes exist. 8 Interrupt System With an interrupt response time from 200 ns to 480ns (in the case of internal program execution), the ST10F163 reacts quickly to the occurrence of non-deterministic events. The architecture of the ST10F163 supports several mechanisms for fast and flexible response to service requests that can be generated from various sources internal or external to the microcontroller. Any of these interrupt requests can be programmed to being serviced by the Interrupt Controller or by the Peripheral Event Controller (PEC). In a standard interrupt service, program execution is suspended and a branch to the interrupt vector table is performed. For a PEC service, just one cycle is `stolen' from the current CPU activity. A PEC service is a single byte or word data transfer between any two memory locations with an additional increment of either the PEC source or the destination pointer. An individual PEC transfer counter is decremented for each PEC service, except for the continuous transfer mode. When this counter reaches zero, a standard interrupt is performed to the corresponding source related vector location. PEC services are suited to, for example, the transmission or reception of blocks of data. The ST10F163 has 8 PEC channels, each of which offers fast interrupt-driven data transfer capabilities. A separate control register which contains an interrupt request flag, an interrupt enable flag and an interrupt priority bitfield, exists for each of the possible interrupt sources. Via its related register, each source can be programmed to one of sixteen interrupt priority levels. Once having been accepted by the CPU, an interrupt service can only be interrupted by a higher prioritized service request. For the standard interrupt processing, each of the possible interrupt sources has a dedicated vector location. Fast external interrupt inputs are provided to service external interrupts with high precision requirements. These fast interrupt inputs, feature programmable edge detection (rising edge, falling edge or both edges). Software interrupts are supported by means of the `TRAP' instruction in combination with an individual trap (interrupt) number. 7099474 A 23/75 8-Interrupt System ST10F163 Data Sheet Table 6 shows all of the possible ST10F163 interrupt sources and the corresponding hardware-related interrupt flags, vectors, vector locations and trap (interrupt) numbers: Source of Interrupt or PEC Service Request External Interrupt 0 External Interrupt 1 External Interrupt 2 External Interrupt 3 External Interrupt 4 External Interrupt 5 External Interrupt 6 External Interrupt 7 GPT1 Timer 2 GPT1 Timer 3 GPT1 Timer 4 GPT2 Timer 5 GPT2 Timer 6 GPT2 CAPREL Register ASC0 Transmit ASC0 Transmit Buffer ASC0 Receive ASC0 Error SSP Interrupt PLL Unlock / OWD Request Flag CC8IR CC9IR CC10IR CC11IR CC12IR CC13IR CC14IR CC15IR T2IR T3IR T4IR T5IR T6IR CRIR S0TIR S0TBIR S0RIR S0EIR XP1IR XP3IR Enable Flag CC8IE CC9IE CC10IE CC11IE CC12IE CC13IE CC14IE CC15IE T2IE T3IE T4IE T5IE T6IE CRIE S0TIE S0TBIE S0RIE S0EIE XP1IE XP3IE Interrupt Vector CC8INT CC9INT CC10INT CC11INT CC12INT CC13INT CC14INT CC15INT T2INT T3INT T4INT T5INT T6INT CRINT S0TINT S0TBINT S0RINT S0EINT XP1INT XP3INT Vector Location 00'0060h 00'0064h 00'0068h 00'006Ch 00'0070h 00'0074h 00'0078h 00'007Ch 00'0088h 00'008Ch 00'0090h 00'0094h 00'0098h 00'009Ch 00'00A8h 00'011Ch 00'00ACh 00'00B0h 00'0104h 00'010Ch Trap Number 18h 19h 1Ah 1Bh 1Ch 1Dh 1Eh 1Fh 22h 23h 24h 25h 26h 27h 2Ah 47h 2Bh 2Ch 41h 43h Table 6 List of possible interrupt sources, flags, vector and trap numbers The ST10F163 provides an excellent mechanism to identify and to process exceptions or error conditions that arise during run-time, called`Hardware Traps'. Hardware traps cause an 24/75 7099474 A ST10F163 Data Sheet 8-Interrupt System immediate non-maskable system reaction which is similar to a standard interrupt service (branching to a dedicated vector table location). The occurrence of a hardware trap is additionally signified by an individual bit in the trap flag register (TFR). Except when another higher prioritized trap service is in progress, a hardware trap will interrupt any actual program execution. In turn, hardware trap services can normally not be interrupted by standard or PEC interrupts. Table 7 shows all of the possible exceptions or error conditions that can arise during run time. Trap Flag Trap Vector Vector Location Trap Number Trap Priority Exception Condition Reset Functions: Hardware Reset Software Reset Watchdog Timer Overflow Class A Hardware Traps: Non-Maskable Interrupt Stack Overflow Stack Underflow Class B Hardware Traps: Undefined Opcode Protected Instruction Fault Illegal Word Operand Access Illegal Instruction Access Illegal External Bus Access Reserved Software Traps: TRAP Instruction RESET RESET RESET 00'0000h 00'0000h 00'0000h 00h 00h 00h III III III NMI STKOF STKUF NMITRAP STOTRAP STUTRAP 00'0008h 00'0010h 00'0018h 02h 04h 06h II II II UNDOPC PRTFLT ILLOPA ILLINA ILLBUS BTRAP BTRAP BTRAP BTRAP BTRAP 00'0028h 00'0028h 00'0028h 00'0028h 00'0028h [2Ch -3Ch] 0Ah 0Ah 0Ah 0Ah 0Ah [0Bh - 0Fh] I I I I I Any Any [00'0000h- [00h - 7Fh] 00'01FCh] in steps of 4h Current CPU Priority Table 7 Exceptions or error conditions that can arise during run-time 7099474 A 25/75 9-General Purpose Timer (GPT) Unit ST10F163 Data Sheet 9 General Purpose Timer (GPT) Unit The GPT unit is a flexible multifunctional timer/counter structure which is used for time related tasks such as event timing and counting, pulse width and duty cycle measurements, pulse generation, or pulse multiplication. The GPT unit contains five 16-bit timers organized into two separate modules GPT1 and GPT2. Each timer in each module may operate independently in several different modes, or may be concatenated with another timer of the same module. 9.1 GPT1 Each of the three timers T2, T3, T4 of module GPT1 can be configured individually for one of three basic modes of operation: timer, gated timer, and counter mode. In Timer Mode, the input clock for a timer is derived from the CPU clock, divided by a programmable pre-scaler. In counter Mode a timer is clocked in reference to external events. Gated timer mode supports pulse width or duty cycle measurement, where the operation of a timer is controlled by the `gate' level on an external input pin. Each timer has one associated port pin (TxIN) which serves as gate or clock input. Table 8 GPT1 timer input frequencies, resolution and periods lists the timer input frequencies, resolution and periods for each pre-scaler option at 25 MHz CPU clock. fCPU = 25MHz Timer Input Selection T2I / T3I / T4I 000B Pre-scaler factor Input Frequency 8 3.125 MHz 320 ns 21.0 ms 001B 16 1.563 MHz 640 ns 41.9 ms 010B 32 781.3 kHz 128 ns 83.9 ms 011B 64 390.6 kHz 2.56 s 167 ms 100B 128 195.3 kHz 5.12 s 336 ms 101B 256 97.66 kHz 110B 512 48.83 kHz 111B 1024 24.41 kHz Resolution Period 10.24 s 20.48 s 40.96 s 671 ms 1.34 s 2.68 s Table 8 GPT1 timer input frequencies, resolution and periods The count direction (up/down) for each timer is programmable by software or is altered dynamically by an external signal on a port pin (TxEUD). For example, this facilitates position tracking. Timer T3 has output toggle latches (TxOTL) which changes state on each timer over-flow/ underflow. The state of this latch may be output on port pins (TxOUT) e. g. for time out 26/75 7099474 A ST10F163 Data Sheet 9-General Purpose Timer (GPT) Unit monitoring of external hardware components, or may be used internally to clock timers T2 and T4 for measuring long time periods with high resolution. In addition to their basic operating modes, timers T2 and T4 may be configured as reload or capture registers for timer T3. When used as reload or capture registers, timers T2 and T4 are stopped. The content of timer T3 is captured into T2 or T4 in response to a signal at their associated input pins (TxIN). Timer T3 is reloaded with the contents of T2 or T4, triggered, either by an external signal or by a selectable state transition of its toggle latch, T3OTL. When both T2 and T4 are configured to alternately reload T3 on opposite state transitions of T3OTL with the low and high times of a PWM signal, this signal can be constantly generated without software intervention. 9.2 GPT2 The GPT2 module provides precise event control and time measurement. It includes two timers (T5, T6) and a capture/reload register (CAPREL). Both timers can be clocked with an input clock which is derived from the CPU clock via a programmable prescaler or with external signals. The count direction (up/down) for each timer is programmable by software or may additionally be altered dynamically by an external signal on a port pin (TxEUD). Concatenation of the timers is supported via the output toggle latch (T6OTL) of timer T6 which changes its state on each timer overflow/underflow. The state of this latch may be used to clock timer T5, or it may be output on a port pin (T6OUT). The overflows/underflows of timer T6 can additionally be used to clock the CAPCOM timers T0 or T1, and to cause a reload from the CAPREL register. The CAPREL register may capture the contents of timer T5 based on an external signal transition on the corresponding port pin (CAPIN), and timer T5 may optionally be cleared after the capture procedure. This allows absolute time differences to be measured or pulse multiplication to be performed without software overhead. Table 9 GPT2 timer input frequencies, resolution and period lists the timer input frequencies, resolution and periods for each pre-scaler option at 25 MHz CPU clock. fCPU = 25MHz Pre-scaler factor Input Frequency Resolution Period Timer Input Selection T5I / T6I 000B 4 6.25 MHz 160ns 10.49ms 001B 8 3.125 MHz 320 ns 21.0 ms 010B 16 1.563 MHz 640 ns 41.9 ms 011B 32 781.3 kHz 128 ns 83.9 ms 100B 64 390.6 kHz 2.56 s 167 ms 101B 128 195.3 kHz 5.12 s 336 ms 110B 256 97.66 kHz 10.24 s 671 ms 111B 512 48.83 kHz 20.48 s 1.34 s Table 9 GPT2 timer input frequencies, resolution and period 7099474 A 27/75 9-General Purpose Timer (GPT) Unit ST10F163 Data Sheet T2EUD U/D 2n n=3...10 CPU Clock T2IN T2 Mode Control GPT1 Timer T2 Reload Capture Interrupt Request CPU Clock 2n n=3...10 T3EUD T3 Mode Control T3OUT GPT1 Timer T3 U/D T3OTL T3IN T4IN CPU Clock T4 Mode Control 2n n=3...10 Capture Reload Interrupt Request Interrupt Request GPT1 Timer T4 U/D T4EUD Figure 6 Block diagram of GPT1 T5EUD CPU Clock T5IN U/D 2n n=2...9 T5 Mode Control GPT2 Timer T5 Clear Capture Interrupt Request CAPIN GPT2 CAPREL Reload Toggle FF GPT2 Timer T6 U/D T6EUD Interrupt Request Interrupt Request T6IN CPU Clock 2n n=2...9 T6 Mode Control T60TL T6OUT Figure 7 Block diagram of GPT2 28/75 7099474 A ST10F163 Data Sheet 10-Parallel Ports 10 Parallel Ports The ST10F163 provides up to 77 I/O lines which are organized into six input/output ports and one input port. All port lines are bit-addressable, and all input/output lines are individually (bit-wise) programmable as, either inputs or outputs via direction registers. The I/ O ports are true bidirectional ports which are switched to high impedance state when configured as inputs. The output drivers of three I/O ports can be configured (pin by pin) for push/pull operation or open-drain operation via control registers. During the internal reset, all port pins are configured as inputs. All port lines have associated, programmable, alternate input or output functions. PORT0 and PORT1 may be used as address and data lines when accessing external memory. Port 4 outputs the additional segment address bits A23/19/17...A16 in systems where segmentation is enabled to access more than 64 KBytes of memory. Port 6 provides optional bus arbitration signals (BREQ, HLDA, HOLD) and chip select signals. Port 3 includes alternate functions of timers, serial interfaces, the optional bus control signal BHE and the system clock output (CLKOUT). Port 5 is used for timer control signals. All port lines that are not used for these alternate functions may be used as general purpose I/O lines. 11 Serial Channels Serial communication with other microcontrollers, processors, terminals or external peripheral components is provided by two serial interfaces, an Asynchronous/Synchronous Serial Channel (ASC0) and a Synchronous Serial Port (SSP). ASC0: The table below shows the baud rates for the asynchronous/synchronous serial channel. A dedicated baud rate generator is used to set up all standard baud rates without oscillator tuning. 3 separate interrupt vectors are provided for transmission, reception, and erroneous reception. In asynchronous mode, 8- or 9-bit data frames are transmitted or received, preceded by a start bit and terminated by one or two stop bits. For multiprocessor communication, a mechanism to distinguish address from data bytes has been included (8-bit data + wake up bit mode). In synchronous mode, the ASC0 transmits or receives bytes (8 bits) synchronously to a shift clock which is generated by the ASC0. The ASC0 always shifts the LSB first. A loop back option is available for testing purposes. A number of optional hardware error detection capabilities have been included to increase the reliability of data transfers. A parity bit can automatically be generated on transmission or be checked on reception. Framing error detection allows to recognize data frames with missing stop bits. An overrun error will be generated, if the last character received has not 7099474 A 29/75 11-Serial Channels ST10F163 Data Sheet been read out of the receive buffer register by the time the reception of a new character is complete. S0BRS = `0', fCPU = 25MHz Baud Rate (Baud) 781250 56000 38400 19200 9600 4800 2400 1200 600 95 Deviation Error 0.0% +7.3% +1.7% +1.7% +0.5% +0.5% +0.2% +0.0% +0.0% +0.4% /-0.4% / -3.1% / -0.8% / -0.8% / -0.1% / -0.1% / -0.1% / -0.1% / 0.4% Reload Value 0000H 000CH / 000DH 0013H / 0014H 0027H / 0028H 0050H/ 0051H 00A1H / 00A2H 0144H / 0145H 028AH / 028BH 0515H / 0516H 1FFFH / 1FFFH Baud Rate (Baud) 520833 56000 38400 19200 9600 4800 2400 1200 600 75 63 S0BRS = `1', fCPU = 25MHz Deviation Error 0.0% +3.3% +4.3% +0.5% +0.5% +0.5% +0.0% +0.0% +0.0% +0.0% +0.9% / -7.0% / -3.1% / -3.1% / -1.4% / -0.5% / -0.5% / -0.2% / -0.1% / 0.0% / 0.9% Reload Value 0000H 0008H / 0009H 000CH / 000DH 001AH / 001BH 0035H / 0036H 006BH / 006CH 00D8H / 00D9H 01B1H / 01B2H 0363H / 0364H 1B1FH / 1B20H 1FFFH / 1FFFH Table 10 Commonly used baud rates by reload value and deviation errors Note The deviation errors given in the table above are rounded. Using a baudrate crystal will provide correct baudrates without deviation errors. 30/75 7099474 A ST10F163 Data Sheet 12-Watchdog Timer SSP: The Synchronous Serial Port provides high-speed serial communication with external slave devices such as EEPROM. The SSP transmits 1...3 bytes or receives 1 byte after sending 1...3 bytes synchronously to a shift clock which is generated by the SSP. The SSP can start shifting with the LSB or with the MSB and is used to select shifting and latching clock edges as well as the clock polarity. Up to two chip select lines may be activated in order to direct data transfers to one or both of two peripheral devices. SSPCKS Value 000 001 010 011 100 101 110 111 SSP clock = CPU clock divided by 2 SSP clock = CPU clock divided by 4 SSP clock = CPU clock divided by 8 SSP clock = CPU clock divided by 16 SSP clock = CPU clock divided by 32 SSP clock = CPU clock divided by 64 SSP clock = CPU clock divided by 128 SSP clock = CPU clock divided by 256 Synchronous baud rate 12.5 MBit/s 6.25 MBit/s 3.13 MBit/s 1.56 MBit/s 781 KBit/s 391 KBit/s 195 KBit/s 97.7 KBit/s Table 11 Synchronous baud rate and SSPCKS reload values 12 Watchdog Timer The Watchdog Timer is a fail-safe mechanism which the maximum malfunction time of the controller The Watchdog Timer is always enabled after a reset of the chip, and can only be disabled in the time interval until the EINIT (end of initialization) instruction has been executed. In this way the chip's start-up procedure is always monitored. The software must be designed to service the Watchdog Timer before it overflows. If, due to hardware or software related failures, the software fails to do so, the Watchdog Timer overflows and generates an internal hardware reset and pulls the RSTOUT pin low in order to allow external hardware components to be reset. The Watchdog Timer is a 16-bit timer, clocked with the system clock divided either by 2 or by 128. The high byte of the Watchdog Timer register can be set to a pre-specified reload value (stored in WDTREL) in order to allow further variation of the monitored time interval. Each time it is serviced by the application software, the high byte of the Watchdog Timer is reloaded. The table below shows the watchdog time range which for a 25MHz CPU clock. Some numbers are rounded to 3 significant digits. 7099474 A 31/75 13-Oscillator Watchdog (OWD) ST10F163 Data Sheet Reload value in WDTREL FFH 00H Prescaler for fCPU 2 (WDTIN = `0') 20.48 s 5.24 ms 128 (WDTIN = `1') 1.31 ms 336 ms Table 12 Watchdog time range for 25MHz CPU clock Note For security, rewrite WDTCON each time before the watchdog timer is serviced. 13 Oscillator Watchdog (OWD) The Oscillator Watchdog (OWD) monitors the clock signal generated by the on-chip oscillator (either with a crystal or via external clock drive). For this operation the PLL provides a clock signal to supervise transitions on the oscillator clock. This PLL clock is independent from the XTAL1 clock. When the expected oscillator clock transitions are missing, the OWD activates the PLL Unlock/OWD interrupt node and supplies the CPU with the PLL clock signal. Under these circumstances the PLL will oscillate with its basic frequency. A low level on pin OWE disables the OWD's interrupt output, so that the clock signal is derived from the oscillator clock. The CPU clock source is only switched back to the oscillator clock after a hardware reset. When the direct-drive, or direct-drive-with-prescaler clock option is selected, an oscillator watchdog is implemented. This provides a fail-safe mechanism in the case of a loss of external clock. After reset, the Oscillator Watchdog is enabled by default. To disable the OWD, the bit OWDDIS (bit 4 of SYSCON register) must be set. When the OWD is enabled, PLL runs on free-running frequency, and increments the Oscillator Watchdog counter. On each transition of XTAL1 pin, the Oscillator Watchdog is cleared. If an external clock failure occurs, then the Oscillator Watchdog counter overflows (after 16 PLL clock cycles). The CPU clock signal is switched to the PLL free-running clock signal, and the Oscillator Watchdog Interrupt Request (XP3INT) is flagged. The CPU clock will not switch back to the external clock even if a valid external clock exits on XTAL1 pin. Only a hardware reset can switch the CPU clock source back to direct clock input. When the OWD is disabled, the CPU clock is always fed from the oscillator input and the PLL is switched off to decrease power supply current. 32/75 7099474 A ST10F163 Data Sheet 14-Instruction Set Summary 14 Instruction Set Summary The table below lists the instruction set of the ST10F163. More detailed information such as address modes, instruction operation, parameters for conditional execution of instructions, opcodes and a detailed description of each instruction can be found in the "ST10 Family Programming Manual" Byte s 2/4 2/4 2/4 2/4 2 2 2 2 2 2/4 2/4 2/4 2 2 4 4 4 4 Mnemonic ADD(B) ADDC(B) SUB(B) SUBC(B) MUL(U) DIV(U) DIVL(U) CPL(B) NEG(B) AND(B) OR(B) XOR(B) BCLR BSET BMOV(N) BAND, BOR, BXOR BCMP BFLDH/L Description Add word (byte) operands Add word (byte) operands with Carry Subtract word (byte) operands Subtract word (byte) operands with Carry (Un)Signed multiply direct GPR by direct GPR (16-16-bit) (Un)Signed divide register MDL by direct GPR (16-/16-bit) (Un)Signed long divide reg. MD by direct GPR (32-/16-bit) Complement direct word (byte) GPR Negate direct word (byte) GPR Bitwise AND, (word/byte operands) Bitwise OR, (word/byte operands) Bitwise XOR, (word/byte operands) Clear direct bit Set direct bit Move (negated) direct bit to direct bit AND/OR/XOR direct bit with direct bit Compare direct bit to direct bit Bitwise modify masked high/low byte of bit-addressable direct word memory with immediate data Compare word (byte) operands CMP(B) 2/4 Table 13 Instruction Set 7099474 A 33/75 14-Instruction Set Summary ST10F163 Data Sheet Mnemonic CMPD1/2 CMPI1/2 PRIOR Description Compare word data to GPR and decrement GPR by 1/2 Compare word data to GPR and increment GPR by 1/2 Determine number of shift cycles to normalize direct word GPR and store result in direct word GPR Shift left/right direct word GPR Rotate left/right direct word GPR Arithmetic (sign bit) shift right direct word GPR Move word (byte) data Move byte operand to word operand with sign extension Move byte operand to word operand. with zero extension Jump absolute/indirect/relative if condition is met Jump absolute to a code segment Jump relative if direct bit is (not) set Jump relative and clear bit if direct bit is set Jump relative and set bit if direct bit is not set Call absolute/indirect/relative subroutine if condition is met Byte s 2/4 2/4 2 SHL / SHR ROL / ROR ASHR MOV(B) MOVBS MOVBZ JMPA, JMPI, JMPR JMPS J(N)B JBC JNBS CALLA, CALLI, CALLR CALLS PCALL 2 2 2 2/4 2/4 2/4 4 4 4 4 4 4 Call absolute subroutine in any code segment Push direct word register onto system stack and call absolute subroutine Call interrupt service routine via immediate trap number Push/pop direct word register onto/from system stack Push direct word register onto system stack and update register with word operand Return from intra-segment subroutine 4 4 TRAP PUSH, POP SCXT 2 2 4 RET 2 Table 13 Instruction Set (Continued) 34/75 7099474 A ST10F163 Data Sheet 14-Instruction Set Summary Mnemonic RETS RETP Description Return from inter-segment subroutine Return from intra-segment subroutine and pop direct word register from system stack Return from interrupt service subroutine Software Reset Enter Idle Mode Enter Power Down Mode (supposes NMI-pin being low) Service Watchdog Timer Disable Watchdog Timer Signify End-of-Initialization on RSTOUT-pin Begin ATOMIC sequence Begin EXTended Register sequence Begin EXTended Page (and Register) sequence Begin EXTended Segment (and Register) sequence Null operation Byte s 2 2 RETI SRST IDLE PWRDN 2 4 4 4 SRVWDT DISWDT EINIT ATOMIC EXTR EXTP(R) EXTS(R) NOP 4 4 4 2 2 2/4 2/4 2 Table 13 Instruction Set (Continued) 7099474 A 35/75 15-Special Function Register Overview ST10F163 Data Sheet 15 Special Function Register Overview The following table lists SFRs in alphabetical order. Bit-addressable SFRs are marked with the letter "b" in column "Name". SFRs within the Extended SFR-Space (ESFRs) are marked with the letter "E" in column "Physical Address". Registers with on-chip X-peripherals (CAN) are marked with the letter "X" in column physical address. An SFR can be specified by its individual mnemonic name. Depending on the selected addressing mode, an SFR can be accessed via its physical address (using the Data Page Pointers), or via its short 8-bit address (without using the Data Page Pointers). Physical Address FE18h FE1Ah FE1Ch FE1Eh b b b b b FF0Ch FF14h FF16h FF18h FF1Ah FE4Ah b b b b b b b b FF88h FF8Ah FF8Ch FF8Eh FF90h FF92h FF94h FF96h FE10h 8-Bit Description Address 0Ch 0Dh 0Eh 0Fh 86h 8Ah 8Bh 8Ch 8Dh 25h C4h C5h C6h C7h C8h C9h CAh CBh 08h Address Select Register 1 Address Select Register 2 Address Select Register 3 Address Select Register 4 Bus Configuration Register 0 Bus Configuration Register 1 Bus Configuration Register 2 Bus Configuration Register 3 Bus Configuration Register 4 GPT2 Capture/Reload Register EX0IN Interrupt Control Register EX1IN Interrupt Control Register EX2IN Interrupt Control Register EX3IN Interrupt Control Register EX4IN Interrupt Control Register EX5IN Interrupt Control Register EX6IN Interrupt Control Register EX7IN Interrupt Control Register CPU Context Pointer Register Reset Value 0000h 0000h 0000h 0000h 0XX0h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h FC00h Name ADDRSEL1 ADDRSEL2 ADDRSEL3 ADDRSEL4 BUSCON0 BUSCON1 BUSCON2 BUSCON3 BUSCON4 CAPREL CC8IC CC9IC CC10IC CC11IC CC12IC CC13IC CC14IC CC15IC CP Table 14 Special Function Register List 36/75 7099474 A ST10F163 Data Sheet 15-Special Function Register Overview Name CRIC CSP DP0L DP0H DP1L DP1H DP2 DP3 DP4 DP6 DPP0 DPP1 DPP2 DPP3 EXICONb IDCHIP IDMANUF IDMEM IDPROG MDC MDH MDL ODP2 ODP3 b b b b b b b b b b b b b Physical Address FF6Ah FE08h F100h F102h F104h F106h FFC2h FFC6h FFCAh FFCEh FE00h FE02h FE04h FE06h F1C0h F07Ch F07Eh F07Ah F078h FF0Eh FE0Ch FE0Eh F1C2h F1C6h E E E E E E E E E E E 8-Bit Description Address B5h 04h 80h 81h 82h 83h E1h E3h E5h E7h 00h 01h 02h 03h E0h 3Eh 3Fh 3Dh 3Ch 87h 06h 07h E1h E3h Reset Value GPT2 CAPREL Interrupt Control Register 0000h CPU Code Segment Pointer Register (read only) P0L Direction Control Register P0h Direction Control Register P1L Direction Control Register P1h Direction Control Register Port 2 Direction Control Register Port 3 Direction Control Register Port 4 Direction Control Register Port 6 Direction Control Register CPU Data Page Pointer 0 Register (10 bits) CPU Data Page Pointer 1 Register (10 bits) CPU Data Page Pointer 2 Register (10 bits) CPU Data Page Pointer 3 Register (10 bits) External Interrupt Control Register Device Identifier Register Manufacturer Identifier Register On-chip Memory Identifier Register Programming Voltage Identifier Register CPU Multiply Divide Control Register 0000h 00h 00h 00h 00h 0000h 0000h 00h 00h 0000h 0001h 0002h 0003h 0000h 0A3Xh1 0400h 3020h 9A40h 0000h CPU Multiply Divide Register - High Word 0000h CPU Multiply Divide Register - Low Word 0000h Port 2 Open Drain Control Register Port 3 Open Drain Control Register 0000h 0000h Table 14 Special Function Register List (Continued) 7099474 A 37/75 15-Special Function Register Overview ST10F163 Data Sheet Name ODP6 ONES P0L P0H P1L P1H P2 P3 P4 P5 P6 PECC0 PECC1 PECC2 PECC3 PECC4 PECC5 PECC6 PECC7 PSW RP0H S0BG S0CON b b b b b b b b b b b b b Physical Address F1CEh FF1Eh FF00h FF02h FF04h FF06h FFC0h FFC4h FFC8h FFA2h FFCCh FEC0h FEC2h FEC4h FEC6h FEC8h FECAh FECCh FECEh FF10h F108h FEB4h FFB0h E E 8-Bit Description Address E7h 8Fh 80h 81h 82h 83h E0h E2h E4h D1h E6h 60h 61h 62h 63h 64h 65h 66h 67h 88h 84h 5Ah D8h Port 6 Open Drain Control Register Constant Value 1's Register (read only) Port 0 Low Register (Lower half of PORT0) Port 0 High Register (Upper half of PORT0) Port 1 Low Register (Lower half of PORT1) Port 1 High Register (Upper half of PORT1) Port 2 Register Port 3 Register Port 4 Register (8 bits) Port 5 Register (read only) Port 6 Register (8 bits) PEC Channel 0 Control Register PEC Channel 1 Control Register PEC Channel 2 Control Register PEC Channel 3 Control Register PEC Channel 4 Control Register PEC Channel 5 Control Register PEC Channel 6 Control Register PEC Channel 7 Control Register CPU Program Status Word System Start-up Configuration Register (Rd. only) Serial Channel 0 Baud Rate Generator Reload Reg Serial Channel 0 Control Register Reset Value 00h FFFFh 00h 00h 00h 00h 0000h 0000h 00h XXXXh 00h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h XXh 0000h 0000h Table 14 Special Function Register List (Continued) 38/75 7099474 A ST10F163 Data Sheet 15-Special Function Register Overview Name S0EIC S0RBUF S0RIC S0TBIC S0TBUF S0TIC SP SSPCON0 SSPCON1 SSPRTB SSPTBH STKOV STKUN SYSCON T2 T2CON T2IC T3 T3CON T3IC T4 T4CON T4IC b b b b b b b b b b b Physical Address FF70h FEB2h FF6Eh F19Ch FEB0h FF6Ch FE12h EF00h EF02h EF04h EF06h FE14h FE16h FF12h FE40h FF40h FF60h FE42h FF42h FF62h FE44h FF44h FF64h X X X X E 8-Bit Description Address B8h 59h B7h CEh 58h B6h 09h --------0Ah 0Bh 89h 20h A0h B0h 21h A1h B1h 22h A2h B2h Serial Channel 0 Error Interrupt Control Register Reset Value 0000h Serial Channel 0 Receive Buffer Register XXh (read only) Serial Channel 0 Receive Interrupt Control Register 0000h Serial Channel 0 Transmit Buffer Interrupt 0000h Control Reg Serial Channel 0 Transmit Buffer Register 00h (write only) Serial Channel 0 Transmit Interrupt Control Register CPU System Stack Pointer Register SSP Control Register 0 SSP Control Register 1 SSP Receive/Transmit Buffer SSP Transmit Buffer High CPU Stack Overflow Pointer Register CPU Stack Underflow Pointer Register CPU System Configuration Register GPT1 Timer 2 Register GPT1 Timer 2 Control Register GPT1 Timer 2 Interrupt Control Register GPT1 Timer 3 Register GPT1 Timer 3 Control Register GPT1 Timer 3 Interrupt Control Register GPT1 Timer 4 Register GPT1 Timer 4 Control Register GPT1 Timer 4 Interrupt Control Register 0000h FC00h 0000h 0000h XXXXh XXXXh FA00h FC00h 0xx0h2 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h Table 14 Special Function Register List (Continued) 7099474 A 39/75 15-Special Function Register Overview ST10F163 Data Sheet Name T5 T5CON T5IC T6 T6CON T6IC TFR WDT WDTCON XP1IC XP3IC ZEROS b b b b b b b b Physical Address FE46h FF46h FF66h FE48h FF48h FF68h FFACh FEAEh FFAEh F18Eh F19Eh FF1Ch E E 8-Bit Description Address 23h A3h B3h 24h A4h B4h D6h 57h D7h C7h CFh 8Eh GPT2 Timer 5 Register GPT2 Timer 5 Control Register GPT2 Timer 5 Interrupt Control Register GPT2 Timer 6 Register GPT2 Timer 6 Control Register GPT2 Timer 6 Interrupt Control Register Trap Flag Register Watchdog Timer Register (read only) Watchdog Timer Control Register SSP Interrupt Control Register PLL unlock Interrupt Control Register Constant Value 0's Register (read only) Reset Value 0000h 0000h 0000h 0000h 0000h 0000h 0000h 0000h 000xh3 0000h 0000h 0000h Table 14 Special Function Register List (Continued) 1. The value depends on the silicon revision and is given in the errata sheet. 2. The system configuration is selected during reset. 3. Bit WDTR indicates a watchdog timer triggered reset. 40/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics 16 Electrical Characteristics 16.1 Absolute maximum ratings * Ambient temperature under bias (TA): ............................................................ 0 to +70 C * Storage temperature (TST):....................................................................... - 65 to +150 C * Voltage on VDD pins with respect to ground (VSS): .................................... - 0.5 to +6.5 V * Voltage on any pin with respect to ground (VSS): ................................ -0.5 to VDD +0.5 V * Input current on any pin during overload condition: .................................. -10 to +10 mA * Absolute sum of all input currents during overload condition: .............................|100 mA| * Power dissipation:.................................................................................................... 1.5 W Note Stresses above those listed under "Absolute Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operational sections of this specification is not guaranteed. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. During overload conditions (VIN>VDD or VIN The parameters listed in the Electrical Characteristics tables, Table 15 to Table 18, give the characteristics of the ST10F163 and its demands on the system. Where the ST10F163 logic provides signals with their respective timing characteristics, the symbol "CC" for Controller Characteristics, is included in the "Symbol" column. Where the external system must provide signals with their respective timing characteristics, to the ST10F163, the symbol "SR" for System Requirement, is included in the "Symbol" column. 7099474 A 41/75 16-Electrical Characteristics ST10F163 Data Sheet 16.3 DC characteristics VDD = 5 V 10% VSS = 0 V Reset active TA = 0 to +70C Limit Values Parameter Symbol min. Input low voltage VIL VIH VIH1 VIH2 VOL SR - 0.5 max. 0.2 VDD - 0.1 VDD + 0.5 VDD + 0.5 VDD + 0.5 0.45 V - Unit Test Condition Input high voltage (all except RSTIN and XTAL1) Input high voltage RSTIN Input high voltage XTAL1 Output low voltage1 (PORT0, PORT1, Port 4, ALE, RD, WR, BHE, CLKOUT, RSTOUT) SR 0.2 VDD + 0.9 SR 0.6 VDD SR 0.7 VDD CC - V - V V V - - IOL = 2.4 mA Output low voltage1 (all other outputs) Output high voltage 1 (PORT0, PORT1, Port 4, ALE, RD, WR, BHE, CLKOUT, RSTOUT) VOL1 VOH CC - 0.45 V IOL1 = 1.6 mA IOH = - 500 A IOH = -2.4 mA IOH = - 250 A IOH = - 1.6 mA 0 V < VIN < VDD - VOUT = 2.4 V VOUT = VOLmax VOUT = VOLmax VOUT = 2.4 V VOUT = 2.4 V VOUT = VOL1max CC 0.9 VDD 2.4 CC 0.9 VDD 2.4 CC - CC 50 - -500 40 - - -500 - V Output high voltage 1 2 (all other outputs) Input leakage current (all other) RSTIN pull-up resistor 3 Read/Write inactive current 4 Read/Write active current 4 ALE inactive current 4 ALE active current 4 Port 6 inactive current 4 Port 6 active current4 VOH1 IOZ2 RRST IRWH 5 IRWL 6 IALEL 5 IALEH 6 IP6H 5 IP6L 6 - 1 250 -40 - - 500 -40 - V V A K A A A A A A Table 15 DC characteristics 42/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics Limit Values Parameter Symbol min. PORT0 configuration current 4 IP0H 5 IP0L 6 XTAL1 input current Pin capacitance 4 (digital inputs/outputs) Power supply current IIL CIO ICC - -100 CC - CC - max. -10 - 20 10 A A A pF VIN = VIHmin VIN = VILmax 0 V < VIN < VDD f = 1 MHz TA = 25 C RSTIN = VIL2 fCPU in [MHz] 7 mA RSTIN = VIH1 fCPU in [MHz] 8 A VDD = 5.5 V9 Unit Test Condition - 20 + 3.5 * fCPU 10 + 1.2 * fCPU 50 mA Idle mode supply current IID - Power-down mode supply current IPD - Table 15 DC characteristics 1. ST10F163 pins are equipped with Low-Noise output drivers, which significantly improve the device's EMI performance. These Low-Noise drivers deliver their maximum current only until the respective target output level is reached. After that, the output current is reduced. This results in an increased impedance of the driver, which attenuates electrical noise from the connected PCB tracks. The current specified in column "Test Conditions" is delivered in any case. 2. This specification is not valid for outputs which are switched to open drain mode. In this case the respective output will float and the voltage results from the external circuitry. 3. Not 100% tested, guaranteed by design characterization. 4. This specification is only valid during Reset, or during Hold- or Adapt-mode. Port 6 pins are only affected, if they are used for CS output and the open drain function is not enabled. 5. The maximum current may be drawn while the respective signal line remains inactive. 6. The minimum current must be drawn in order to drive the respective signal line active. 7. The power supply current is a function of the operating frequency. This dependency is illustrated in the figure below. These parameters are tested at VDDmax and 25 MHz CPU clock with all outputs disconnected and all inputs at VIL or VIH. The chip is configured with a demux 16-bit bus, direct clock drive, 5 chip select lines and 2 segment address lines, EA pin is low during reset. After reset, Port0 is driven with the value `00CCh' that produces infinite execution of NOP instruction with 15 wait-state, R/W delay, memory tristate waitstate, normal ALE. Peripherals are not activated. 7099474 A 43/75 16-Electrical Characteristics ST10F163 Data Sheet 8. Idle mode supply current is a function of the operating frequency. This dependency is illustrated in the figure below. These parameters are tested at VDDmax and 25 MHz CPU clock with all outputs disconnected and all inputs at VIL or VIH. 9. This parameter is tested including leakage currents. All inputs (including pins configured as inputs) at 0 V to 0.1 V or at VDD - 0.1 V to VDD, VREF = 0 V, all outputs (including pins configured as outputs) disconnected. I [mA] 100 ICCmax 50 IIDmax 10 5 10 15 20 25 fCPU [MHz] Figure 8 Supply/idle current as a function of operating frequency 44/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics 16.4 AC characteristics 16.4.1 Test waveforms 2.4V 0.2VDD+0.9 Test Points 0.2VDD+0.9 0.45V 0.2VDD-0.1 0.2VDD-0.1 AC inputs during testing are driven at 2.4 V for a logic `1' and 0.4 V for a logic `0'. Timing measurements are made at VIH min for a logic `1' and VIL max for a logic `0'. Figure 9 Input/output waveforms VOH VLoad +0.1V VLoad VLoad -0.1V VOH -0.1V Timing Reference Points VOL +0.1V VOL For timing purposes a port pin is no longer floating when a 100 mV change from load voltage occurs, but begins to float when a 100 mV change from the loaded VOH/VOL level occurs (IOH/IOL = 20 mA). Figure 10 Float waveforms 16.4.2 Definition of internal timing The internal operation of the ST10F163 is controlled by the internal CPU clock fCPU. Both edges of the CPU clock can trigger internal (e.g. pipeline) or external (e.g. bus cycles) operations. The specification of the external timing (AC Characteristics) therefore depends on the time between two consecutive edges of the CPU clock, called "TCL" (see figure below). The CPU clock signal can be generated by different mechanisms. The duration of TCLs and their variation (and also the derived external timing) depends on the used mechanism to 7099474 A 45/75 16-Electrical Characteristics ST10F163 Data Sheet generate fCPU. This influence must be regarded when calculating the timings for the ST10F163. The example for PLL operation shown in the figure above refers to a PLL factor of 4. The mechanism used to generate the CPU clock is selected during reset by the logic levels on pins P0.15-13 (P0H.7-5). Phase locked loop operation fXTAL fCPU TCL TCL Direct Clock Drive fXTAL fCPU TCL TCL Prescaler Operation fXTAL fCPU TCL TCL Figure 11 Generation mechanisms for the CPU clock 46/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics 16.4.3 Clock generation modes The table below associates the combinations of these three bits with the respective clock generation mode. P0.15-13 (P0H.7-5) 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 CPU Frequency fCPU = fXTAL * F FXTAL * 4 FXTAL * 3 FXTAL * 2 FXTAL * 5 FXTAL * 1 FXTAL * 1.5 FXTAL / 2 FXTAL * 2.5 External Clock Input Range1 2.5 to 6.25 MHz 3.33 to 8.33 MHz 5 to 12.5 MHz 2 to 5 MHz 1 to 25 MHz 6.66 to 16.6 MHz 2 to 50 MHz 4 to 10 MHz CPU clock via prescaler3 Direct drive 2 Notes Default configuration 1. The external clock input range refers to a CPU clock range of 1...25 MHz. 2. The maximum depends on the duty cycle of the external clock signal. 3. The maximum input frequency is 25 MHz when using an external crystal with the internal oscillator; providing that internal serial resistance of the crystal is less than 40 . However, higher frequency can be applied with an external clock source, but in this case, the input clock signal must reach the defined levels VIL and VIH2. 16.4.4 Prescaler operation When pins P0.15-13 (P0H.7-5) equal '001' during reset, the CPU clock is derived from the internal oscillator (input clock signal) by a 2:1 prescaler. The frequency of fCPU is half the frequency of fXTAL and the high and low time of fCPU (i.e. the duration of an individual TCL) is defined by the period of the input clock fXTAL. The timings listed in the AC Characteristics that refer to TCLs therefore can be calculated using the period of fXTAL for any TCL. Note that if the bit OWDDIS in SYSCON register is cleared, the PLL is running on its free-running frequency and delivers the clock signal for the Oscillator Watchdog. If bit OWDDIS is set, then the PLL is switched off. 7099474 A 47/75 16-Electrical Characteristics ST10F163 Data Sheet 16.4.5 Direct drive When pins P0.15-13 (P0H.7-5) equal'011' during reset the on-chip phase locked loop is disabled and the CPU clock is directly driven from the internal oscillator with the input clock signal. The frequency of fCPU directly follows the frequency of fXTAL so the high and low time of fCPU (i.e. the duration of an individual TCL) is defined by the duty cycle of the input clock fXTAL. The timings listed below that refer to TCLs therefore must be calculated using the minimum TCL that is possible under the respective circumstances. This minimum value can be calculated by the following formula: TCL min = 1 f XTAL *DC min DC = duty cycle For two consecutive TCLs the deviation caused by the duty cycle of fXTAL is compensated so the duration of 2TCL is always 1/fXTAL. The minimum value TCLmin therefore has to be used only once for timings that require an odd number of TCLs (1,3,...). Timings that require an even number of TCLs (2,4,...) may use the formula: 2TCL = 1 f XTAL Note The address float timings in Multiplexed bus mode (t11 and t45) use the maximum duration of TCL (TCLmax = 1/fXTAL * DCmax) instead of TCLmin. If bit OWDDIS in the SYSCON register is cleared, the PLL runs on its free-running frequency and delivers the clock signal for the Oscillator Watchdog. If bit OWDDIS is set, then the PLL is switched off. 16.4.6 Oscillator Watchdog (OWD) When the clock option selected is direct drive or direct drive with prescaler, in order to provide a fail safe mechanism in case of a loss of the external clock, an oscillator watchdog is implemented as an additional functionality of the PLL circuitry. This oscillator watchdog operates as follows: After a reset, the Oscillator Watchdog is enabled by default. To disable the OWD, the bit OWDDIS (bit 4 of SYSCON register) must be set. When the OWD is enabled, the PLL is running on its free-running frequency, and increment the Oscillator Watchdog counter. On each transition of XTAL1 pin, the Oscillator Watchdog is cleared. If an external clock failure occurs, then the Oscillator Watchdog counter overflows (after 16 PLL clock cycles). The CPU clock signal will be switched to the PLL free-running clock signal, and the Oscillator Watchdog Interrupt Request (XP3INT) is flagged. The CPU 48/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics clock will not switch back to the external clock even if a valid external clock exits on XTAL1 pin. Only a hardware reset can switch the CPU clock source back to direct clock input. When the OWD is disabled, the CPU clock is always fed from the oscillator input and the PLL is switched off to decrease power supply current. 16.4.7 Phase locked loop For all other combinations of pins P0.15-13 (P0H.7-5) during reset the on-chip phase locked loop is enabled and provides the CPU clock (see table above). The PLL multiplies the input frequency by the factor F which is selected via the combination of pins P0.15-13 (i.e. fCPU = fXTAL * F). With every F'th transition of fXTAL the PLL circuit synchronizes the CPU clock to the input clock. This synchronization is done smoothly, i.e. the CPU clock frequency does not change abruptly. Due to this adaptation to the input clock the frequency of fCPU is constantly adjusted so it is locked to fXTAL. The slight variation causes a jitter of fCPU which also effects the duration of individual TCLs. The timings listed in the AC Characteristics that refer to TCLs therefore must be calculated using the minimum TCL that is possible under the respective circumstances. The actual minimum value for TCL depends on the jitter of the PLL. As the PLL is constantly adjusting its output frequency so it corresponds to the applied input frequency (crystal or oscillator) the relative deviation for periods of more than one TCL is lower than for one single TCL (see formula and figure below). For a period of N * TCL the minimum value is computed using the corresponding deviation D N: TCL min = TCL NOM * ( 1 - lD N l 100 ) D N = ( 4 - N 15 ) [ % ] where N = number of consecutive TCLs and 1 N 40. So for a period of 3 TCLs (N = 3): D 3 = 4 - 3 15 = 3.8% 3TCL min = 3TCL NOM x ( 1 - 3.8 100 ) = TCL NOM x 0.962 ( 57.72nsec@f CPU = 25MHz ) This is especially important for bus cycles using waitstates and e.g. for the operation of timers, serial interfaces, etc. For all slower operations and longer periods (e.g. pulse train 7099474 A 49/75 16-Electrical Characteristics ST10F163 Data Sheet generation or measurement, lower baudrates, etc.) the deviation caused by the PLL jitter is negligible. Max.jitter [%] This approximated formula is valid for N 40 and 10MHz fCPU 25MHz. 1 << < < 4 3 2 1 2 4 8 16 32 N Figure 12 Approximated maximum PLL jitter 16.4.8 Memory cycle variables The tables below use three variables which are derived from the BUSCONx registers and represent the special characteristics of the programmed memory cycle. The following table describes, how these variables are to be computed. Description ALE Extension Memory Cycle Time Waitstates Memory Tristate Time Symbol tA tC tF Values TCL * 50/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics 16.4.9 External clock drive XTAL1 VDD = 5 V 10% VSS = 0 V TA = 0 to +70 C fCPU = fXTAL Parameter Symbol min Oscillator period High time Low time Rise time Fall time tOSC t1 t2 t3 t4 SR SR SR SR SR fCPU = fXTAL / 2 min 20 62) 62) - - max 500 - - 63) 62) fCPU = fXTAL * N N = 1.5/2,/2.5/3/4/5 min 40 * N 102 102 - - max 100 * N - - 102 102 ns ns ns ns ns Unit max 1000 - - 102 102 401 182 182 - - 1. Theoretical minimum. The real minimum value depends on the duty cycle of the input clock signal. 2. The input clock signal must reach the defined levels VIL and VIH2. t1 t3 t4 VIH2 t2 VIL tOSC Figure 13 External clock drive XTAL1 7099474 A 51/75 16-Electrical Characteristics ST10F163 Data Sheet 16.4.10 Multiplexed bus VDD = 5 V 10% VSS = 0 V TA = 0 to +70C CL = 100 pF ALE cycle time = 6 TCL + 2tA + tC + tF (120 ns at 25-MHz CPU clock without waitstates) Parameter Symbol Max. CPU Clock 25 MHz min. max. - - - - - 6 26 - - 20 + tC 40 + tC 40 + tA + tC 50 + 2tA + tC - Variable CPU Clock 1/2TCL = 1 to 25MHz min. TCL - 10 + tA TCL - 16+ tA TCL - 10 + tA TCL - 10 + tA -10 + tA - - 2TCL - 10 + tC 3TCL - 10 + tC - - - max. - - - - - 6 TCL + 6 - - 2TCL - 20+ tC 3TCL - 20+ tC 3TCL - 20 + tA + tC 4TCL - 30 + 2tA + tC - Unit ns ns ns ns ns ns ns ns ns ns ns ns ns ns ALE high time Address setup to ALE t5 t6 CC 10 + tA CC 4 + tA CC 10 + tA CC 10 + tA CC -10 + tA CC - CC - CC 30 + tC CC 50 + tC SR - SR - SR - Address hold after ALE t7 ALE falling edge to RD, t8 WR (with RW-delay) ALE falling edge to RD, t9 WR (no RW-delay) Address float after RD, t10 WR (with RW-delay) Address float after RD, t11 WR (no RW-delay) RD, WR low time (with RW-delay) RD, WR low time (no RW-delay) RD to valid data in (with RW-delay) RD to valid data in (no RW-delay) t12 t13 t14 t15 ALE low to valid data in t16 Address/Unlatched CS t17 to valid data in Data hold after RD rising edge t18 SR - - SR 0 0 Table 16 Multiplexed bus characteristics 52/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics Parameter Symbol Max. CPU Clock 25 MHz min. max. 26 + tF - - - - 10 - tA 40 + tC + 2tA - - - 0 Variable CPU Clock 1/2TCL = 1 to 25MHz min. - 2TCL - 20 + tC 2TCL - 14 + tF 2TCL - 14 + tF 2TCL - 14 + tF -4 - tA - max. 2TCL - 14 + tF - - - - 10 - tA 3TCL - 20 + tC + 2tA - - - 0 Unit ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns 53/75 Data float after RD Data valid to WR Data hold after WR ALE rising edge after RD, WR t19 t22 t23 t25 SR - CC 20 + tC CC 26 + tF CC 26 + tF CC 26 + tF CC -4 - tA SR - Address/Unlatched CS t27 hold after RD, WR ALE falling edge to Latched CS t38 Latched CS low to Valid t39 Data In Latched CS hold after RD, WR t40 CC 46 + tF CC 16 + tA CC -4 + tA CC - 3TCL - 14 + tF TCL - 4 + tA -4 + tA - ALE fall. edge to RdCS, t42 WrCS (with RW delay) ALE fall. edge to RdCS, t43 WrCS (no RW delay) Address float after t44 RdCS, WrCS (with RW delay) Address float after RdCS, WrCS (no RW delay) RdCS to Valid Data In (with RW delay) RdCS to Valid Data In (no RW delay) t45 CC - 20 - TCL t46 t47 SR - SR - CC 30 + tC CC 50 + tC 16 + tC 36 + tC - - - - 2TCL - 10 + tC 3TCL - 10 + tC 2TCL - 24 + tC 3TCL - 24 + tC - - RdCS, WrCS Low Time t48 (with RW delay) RdCS, WrCS Low Time t49 (no RW delay) Table 16 Multiplexed bus characteristics 7099474 A 16-Electrical Characteristics ST10F163 Data Sheet Parameter Symbol Max. CPU Clock 25 MHz min. max. - - 20 + tF - - Variable CPU Clock 1/2TCL = 1 to 25MHz min. 2TCL - 14+ tC 0 - 2TCL - 20 + tF 2TCL - 20 + tF max. - - 2TCL - 20 + tF - - Unit ns ns ns ns ns Data valid to WrCS Data hold after RdCS Data float after RdCS Address hold after RdCS, WrCS Data hold after WrCS t50 t51 t52 t54 t56 CC 26 + tC SR 0 SR - CC 20 + tF CC 20 + tF Table 16 Multiplexed bus characteristics 54/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics CLKOUT t5 ALE t16 t25 t6 CSx t38 t17 t40 t39 t27 t6 A23-A16 (A15-A8) BHE t17 Address t27 t16 Read Cycle BUS P0 t6m Address t7 t18 Data In Address t8 RD t10 t14 t12 t19 t13 t9 Write Cycle BUS P0 Address t11 t15 Data Out t23 t8 WR, WRL, WRH t22 t12 t13 t9 Figure 14 External Memory Cycle: multiplexed bus, with/without read/write delay, normal ALE 7099474 A 55/75 16-Electrical Characteristics ST10F163 Data Sheet CLKOUT t5 ALE t16 t25 t6 t38 t17 t39 t27 t40 CSx t6 A23-A16 (A15-A8) BHE Read Cycle t17 Address t27 t6 BUS P0 Address t7 Data In t8 t9 RD t10 t11 t14 t15 t12 t18 t19 Write Cycle BUS P0 Address t13 Data Out t23 t8 t9 WR WRL, WRH t10 t11 t22 t13 t12 Figure 15 External Memory Cycle: multiplexed bus, with/without read/write delay, extended ALE 56/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics CLKOUT t5 ALE t16 t25 t6 A23-A16 (A15-A8) BHE t17 Address t27 t16 Read Cycle BUS P0 t6 Address t7 t51 Data In Address t42 RdCSx t44 t46 t48 t52 t49 t43 Write Cycle BUS P0 Address t45 t47 Data Out t56 t42 WrCSx t50 t48 t49 t43 Figure 16 External Memory Cycle: multiplexed bus, with/without read/write delay, normal ale, read/write chip select 7099474 A 57/75 16-Electrical Characteristics ST10F163 Data Sheet CLKOUT t5 ALE t16 t25 A23-A16 (A15-A8) BHE t6 t17 Address t54 Read Cycle t6 BUS P0 Address t7 Data In t42 t43 RdCSx t44 t45 t46 t48 t47 t49 t18 t19 Write Cycle BUS P0 Address Data Out t42 t43 WR WRL, WRH t44 t45 t50 t56 t48 t49 Figure 17 External Memory Cycle: multiplexed bus, with/without read/write delay, extended ale, read/write chip select 58/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics 16.4.11 Demultiplexed bus VDD = 5 V 10% VSS = 0 V TA = 0 to +70 C CL = 100 pF ALE cycle time = 4 TCL + 2tA + tC + tF (80 ns at 25 MHz CPU clock without waitstates) Parameter Symbol Max. CPU Clock = 25MHz min. max. - - - Variable CPU Clock 1/2TCL = 1 to 25MHz min. TCL - 10+ tA TCL - 16+ tA 2TCL - 10 + 2tA max. - - - Unit ns ns ns ns ns ns ns ns ns ns 1 ALE high time Address setup to ALE Address/Unlatched CS setup to RD, WR (with RW-delay) Address/Unlatched CS setup to RD, WR (no RW-delay) RD, WR low time (with RW-delay) RD, WR low time (no RW-delay) RD to valid data in (with RW-delay) RD to valid data in (no RW-delay) ALE low to valid data in t5 t6 t80 CC 10 + tA CC 4 + tA CC 30 + 2tA t81 CC 10 + 2tA - TCL -10 + 2tA - t12 t13 t14 t15 t16 CC 30 + tC CC 50 + tC SR - SR - SR - - - 20 + tC 40 + tC 2TCL - 10 + tC - 3TCL - 10 + tC - - - 2TCL - 20 + tC ns 3TCL - 20 + tC ns 3TCL - 20 + tA + tC 4TCL - 30 + 2tA + tC - 2TCL - 14 + tF + 2tA 40 + tA + tC - 50 + 2tA + tC - 26 + tF - Address/Unlatched CS to t17 valid data in Data hold after RD rising edge Data float after RD rising edge (with RW-delay1) t21 t18 t20 SR - SR 0 SR - 0 - Data float after RD rising edge (no RW-delay1) SR - 10 + tF - TCL - 10 + tF + 2tA 1 ns Table 17 Demultiplexed bus characteristics 7099474 A 59/75 16-Electrical Characteristics ST10F163 Data Sheet Parameter Symbol Max. CPU Clock = 25MHz min. max. - - - - Variable CPU Clock 1/2TCL = 1 to 25MHz min. max. Unit ns ns ns ns ns ns ns ns ns ns ns ns ns Data valid to WR Data hold after WR t22 t24 CC 20 + tC CC 10 + tF CC -10 + tF CC 0 + tF CC -4 - tA SR - 2TCL- 20 + tC - TCL - 10+ tF -10 + tF 0 + tF -4 - tA - - - - ALE rising edge after RD, t26 WR Address/Unlatched CS hold after RD, WR 2 t28 t38 t39 ALE falling edge to Latched CS Latched CS low to Valid Data In 10 - tA 40 + tC+ 2tA - - 10 - tA 3TCL - 20 + tC + 2tA - - Latched CS hold after RD, t41 WR Address setup to RdCS, WrCS (with RW-delay) Address setup to RdCS, WrCS (no RW-delay) RdCS to Valid Data In (with RW-delay) RdCS to Valid Data In (no RW-delay) RdCS, WrCS Low Time (with RW-delay) RdCS, WrCS Low Time (no RW-delay) Data valid to WrCS Data hold after RdCS Data float after RdCS (with RW-delay) t82 CC 6 + tF CC 26 + 2tA TCL - 14 + tF 2TCL - 14 + 2tA t83 CC 6 + 2tA - TCL -14 + 2tA - t46 t47 t48 t49 t50 t51 t53 SR - SR - CC 30 + tC CC 50 + tC CC 26 + tC SR 0 SR - 16 + tC 36 + tC - - - - 20 + tF - - 2TCL - 24 + tC ns 3TCL - 24 + tC ns 2TCL - 10 + tC - 3TCL - 10 + tC - 2TCL - 14 + tC - 0 - - 2TCL - 20 + tF ns Table 17 Demultiplexed bus characteristics 60/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics Parameter Symbol Max. CPU Clock = 25MHz min. max. 0 + tF - - Variable CPU Clock 1/2TCL = 1 to 25MHz min. - -10 + tF TCL - 14 + tF max. TCL - 20 + tF - - Unit ns ns ns 61/75 Data float after RdCS (no RW-delay) Address hold after RdCS, WrCS Data hold after WrCS t68 t55 t57 SR - CC -10 + tF CC 6 + tF Table 17 Demultiplexed bus characteristics 1. RW-delay and tA refer to the following bus cycle. 2. Read data are latched with the same clock edge that triggers the address change and the rising RD edge. Therefore address changes before the end of RD have no impact on read cycles 7099474 A 16-Electrical Characteristics ST10F163 Data Sheet CLKOUT t5 ALE t16 t26 t6 t38 CSx t17 t39 t41 t41u t6 A23-A16 (A15-A8) BHE Read Cycle P0 BUS (D15-D8) D7-D0 t17 Address t28 t18 Data In t80 t81 t14 t15 t21 t20 RD t12 t13 Write Cycle P0 BUS (D15-D8) D7-D0 Data Out t80 t81 t22 t24 WR(L), WRH t12 t13 Figure 18 External Memory Cycle: demultiplexed bus, with/without read/write delay, normal ALE 62/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics CLKOUT t5 ALE t16 t26 t6 t38 t17 CSx A23-A16 (A15-A8) BHE t41 t39 t28 t6 t17 Address t28 Read Cycle P0 BUS (D15-D8) D7-D0 t18 Data In t80 t81 RD t14 t15 t21 t20 t12 t13 Write Cycle P0 BUS (D15-D8) D7-D0 Data Out t80 t81 t22 t24 WR(L), WRH t12 t13 Figure 19 External Memory Cycle: demultiplexed bus, with/without read/write delay, extended ALE 7099474 A 63/75 16-Electrical Characteristics ST10F163 Data Sheet CLKOUT t5 ALE t16 t26 t6 A23-A16 (A15-A8) BHE Read Cycle P0 BUS (D15-D8) D7-D0 t17 Address t55 t51 Data In t82 t83 t46 t47 t53 t68 RdCsx t48 t49 Write Cycle P0 BUS (D15-D8) D7-D0 Data Out t82 t83 t50 t57 WrCSx t48 t49 Figure 20 External Memory Cycle: demultiplexed bus, with/without read/write delay, normal ale, read/write chip select 64/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics CLKOUT t5 ALE A23-A16 (A15-A8) BHE t16 t26 t6 t17 Address t55 Read Cycle P0 BUS (D15-D8) D7-D0 t51 Data In t82 t83 RdCSx t46 t47 t68 t53 t48 t49 Write Cycle P0 BUS (D15-D8) D7-D0 Data Out t82 t83 t50 t57 WrCSx t48 t49 Figure 21 External Memory Cycle: demultiplexed bus, no read/write delay, extended ale, read/write chip select 7099474 A 65/75 16-Electrical Characteristics ST10F163 Data Sheet 16.4.12 CLKOUT and READY VDD = 5 V 10% VSS = 0 V TA = 0 to +70 C CL = 100 pF Parameter Symbol Max. CPU Clock = 25MHz min. max. 40 - - 4 4 10 + tA - - - - Variable CPU Clock 1/2TCL = 1 to 25MHz min. 2TCL TCL - 6 TCL - 10 - - 0 + tA 14 4 2TCL + 18 14 max. 2TCL - - 4 4 10 + tA - - - - Unit ns ns ns ns ns ns ns ns ns ns ns CLKOUT cycle time CLKOUT high time CLKOUT low time CLKOUT rise time CLKOUT fall time CLKOUT rising edge to ALE falling edge Synchronous READY setup time to CLKOUT Synchronous READY hold time after CLKOUT Asynchronous READY low time Asynchronous READY setup time 1 t29 t30 t31 t32 t33 t34 t35 t36 t37 t58 t59 CC CC CC CC CC CC SR SR SR SR 40 14 10 - - 0 + tA 14 4 58 14 Asynchronous READY hold time 1 SR 4 - 4 - Async. READY hold time t60 after RD, WR high (Demultiplexed Bus) 2 SR 0 0 + 2tA + tC + 0 tF 2 TCL - 20 + 2tA ns + tC + tF 2 Table 18 CLKOUT and READY characteristics 1. These timings are given for test purposes only, in order to assure recognition at a specific clock edge. 2. Demultiplexed bus is the worst case. For multiplexed bus 2TCL are to be added to the maximum values. This adds even more time for deactivating READY. The 2tA and tC refer to the next following bus cycle, tF refers to the current bus cycle 66/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics Running cycle 1) READY waitstate MUX/Tristate 6) t32 CLKOUT t33 t30 t34 t31 t29 ALE 7) Command RD, WR 2) t35 Sync t36 t35 3) t36 READY t58 Async 3) t59 3) t58 3) t59 t604) READY t37 5) see 6) Figure 22 CLKOUT and READY 1 2 3 4 5 Cycle as programmed, including MCTC waitstates (Example shows 0 MCTC WS). The leading edge of the respective command depends on RW-delay. READY sampled HIGH at this sampling point generates a READY controlled waitstate, READY sampled LOW at this sampling point terminates the currently running bus cycle. READY may be deactivated in response to the trailing (rising) edge of the corresponding command (RD or WR). If the Asynchronous READY signal does not fulfill the indicated setup and hold times with respect to CLKOUT (e.g. because CLKOUT is not enabled), it must fulfill t 37 in order to be safely synchronized. This is guaranteed, if READY is removed in response to the command (see Note 4)). Multiplexed bus modes have a MUX waitstate added after a bus cycle, and an additional MTTC waitstate may be inserted here. For a multiplexed bus with MTTC waitstate this delay is 2 CLKOUT cycles, for a demultiplexed bus without MTTC waitstate this delay is zero. The next external bus cycle may start here. 7099474 A 6 7 67/75 16-Electrical Characteristics ST10F163 Data Sheet 16.4.13 External bus arbitration VDD = 5 V 10% CL (for Port 6, CS) = 100 pF VSS = 0 V TA = 0 to +70 C CL (for PORT0, PORT1, Port 4, ALE, RD, WR, BHE, CLKOUT) = 100 pF Parameter Symbol Max. CPU Clock = 25MHz min. max. - Variable CPU Clock 1/2TCL = 1 to 25MHz min. 20 max. - Unit ns ns ns ns ns ns ns HOLD input setup time to CLKOUT CLKOUT to HLDA high or BREQ low delay CLKOUT to HLDA low or BREQ high delay CSx release CSx drive Other signals release Other signals drive t61 t62 t63 t64 t65 t66 t67 SR 20 CC - 20 - 20 CC - 20 - 20 CC CC CC CC - -4 - -4 20 24 20 24 - -4 - -4 20 24 20 24 68/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics CLKOUT t61 HOLD t63 HLDA 1) t62 BREQ t64 3) 2) CSx (On P6.x) t66 Other Signals 1) Figure 23 External bus arbitration, releasing the bus 1 2 3 The ST10F163 will complete the currently running bus cycle before granting bus access. This is the first possibility for BREQ to get active. The CS outputs will be resistive high (pullup) after t64. 7099474 A 69/75 16-Electrical Characteristics ST10F163 Data Sheet CLKOUT 2) t61 HOLD t62 HLDA t62 BREQ t62 1) t63 t65 CSx (On P6.x) t67 Other Signals Figure 24 External bus arbitration, (regaining the bus) 1 This is the last chance for BREQ to trigger the indicated regain-sequence. Even if BREQ is activated earlier, the regain-sequence is initiated by HOLD going high. Please note that HOLD may also be deactivated without the ST10F163 requesting the bus. The next ST10F163 driven bus cycle may start here. 2 70/75 7099474 A ST10F163 Data Sheet 16-Electrical Characteristics 16.4.14 Synchronous serial port timing VCC = 5 V 10% VSS = 0 V TA = 0 to +70 C Max. Baudrate Parameter Symbol = 12.5 / 10 MBd min. SSP clock cycle time SSP clock high time SSP clock low time SSP clock rise time SSP clock fall time CE active before shift edge CE inactive after latch edge Write data valid after shift edge Write data hold after shift edge Write data hold after latch edge Read data active after latch edge Read data setup time before latch edge Read data hold time after latch edge max. 80 /100 -/- -/- 6/6 6/6 -/- 90 / 110 10 / 10 -/- 46 / 56 -/- -/- -/- CL = 100 pF Variable Baudrate = 0.5 to 12.5 MBd min. 4 TCL max. 512 TCL - - 6 6 - ns ns ns ns ns ns ns ns ns ns ns ns ns t200 t201 t202 t203 t204 t205 t206 t207 t208 t209 t210 t211 t212 CC 80 / 100 CC 30 / 40 CC 30 / 40 CC - / - CC - / - CC 30 / 40 CC 70 / 90 CC - / - CC 0 / 0 CC 34 / 44 SR SR SR 50 / 60 20 / 20 0/0 t200/2 - 10 t200/2 - 10 - - t200/2 - 10 t200 - 10 - 0 t200 + 10 10 - t200/2 - 6 t200/2 + 10 20 0 t200/2 + 6 - - - Table 19 Synchronous serial port timing characteristics 7099474 A 71/75 Unit 16-Electrical Characteristics ST10F163 Data Sheet 1) t200 t202 t201 2) SSPCLK t203 t205 SSPCEx t204 t206 3) t207 SSPDAT 1st Bit t207 2nd Bit t208 t207 t209 Last Bit Figure 25 SSP write timing 1) 2) SSPCLK t206 SSPCEx 3) t210 t209 SSPDAT last Wr. Bit t211 1st.In Bit t212 Lst.In Bit Figure 26 SSP read timing 1 2 3 The transition of shift and latch edge of SSPCLK is programmable. This figure uses the falling edge as shift edge (drawn bold). The bit timing is repeated for all bits to be transmitted or received. The active level of the chip enable lines is programmable. This figure uses an active low CE (drawn bold). At the end of a transmission or reception the CE signal is disabled in single transfer mode. In continuous transfer mode it remains active. 72/75 7099474 A ST10F163 Data Sheet 17-Package Mechanical Data 17 Package Mechanical Data Dim Min A A2 D D1 D3 E E1 E3 e 15.75 13.90 1.35 15.75 13.90 1.40 16.00 14.00 12.00 16.00 14.00 12.00 0.50 Number of Pins ND NE N 25 25 100 16.25 14.10 0.620 0.547 mm Type Max 1.60 1.45 16.25 14.10 0.053 0.620 0.547 0.055 0.630 0.551 0.472 0.630 0.551 0.472 0.020 0.640 0.555 Min inches Type Max 0.063 0.057 0.640 0.555 Figure 27 Package outline TQFP100 (14 x 14 mm) 18 Ordering Information Salestype Temperature range 0C to 70C Package TQFP100 (14x 14) ST10F163BT1 7099474 A 73/75 19-Revision History ST10F163 Data Sheet 19 Revision History This document has been transferred onto ADCS and becomes number 7099474 revA. The difference between this revision and 42-1700-06 is: Table 15 on page 42. Icc Power supply current changed from "10+3.5 x fcpu" to "20+3.5 x fcpu". The following differences exist between 42-1700-06 and 42-1700-05: Table added Table added Table added Table added Table added Table added Table added Table added Presentation changed Specification changed Specification changed Specification changed Specification changed Specification changed Specification changed Table 8 on page 26 Table 9 on page 27 Table 10 on page 30 Table 11 on page 31 Table 12 on page 32 Table 3 on page 13 Table 4 on page 14 Table 5 on page 15 Figure 14 to Figure 21 t22 from 2TCL-16+tc to 2TCL-20+tc t8 - t9 replaced with t80 - t81 for demultiplexed bus t42 - t43 replaced with t82 - t83 for demultiplexed bus t35 from 10ns to 14ns t36 and t59 from 0ns to 4ns t37 from "min 54ns, Var min 2TCL+14ns" to "min 58ns, Var min 2TCL+18ns" 74/75 7099474 A ST10F163 Data Sheet - Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics (c) 1998 STMicroelectronics - All Rights Reserved STMicroelectronics GROUP OF COMPANIES Australia - Brazil - Canada - China - France - Germany - Italy - Japan - Korea - Malaysia - Malta - Mexico - Morocco The Netherlands - Singapore - Spain - Sweden - Switzerland - Taiwan - Thailand - United Kingdom - U.S.A. http://www.st.com 7099474 A 75/75 1 |
Price & Availability of 5138
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |