| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
16-bit with Kbyte Flash memory 8/12 Kbyte 16-bit with functions 3
Top Searches for this datasheetST10F271B ST10F271E 16-bit with Kbyte Flash memory 8/12 Kbyte 16-bit with functions 31.25ns instruction cycle time 64MHz clock Multiply/accumulate unit (MAC) 16-bit multiplication, 40-bit accumulator Enhanced boolean manipulations Single-cycle context switching support On-chip memories Kbyte Flash memory (32-bit fetch) Single voltage Flash memories with erase/program controller 100K erasing/programming cycles. Mbyte linear address space code data Mbytes with I2C) Kbyte internal (IRAM) 10/18 Kbyte extension (XRAM) Programmable external configuration characteristics different address ranges Five programmable chip-select signals Hold-acknowledge arbitration support Interrupt 8-channel peripheral event controller single cycle interrupt driven data transfer 16-priority-level interrupt system with sources, sampling rate down 15.6ns Timers multi-functional general purpose timer units with timers 16-channel capture compare units 4-channel unit 4-channel XPWM PQFP144 3.4mm) (Plastic Quad Flat Package) TQFP144 1.4mm) (Thin Quad Flat Package) converter 24-channel 10-bit minimum conversion time Serial channels synch. asynch. serial channels high-speed synchronous channels standard interface 2.0B interfaces operating busses 2x32 message, C-CAN version) Fail-safe protection Programmable watchdog timer Oscillator watchdog On-chip bootstrap loader Clock generation On-chip with oscillator Direct prescaled clock input Real time clock on-chip oscillator general purpose lines Individually programmable input, output special function Programmable threshold (hysteresis) Idle, power down stand-by modes Single voltage supply: ±10% July 2006 1/180 www.st.com Contents ST10F271B/ST10F271E Contents Introduction data Functional description Memory organization Internal Flash memory Overview Functional description 5.2.1 5.2.2 5.2.3 Structure Modules structure power mode Write operation Registers description 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 5.4.7 5.4.8 5.4.9 5.4.10 5.4.11 Flash control register Flash control register high Flash control register Flash control register high Flash data register Flash data register high Flash data register Flash data register high Flash address register Flash address register high Flash error register Protection strategy 5.5.1 5.5.2 5.5.3 5.5.4 5.5.5 Protection registers Flash volatile write protection register Flash volatile access protection register Flash volatile access protection register Flash volatile access protection register high 2/180 ST10F271B/ST10F271E 5.5.6 5.5.7 5.5.8 5.5.9 Contents XBus flash volatile temporary access unprotection register (XFVTAUR0) Access protection Write protection Temporary unprotection Write operation examples Write operation summary Bootstrap loader Selection among user-code, standard selective bootstrap Standard bootstrap loader Alternate selective boot mode (ABM SBM) 6.3.1 6.3.2 6.3.3 Activation User mode signature integrity check Selective boot mode Central processing unit (CPU) Multiplier-accumulator unit (MAC) Instruction summary co-processor specific instructions External controller Interrupt system X-Peripheral interrupt Exception error traps list Capture compare (CAPCOM) units General purpose timer unit 11.1 11.2 GPT1 GPT2 modules Parallel ports 13.1 Introduction 3/180 Contents ST10F271B/ST10F271E 13.2 I/O's special features 13.2.1 13.2.2 Open drain mode Input threshold control 13.3 Alternate port functions converter Serial channels 15.1 15.2 15.3 15.4 Asynchronous synchronous serial interfaces ASCx asynchronous mode ASCx synchronous mode High speed synchronous serial interfaces interface modules 17.1 17.2 Configuration support configurations Real time clock Watchdog timer System reset 20.1 20.2 20.3 20.4 20.5 20.6 20.7 20.8 20.9 Input filter Asynchronous reset Synchronous reset (warm reset) Software reset Watchdog timer reset Bidirectional reset Reset circuitry Reset application examples Reset summary Power reduction modes 21.1 Idle mode 4/180 ST10F271B/ST10F271E Contents 21.2 Power down mode 21.2.1 21.2.2 Protected power down mode Interruptible power down mode 21.3 Stand-by mode 21.3.1 21.3.2 21.3.3 21.3.4 Entering stand-by mode Exiting stand-by mode Real time clock stand-by mode Power reduction modes summary Programmable output clock divider Register 23.1 23.2 23.3 23.4 Special function registers XBus registers Flash registers ordered name Identification registers Electrical characteristics 24.1 24.2 24.3 24.4 24.5 24.6 24.7 Absolute maximum ratings Recommended operating conditions Power considerations Parameter interpretation characteristics Flash characteristics converter characteristics 24.7.1 24.7.2 24.7.3 24.7.4 Conversion timing control conversion accuracy Total unadjusted error Analog reference pins 24.8 characteristics 24.8.1 24.8.2 24.8.3 24.8.4 24.8.5 24.8.6 Test waveforms Definition internal timing Clock generation modes Prescaler operation Direct drive Oscillator watchdog (OWD) 5/180 Contents 24.8.7 24.8.8 24.8.9 ST10F271B/ST10F271E Phase Locked Loop (PLL) Voltage Controlled Oscillator Jitter 24.8.10 lock unlock 24.8.11 Main oscillator specifications 24.8.12 oscillator specifications 24.8.13 External clock drive XTAL1 24.8.14 Memory cycle variables 24.8.15 External memory timing 24.8.16 Multiplexed 24.8.17 Demultiplexed 24.8.18 CLKOUT READY 24.8.19 External arbitration 24.8.20 High-speed synchronous serial interface (SSC) timing Package information Ordering information Revision history 6/180 ST10F271B/ST10F271E List tables List tables Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table description Summary IFLASH address range Address space reserved Flash module Flash modules sectorization (Read operations) Flash modules sectorization (Write operations with ROMS1='1' BootStrap mode)27 Control register interface Flash control register Flash control register high Flash control register Flash control register high Banks (BxS) sectors (BxFy) status bits meaning. Flash data register Flash data register high Flash data register Flash data register high Flash address register Flash address register high Flash error register Flash volatile write protection register Flash volatile access protection register Flash volatile access protection register Flash volatile access protection register high XBus flash volatile temporary access unprotection register Flash write operations. ST10F271 boot mode selection Standard instruction summary instruction summary Interrupt sources X-Interrupt detailed mapping Trap priorities Compare modes CAPCOM timer input frequencies, resolutions periods CAPCOM timer input frequencies, resolutions periods GPT1 timer input frequencies, resolutions periods MHz. GPT1 timer input frequencies, resolutions periods MHz. GPT2 timer input frequencies, resolutions periods MHz. GPT2 timer input frequencies, resolutions periods MHz. unit frequencies resolutions clock unit frequencies resolutions clock asynchronous baud rates reload value deviation errors (fCPU MHz) asynchronous baud rates reload value deviation errors (fCPU MHz) synchronous baud rates reload value deviation errors (fCPU MHz) synchronous baud rates reload value deviation errors (fCPU MHz) synchronous baud rate reload values (fCPU MHz) synchronous baud rate reload values (fCPU MHz) WDTREL reload value (fCPU MHz) WDTREL reload value (fCPU MHz) 7/180 List tables Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table ST10F271B/ST10F271E Reset event definition Reset event. PORT0 latched configuration different reset events Power reduction modes summary List special function registers List XBus registers List flash registers IDMANUF IDCHIP IDMEM IDPROG Absolute maximum ratings Recommended operating conditions Thermal characteristics. Package characteristics characteristics. Flash characteristics Flash data retention characteristics converter characteristics converter programming On-chip clock generator selections. Internal divider mechanism characteristics (VDD 10%, +125°C) Main oscillator characteristics Main oscillator negative resistance (module) 32kHz oscillator characteristics Minimum values negative resistance (module) 32kHz oscillator External clock drive. Memory cycle variables Multiplexed timings Demultiplexed timings CLKOUT READY timings External arbitration timings master mode timings slave mode timings. Order codes Document revision history 8/180 ST10F271B/ST10F271E List figures List figures Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Logic symbol configuration (top view) Block diagram ST10F271 on-chip memory mapping (ROMEN=1 XADRS 800Bh Reset value). Flash structure Summary access protection level block diagram (MAC Unit included) unit architecture X-Interrupt basic structure Block diagram GPT1. Block diagram GPT2. Block diagram module Connection single separate transceivers Connection single common transceivers. Connection different buses (e.g. gateway application). Connection with internal Parallel Mode enabled Asynchronous power-on RESET Asynchronous power-on RESET Asynchronous hardware RESET Asynchronous hardware RESET Synchronous short long hardware RESET Synchronous short long hardware RESET Synchronous long hardware RESET Synchronous long hardware RESET unidirectional RESET unidirectional RESET bidirectional RESET (EA=1) bidirectional RESET bidirectional RESET (EA=0) followed RESET Minimum external reset circuitry System reset circuit Internal (simplified) reset circuitry Example software watchdog bidirectional reset Example software watchdog bidirectional reset PORT0 bits latched into different registers after reset External circuitry Port2 test mode structure Supply current versus operating frequency (RUN IDLE modes) conversion characteristic converter input pins scheme Charge sharing timing diagram during sampling phase Anti-aliasing filter conversion rate Input output waveforms Float waveforms Generation mechanisms clock ST10F271 jitter Crystal oscillator resonator connection diagram 32kHz crystal oscillator connection diagram. 9/180 List figures Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure Figure ST10F271B/ST10F271E External clock drive XTAL1. External memory cycle: Multiplexed bus, with/without read/write delay, normal ALE. External memory cycle: Multiplexed bus, with/without read/write delay, extended ALE. External memory cycle: Multiplexed bus, with/without delay, normal ALE, External memory cycle: Multiplexed bus, with/without delay, extended ALE, External memory cycle: Demultiplexed bus, with/without delay, normal Exteral memory cycle: Demultiplexed bus, with/without delay, extended External memory cycle: Demultipl. bus, with/without delay, normal ALE, External memory cycle: Demultiplexed bus, without delay, extended ALE, CLKOUT READY External arbitration (releasing bus) External arbitration (regaining bus) master timing slave timing PQFP144 mechanical data package dimension TQFP144 mechanical data package dimension 10/180 ST10F271B/ST10F271E Introduction Introduction ST10F271B ST10F271E devices derivatives STMicroelectronics ST10 family 16-bit single-chip CMOS microcontrollers. These derivatives slightly differ available size Analog Channel Input number. These points will highlighted corresponding chapters. information that common derivatives, generic ST10F271 name will used. ST10F271 combines high performance million instructions second) with high peripheral functionality enhanced I/O-capabilities. also provides on-chip high-speed single voltage Flash memory, on-chip high-speed RAM, clock generation PLL. ST10F271 processed 0.18mm CMOS technology. core logic supplied with 1.8V on-chip voltage regulator. part supplied with single supply I/Os work ST10F271 devices based ST10F272 silicon, 100% compatible, with difference that only reduced portion on-chip Flash memories usable. available memories will detailled Chapter Memory organization. 11/180 Introduction Figure Logic symbol ST10F271B/ST10F271E XTAL1 XTAL2 XTAL3 XTAL4 RSTIN RSTOUT VAREF VAGND VSTBY READY Port 16-bit Port 16-bit Port 16-bit Port 16-bit Port 15-bit ST10F271 Port 8-bit Port 8-bit Port 8-bit Port 8-bit 12/180 ST10F271B/ST10F271E data data Figure configuration (top view) XTAL4 XTAL3 RSTOUT RSTIN XTAL1 XTAL2 P1H.7 CC27I P1H.6 CC26I P1H.5 CC25I P1H.4 CC24I P1H.3 P1H.2 P1H.1 P1H.0 P1L.7 AN23 P1L.6 AN22 P1L.5 AN21 P1L.4 AN20 P1L.3 AN19 P1L.2 AN18 P1L.1 AN17 P1L.0 AN16 P0H.7 AD15 P0H.6 AD14 P0H.5 AD13 P0H.4 AD12 P0H.3 AD11 P0H.2 AD10 P0H.1 P6.0 P6.1 P6.2 P6.3 P6.4 P6.5 HOLD SCLK1 P6.6 HLDA MTSR1 P6.7 BREQ MRST1 P8.0 XPOUT0 CC16IO P8.1 XPOUT1 CC17IO P8.2 XPOUT2 CC18IO P8.3 XPOUT3 CC19IO P8.4 CC20IO P8.5 CC21IO P8.6 RxD1 CC22IO P8.7 TxD1 CC23IO P7.0 POUT0 P7.1 POUT1 P7.2 POUT2 P7.3 POUT3 P7.4 CC28IO P7.5 CC29IO P7.6 CC30IO P7.7 CC31IO P5.0 P5.1 P5.2 P5.3 P5.4 P5.5 P5.6 P5.7 P5.8 P5.9 ST10F271 P0H.0 P0L.7 P0L.6 P0L.5 P0L.4 P0L.3 P0L.2 P0L.1 P0L.0 VSTBY READY WR/WRL P4.7 CAN2_TxD P4.6 CAN1_TxD CAN2_TxD P4.5 CAN1_RxD CAN2_RxD P4.4 CAN2_RxD P4.3 P4.2 P4.1 P4.0 P3.15 CLKOUT P3.13 SCLK0 P3.12 P3.11 RxD0 P3.10 TxD0 P3.9 MTSR0 P3.8 MRST0 P3.7 T2IN P3.6 T3IN AN16 AN23 only available ST10F271E VAREF VAGND P5.10 AN10 T6EUD P5.11 AN11 T5EUD P5.12 AN12 T6IN P5.13 AN13 T5IN P5.14 AN14 T4EUD P5.15 AN15 T2EUD P2.0 CC0IO P2.1 CC1IO P2.2 CC2IO P2.3 CC3IO P2.4 CC4IO P2.5 CC5IO P2.6 CC6IO P2.7 CC7IO P2.8 CC8IO EX0IN P2.9 CC9IO EX1IN P2.10 CC10IO EX2IN P2.11 CC11IO EX3IN P2.12 CC12IO EX4IN P2.13 CC13IO EX5IN P2.14 CC14IO EX6IN P2.15 CC15IO EX7IN T7IN P3.0 T0IN P3.1 T6OUT P3.2 CAPIN P3.3 T3OUT P3.4 T3EUD P3.5 T4IN 13/180 data Table Symbol ST10F271B/ST10F271E description Type Function 8-bit bidirectional port, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. Port outputs configured push-pull open drain drivers. input threshold Port selectable (TTL CMOS). following Port pins have alternate functions: P6.0 P6.4 P6.5 HOLD SCLK1 P6.6 HLDA MTSR1 P6.7 BREQ MRST1 Chip select output Chip select output External master hold request input SSC1: master clock output slave clock input Hold acknowledge output SSC1: master-transmitter slave-receiver request output SSC1: master-receiver slave-transmitter P6.0 P6.7 8-bit bidirectional port, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. Port outputs configured push-pull open drain drivers. input threshold Port selectable (TTL CMOS). following Port pins have alternate functions: P8.0 CC16IO XPWM0 P8.3 CC19IO XPWM0 P8.4 P8.5 P8.6 CC20IO CC21IO CC22IO RxD1 P8.7 CC23IO TxD1 CAPCOM2: CC16 capture input compare output PWM1: channel output CAPCOM2: CC19 capture input compare output PWM1: channel output CAPCOM2: CC20 capture input compare output CAPCOM2: CC21 capture input compare output CAPCOM2: CC22 capture input compare output ASC1: Data input (Asynchronous) (Synchronous) CAPCOM2: CC23 capture input compare output ASC1: Clock Data output (Asynchronous/Synchronous) 9-16 P8.0 P8.7 14/180 ST10F271B/ST10F271E Table Symbol data description (continued) Type Function 8-bit bidirectional port, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. Port outputs configured push-pull open drain drivers. input threshold Port selectable (TTL CMOS). following Port pins have alternate functions: P7.0 P7.3 P7.4 P7.7 POUT0 POUT3 CC28IO CC31IO PWM0: channel output PWM0: channel output CAPCOM2: CC28 capture input compare output CAPCOM2: CC31 capture input compare output 19-26 P7.0 P7.7 27-36 39-44 16-bit input-only port with Schmitt-Trigger characteristics. pins Port analog input channels converter, where P5.x equals (Analog input channel they timer inputs. input threshold Port selectable (TTL CMOS). following Port pins have alternate functions: P5.10 P5.11 P5.12 P5.13 P5.14 P5.15 T6EUD T5EUD T6IN T5IN T4EUD T2EUD GPT2: timer external up/down control input GPT2: timer external up/down control input GPT2: timer count input GPT2: timer count input GPT1: timer external up/down control input GPT1: timer external up/down control input P5.0 P5.9 P5.10 P5.15 47-54 57-64 16-bit bidirectional port, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. Port outputs configured push-pull open drain drivers. input threshold Port selectable (TTL CMOS). following Port pins have alternate functions: P2.0 P2.7 P2.8 CC0IO CC7IO CC8IO EX0IN P2.15 CC15IO EX7IN T7IN CAPCOM: capture input/compare output CAPCOM: capture input/compare output CAPCOM: capture input/compare output Fast external interrupt input CAPCOM: CC15 capture input/compare output Fast external interrupt input CAPCOM2: timer count input P2.0 P2.7 P2.8 P2.15 15/180 data Table Symbol ST10F271B/ST10F271E description (continued) 65-70, 73-80, Type Function 15-bit (P3.14 missing) bidirectional port, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. Port outputs configured pushpull open drain drivers. input threshold Port selectable (TTL CMOS). following Port pins have alternate functions: P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 P3.8 P3.9 P3.10 P3.11 P3.12 P3.13 P3.15 SCLK0 CLKOUT External memory high byte write strobe SSC0: master clock output slave clock input System clock output (programmable divider clock) T0IN T6OUT CAPIN T3OUT T3EUD T4IN T3IN T2IN MRST0 MTSR0 TxD0 RxD0 CAPCOM1: timer count input GPT2: timer toggle latch output GPT2: register CAPREL capture input GPT1: timer toggle latch output GPT1: timer external up/down control input GPT1; timer input count/gate/reload/capture GPT1: timer count/gate input GPT1: timer input count/gate/reload capture SSC0: SSC0: ASC0: clock data output (asynchronous/synchronous) ASC0: data input (asynchronous) (synchronous) External memory high byte enable signal P3.0 P3.5 P3.6 P3.13, P3.15 16/180 ST10F271B/ST10F271E Table Symbol data description (continued) Type Function Port 8-bit bidirectional port. bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. input threshold selectable (TTL CMOS). Port 4.4, 4.5, outputs configured push-pull open drain drivers. case external configuration, Port used output segment address lines: P4.0 P4.1 P4.2 P4.3 P4.4 CAN2_RxD P4.5 CAN1_RxD CAN2_RxD P4.6 CAN1_TxD CAN2_TxD P4.7 CAN2_TxD Segment address line Segment address line Segment address line Segment address line Segment address line CAN2: receive data input Interface: serial clock Segment address line CAN1: receive data input CAN2: receive data input Segment address line CAN1: transmit data output CAN2: transmit data output Most significant segment address line CAN2: transmit data output Interface: serial data 85-92 P4.0 -P4.7 External memory read strobe. activated every external instruction data read access. External memory write strobe. WR-mode this activated every external data write access. mode this activated byte data write accesses 16-bit bus, every data write access 8-bit bus. WRCFG SYSCON register mode selection. Ready input. active level programmable. When ready function enabled, selected inactive level this pin, during external memory access, will force insertion waitstate cycles until returns selected active level. Address latch enable output. case external addressing multiplexed mode, this signal latch command address lines. WR/WRL READY/ READY 17/180 data Table Symbol ST10F271B/ST10F271E description (continued) Type Function External access enable pin. level applied this during after Reset forces ST10F271 start program from external memory space. high level forces ST10F271 start internal memory space. This also used (when Stand-by mode entered, that ST10F271 under reset main turned off) bias oscillator amplifier circuit provide reference voltage lowpower embedded voltage regulator which generates internal 1.8V supply module (when disabled) retain data inside Stand-by portion XRAM (16Kbyte). range from 5.5V reduced amount time during device life, 4.0V when on-chip oscillator amplifier turned off). running mode, this tied during reset without affecting oscillator, XRAM activities, since presence stable guarantees proper biasing those modules. 8-bit bidirectional ports P0H, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. input threshold Port selectable (TTL CMOS). case external configuration, PORT0 serves address address data (AD) multiplexed modes data demultiplexed modes. Demultiplexed modes VSTBY P0L.0 -P0L.7, 100-107, P0H.0 108, P0H.1 111-117 P0H.7 Data path width P0L.0 P0L.7: P0H.0 P0H.7: 8-bit 16-bi Multiplexed modes Data path width P0L.0 P0L.7: P0H.0 P0H.7: 8-bit 16-bi AD15 18/180 ST10F271B/ST10F271E Table Symbol data description (continued) Type Function 8-bit bidirectional ports P1H, bit-wise programmable input output direction bit. Programming input forces corresponding output driver high impedance state. PORT1 used 16-bit address demultiplexed modes: least BUSCONx configured such demultiplexed mode selected, PORT1 available general purpose function. input threshold Port selectable (TTL CMOS). Only ST10F271E pins also serve additional analog input channels converter, where P1L.x equals (Analog input channel where 16). This additional function have higher priority demultiplexed function. following PORT1 pins have alternate functions: P1H.4 P1H.5 P1H.6 P1H.7 XTAL1 XTAL2 CC24IO CC25IO CC26IO CC27IO CAPCOM2: CC24 capture input CAPCOM2: CC25 capture input CAPCOM2: CC26 capture input CAPCOM2: CC27 capture input 118-125 128-135 P1L.0 P1L.7 P1H.0 P1H.7 XTAL1 XTAL2 Main oscillator amplifier circuit and/or external clock input. Main oscillator amplifier circuit output. clock device from external source, drive XTAL1 while leaving XTAL2 unconnected. Minimum maximum high rise fall times specified Characteristics must observed. XTAL3 XTAL4 XTAL3 XTAL4 oscillator amplifier circuit input oscillator amplifier circuit output When oscillator amplifier used, avoid spurious consumption, XTAL3 shall tied ground while XTAL4 shall left open. Besides, OFF32 RTCCON register shall set. oscillator only driven external crystal, different clock source. Reset Input with CMOS Schmitt-Trigger characteristics. level this specified duration while oscillator running resets ST10F271. internal pull-up resistor permits power-on reset using only capacitor connected VSS. bidirectional reset mode (enabled setting BDRSTEN SYSCON register), RSTIN line pulled duration internal reset sequence. Internal Reset Indication Output. This driven level during hardware, software watchdog timer reset. RSTOUT remains until EINIT (end initialization) instruction executed. Non-Maskable Interrupt Input. high transition this causes vector trap routine. PWDCFG SYSCON register, when PWRDN (power down) instruction executed, must order force ST10F271 into power down mode. high PWDCFG ='0', when PWRDN executed, part will continue normal mode. used, should pulled high externally. converter reference voltage analog supply converter reference analog ground RSTIN RSTOUT VAREF VAGND 19/180 data Table Symbol ST10F271B/ST10F271E description (continued) 72,82,93 109, 126, 18,45, 55,71, 83,94, 110, 127, Type Function Timing return from interruptible power down mode synchronous asynchronous reset selection. Digital supply voltage during normal operation, idle power down modes. turned when Stand-by mode selected. Digital ground 1.8V decoupling pin: decoupling capacitor (typical value 10nF, 100nF) must connected between this nearest pin. 20/180 ST10F271B/ST10F271E Functional description Functional description architecture ST10F271 combines advantages both RISC CISC processors advanced peripheral subsystem. block diagram gives overview different on-chip components high bandwidth internal structure ST10F271. Figure Block diagram IFLASH 128K CPU-Core Unit IRAM XRAM (PEC) XRAM 4K/8K (STBY) XRTC XPWM XASC XSSC XCAN2 Interrupt Controller Watchdog 4-8MHz Oscillator 32kHz Oscillator 5V-1.8V Voltage Regulator XI2C XCAN1 Port GPT1 GPT2 External Controller CAPCOM2 Port Port Port Port Port Port Port Port CAPCOM1 10-bit ASC0 SSC0 21/180 Memory organization ST10F271B/ST10F271E Memory organization memory space ST10F271 configured unified memory architecture. Code memory, data memory, registers ports organized within same linear address space Bytes. entire memory space accessed Byte wise Word wise. Particular portions on-chip memory have additionally been made directly addressable. IFLASH: 128K Bytes on-chip Flash memory. divided 6blocks (B0F0.B0F5) that constitute Bank When Bootstrap mode selected, Test-Flash Block B0TF (8Kbyte) appears address 00'0000h: refer Chapter Internal Flash memory page more details memory mapping boot mode. summary address range IFlash following: Table Summary IFLASH address range Blocks B0TF B0F0 B0F1 B0F2 B0F3 B0F4 B0F5 User Mode visible 00'0000h 00'1FFFh 00'2000h 00'3FFFh 00'4000h 00'5FFFh 00'6000h 00'7FFFh 01'8000h 01'FFFFh 02'0000h 02'FFFFh Size B0F6 B0F7 03'0000h 03'FFFFh RESERVED 04'0000h 04'FFFFh RESERVED Note: ST10F271 being based same silicon ST10F272, KByte Flash implemented device. blocks B0F6 B0F7 physically disabled MUST considered reserved application software. IRAM: Bytes on-chip internal (dual-port) provided storage data, system stack, general purpose register banks code. register bank Wordwide R15) Bytewide (RL0, RH0, RL7, RH7) general purpose registers group. XRAM: 4K/8K+2K Bytes on-chip extension (single port XRAM) provided storage data, user stack code. XRAM divided into areas, first Bytes named XRAM1 second 4K/8K Bytes named XRAM2, connected internal XBUS accessed like external memory 16-bit demultiplexed bus-mode without wait state read/write delay (31.25ns access 64MHz clock). Byte Word accesses allowed. XRAM1 address range 00'E000h 00'E7FFh XPEN (bit SYSCON register), XRAM1EN (bit XPERCON register) set. XRAM1EN XPEN cleared, then access address range 00'E000h 00'E7FFh will directed external memory interface, using BUSCONx register corresponding address matching ADDRSELx register. XRAM2 address range selected programming XADRS3 register, XPEN (bit SYSCON register), XRAM2EN (bit XPERCON register) set. XPEN 22/180 ST10F271B/ST10F271E Memory organization cleared, then access address range programmed XRAM2 will directed external memory interface, using BUSCONx register corresponding address matching ADDRSELx register. After reset XRAM2 mapped from address 09'0000h. XRAM2 represents also Stand-by RAM, which maintained biased through VSTBY when main supply turned off. XRAM appears like external memory, cannot used system stack register banks. XRAM provided single storage therefore addressable. ST10F271B XRAM: 4K+2K Bytes XRAM. XRAM1 Bytes) address range 00'E000h 00'E7FFh enabled. XRAM2 Bytes) address range after reset 09'0000h 09'1FFFh mirrored every 16KByte boundary. ST10F271E XRAM: 8K+2K Bytes XRAM XRAM1 Bytes) address range 00'E000h 00'E7FFh enabled. XRAM2 (16K Bytes) address range after reset 09'0000h 09'3FFFh mirrored every 16KByte boundary. SFR/ESFR: 1024 Bytes Bytes) address space reserved special function register areas. SFRs Wordwide registers which used control monitor function different on-chip units. CAN1: Address range 00'EF00h 00'EFFFh reserved CAN1 Module access. CAN1 enabled setting XPEN SYSCON register setting CAN1EN XPERCON register. Accesses Module demultiplexed addresses 16-bit data (only word accesses possible). wait states give access time 62.5ns 64MHz clock. tri-state wait states used. CAN2: Address range 00'EE00h 00'EEFFh reserved CAN2 Module access. CAN2 enabled setting XPEN SYSCON register setting CAN2EN XPERCON register. Accesses Module demultiplexed addresses 16-bit data (only word accesses possible). wait states give access time 62.5ns 64MHz clock. tri-state wait states used. Note: modules used, Port cannot programmed output segment address lines. Thus, only segment address lines used, reducing external memory space Bytes Byte line). RTC: Address range 00'ED00h 00'EDFFh reserved Module access. enabled setting XPEN SYSCON register XPERCON register. Accesses Module demultiplexed addresses 16-bit data (only word accesses possible). waitstates give access time 62.5ns 64MHz clock. tristate waitstate used. PWM1: Address range 00'EC00h 00'ECFFh reserved PWM1 Module access. PWM1 enabled setting XPEN SYSCON register XPERCON register. Accesses PWM1 Module demultiplexed addresses 16bit data (only word accesses possible). waitstates give access time 62.5ns 64MHz clock. tristate waitstate used. Only word access allowed. 23/180 Memory organization ST10F271B/ST10F271E ASC1: Address range 00'E900h 00'E9FFh reserved ASC1 Module access. ASC1 enabled setting XPEN SYSCON register XPERCON register. Accesses ASC1 Module demultiplexed addresses 16-bit data (only word accesses possible). waitstates give access time 62.5 64MHz clock. tristate waitstate used. SSC1: Address range 00'E800h 00'E8FFh reserved SSC1 Module access. SSC1 enabled setting XPEN SYSCON register XPERCON register. Accesses SSC1 Module demultiplexed addresses 16-bit data (only word accesses possible). waitstates give access time 62.5ns 64MHz clock. tristate waitstate used. I2C: Address range 00'EA00h 00'EAFFh reserved Module access. enabled setting XPEN SYSCON register XPERCON register. Accesses Module demultiplexed addresses 16-bit data (only word accesses possible). waitstates give access time 62.5ns 64MHz clock. tristate waitstate used. X-Miscellaneous: Address range 00'EB00h 00'EBFFh reserved access XBUS additional features. They enabled setting XPEN SYSCON register XPERCON register. Accesses this additional features demultiplexed addresses 16-bit data (only word accesses possible). waitstates give access time 62.5ns 64MHz clock. tristate waitstate used. following features provided: CLKOUT programmable divider XBUS interrupt management registers multiplexing register (only ST10F271E) Port1L digital disable register extra channels CAN2 multiplexing P4.5/P4.6 CAN1-2 main clock prescaler Main Voltage Regulator disable power-down mode CMOS threshold selection Port0, Port1, Port5. order meet needs designs where more memory required than provided chip, Bytes external memory connected microcontroller. Visibility XBUS peripherals order keep ST10F271 compatible with ST10F168 ST10F269, XBUS peripherals selected visible external address data bus. Different bits X-peripheral enabling XPERCON register must set. these bits cleared before global enabling with XPEN SYSCON register, corresponding address space, port pins interrupts occupied peripherals, thus peripheral visible available. Refer Chapter Register page 112. 24/180 ST10F271B/ST10F271E Figure Segment FFFF Memory organization ST10F271 on-chip memory mapping (ROMEN=1 XADRS 800Bh Reset value) Code Page Segment FFFF Page (4Kbyte) 1023 0000 FFFF Ext. Memory FFFF FE00 FDFF 0000 FFFF FE00 FDFF 0000 FFFF Ext. Memory XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 XRAM2 Reserved IRAM 0000 FFFF 0000 FFFF F600 F5FF IRAM Reserved 0000 FFFF F200 F1FF XADRS3 800Bh (512K) F000 EFFF ESFR XCAN1 XCAN2 XRTC XPWM XMiscellaneous XI2C XASC XSSC F600 F5FF 0000 FFFF Reserved 0000 FFFF E800 E7FF F200 F1FF 0000 FFFF ESFR F000 EFFF XRAM1 0000 FFFF 0000 FFFF E000 DFFF 0000 FFFF Reserved 0000 FFFF Reserved 0000 FFFF Reserved 0000 FFFF Reserved Ext. Memory 0000 FFFF Reserved 0000 FFFF FLASH FLASH Ext. Memory 0000 FFFF Ext. Memory FLASH Address Area, where XRAM2 mirrored every 16Kbytes boundary after reset Bit-addressable Memory C000 0000 0000 FLASH XRAM 1Mbyte Data Page (Segment 16Kbyte first FLASH remapped from segment segment setting SYSCON-ROMS1 (before EINIT). Absolute Memory Address hexadecimal values, while Data Page Number decimal values. 25/180 Internal Flash memory ST10F271B/ST10F271E Internal Flash memory Overview on-chip Flash composed matrix module, KBytes wide. This module ST10 Internal bus, called IFLASH Figure Flash structure IFLASH Flash Control Registers Control Section Ref. Generator Bank Kbyte Program Memory Kbyte Test-Flash Program/Erase Controller I-BUS Interface programming operations flash managed embedded Flash Program/Erase Controller (FPEC). High Voltages needed Program/Erase operations internally generated. Data 32-bit wide fetch accesses IFLASH, while wide read accesses IFLASH. Read/write accesses IFLASH Control Registers area wide. 5.2.1 Functional description Structure following table shows Address space reserved Flash module. Table Address space reserved Flash module Description IFLASH sectors IFLASH reserved sector Reserved IBUS area Addresses 0x00 0000 0x02 FFFF 0x03 0000 0x04 FFFF 0x05 0000 0x07 FFFF 0x08 0000 0x08 FFFF Size Kbyte Kbyte Kbyte Kbyte Registers Flash internal reserved area Note: ST10F271 being based same silicon ST10F272, KByte Flash implemented device. range 03'0000h 04'FFFFh physically disabled even available use. Therefore this address range MUST reserved application 26/180 ST10F271B/ST10F271E Internal Flash memory mapping. Accesses this address range will send back content Flash cell default FFFFh, blank value when device delivered) Accesses area will send back value 009Bh. 5.2.2 Modules structure IFLASH module composed bank (Bank Kbyte Program Memory divided sectors (B0F0.B0F7). Bank contains also reserved sector named TestFlash. Addresses from 0x08 0000 0x08 FFFF reserved Control Register Interface other internal service memory space used Flash Program/Erase controller. following tables show memory mapping Flash when accessed read mode (Table Flash modules sectorization (Read operations)), when accessed write erase mode (Table Flash modules sectorization (Write operations with ROMS1='1' BootStrap mode)): note that with this second mapping, first four banks remapped into code segment (same obtained setting ROMS1 SYSCON register). Table Bank Flash modules sectorization (Read operations) Description Bank Flash (B0F0) Bank Flash (B0F1) Bank Flash (B0F2) Bank Flash (B0F3) Addresses 0x0000 0000 0x0000 1FFF 0x0000 2000 0x0000 3FFF 0x0000 4000 0x0000 5FFF 0x0000 6000 0x0000 7FFF 0x0001 8000 0x0001 FFFF 0x0002 0000 0x0002 FFFF Size 32-bit (I-BUS) Bank Flash (B0F4) Bank Flash (B0F5) ST10 size Bank Flash (B0F6) Bank Flash (B0F7) 0x0003 0000 0x0003 FFFF 0x0004 0000 0x0004 FFFF IFlash sectors B0F6 B0F7 physically disabled. corresponding area must reserved application mapping. Accesses this area will send back content Flash cell default FFFFh: erased state, modified user). Table Bank Flash modules sectorization (Write operations with ROMS1='1' BootStrap mode) Description Bank Test-Flash (B0TF) Bank Flash (B0F0) Bank Flash (B0F1) Bank Flash (B0F2) Addresses 0x0000 0000 0x0000 1FFF 0x0001 0000 0x0001 1FFF 0x0001 2000 0x0001 3FFF 0x0001 4000 0x0001 5FFF 0x0001 6000 0x0001 7FFF Size 32-bit (I-BUS) ST10 size Bank Flash (B0F3) Bank Flash (B0F4) Bank Flash (B0F5) 0x0001 8000 0x0001 FFFF 0x0002 0000 0x0002 FFFF Bank Flash (B0F6) 0x0003 0000 0x0003 FFFF 0x0004 0000 0x0004 FFFF Bank Flash (B0F7) 27/180 Internal Flash memory ST10F271B/ST10F271E IFlash sectors B0F6 B0F7 physically disabled. corresponding area must reserved application mapping. Accesses this area will send back content Flash cell default FFFFh: erased state, modified user). table above refers configuration when ROMS1 SYSCON register set. When Bootstrap mode entered: Test-Flash seen available code fetches (address 00'0000h) User I-Flash only available read write accesses Write accesses must made with addresses starting segment from 01'0000h, whatever ROMS1 SYSCON value Read accesses made segment segment depending ROMS1 value. Bootstrap mode, default ROMS1 first 32KBytes IFlash mapped segment Example: default configuration, program address user must value 01'0000h FARL FARH registers, verify content address read 00'0000h must performed. Next Table Control register interface shows Control Register interface composition: this registers addressed CPU. Table Name FCR1-0 FDR1-0 FNVWPIR FNVAPR0 FNVAPR1 XFVTAUR0 Control register interface Description Flash Control Registers Flash Data Registers Flash Address Registers Flash Error Register Flash Volatile Protection Register Flash Volatile Access Protection Register Flash Volatile Access Protection Register XBus Flash Volatile Temporary Access Unprotection Register Addresses 0x0008 0000 0x0008 0007 0x0008 0008 0x0008 000F 0x0008 0010 0x0008 0013 0x0008 0014 0x0008 0015 0x0008 DFB0 0x0008 DFB1 0x0008 DFB8 0x0008 DFB9 0x0008 DFBC 0x0008 DFBF Size byte byte byte byte byte byte byte 16-bit size 0x0000 EB50 0x0000 EB51 byte 5.2.3 power mode Flash module automatically switched executing PWRDN instruction. consumption drastically reduced, exiting this state require long time (tPD). Recovery time from Power Down mode Flash modules anyway shorter than main oscillator start-up time. avoid problem restarting fetch code from Flash, important size properly external circuit pin. Note: PWRDN instruction must executed while Flash program/erase operation progress. 28/180 ST10F271B/ST10F271E Internal Flash memory Write operation Flash module have single register interface mapped memory space IBUS (0x08 0000 0x08 0015). operations enabled through four 16-bit control registers: Flash Control Register High/Low (FCR1H/L-FCR0H/L). Eight other 16-bit registers used store Flash Address Data Program operations (FARH/L FDR1H/L-FDR0H/L) Write Operation Error flags (FERH/L). registers accessible with 16-bit instructions (since operates 16-bit mode when read/ write). Before accessing IFlash module (and consequently also Flash register used program/erasing operations), ROMEN SYSCON register shall set. During Flash write operation attempt read flash itself, that under modification, will output invalid data (software trap 009Bh). This means that Flash fetchable when programming operation active: write operation commands must executed from another memory (internal external memory), ST10F269 device. fact, IBUS characteristics, possible perform write operation IFLASH, when fetching code from IFLASH. Direct addressing allowed write accesses IFLASH Control Registers. During Write operation, when LOCK FCR0 set, forbidden write into Flash Control Registers. Power supply drop during write operation internal voltage supply drops below certain internal voltage threshold, write operation running suddenly interrupted module reset Read mode. following Power-on, interrupted Flash write operation must repeated. 29/180 Internal Flash memory ST10F271B/ST10F271E 5.4.1 Registers description Flash control register Flash Control Register (FCR0L) together with Flash Control Register High (FCR0H) used enable monitor write operations IFLASH. user access write mode Test-Flash (B0TF). Besides, Test-Flash block seen user Bootstrap Mode only. FCR0L (0x08 0000) reserved LOCK Reset Value: 0000h: res. res. BSY0 res. Table Flash control register Function Bank Busy (IFLASH) This indicates that write operation running Bank (IFLASH). automatically when set. Setting Protection operation sets BSY0 (since protection registers this Block). When this set, every read access Bank will output invalid data (software trap 009Bh), while every write access Bank will ignored. write operation during Program Erase Suspend this automatically reset Bank returns read mode. After Program Erase Resume this automatically again. Flash Registers Access Locked When this set, means that access Flash Control Registers FCR0H/-FCR1H/L, FDR0H/L-FDR1H/L, FARH/L locked FPEC: read access registers will output invalid data (software trap 009Bh) write access will ineffective. LOCK automatically when Flash set. This only user always access detect status Flash: once found low, rest FCR0L other Flash registers accessible user well. Note that content read when LOCK low, content updated only when also BSY0 reset. BSY0 LOCK 30/180 ST10F271B/ST10F271E Internal Flash memory 5.4.2 Flash control register high Flash Control Register High (FCR0H) together with Flash Control Register (FCR0L) used enable monitor write operations IFLASH. user access write mode Test-Flash (B0TF). Besides, Test-Flash block seen user Bootstrap Mode only. FCR0H (0x08 0002) Reset value: 0000h SUSP DWPG reserved reserved Table Flash control register high Function Protection This must select Protection operation. Protection operation allows program place Flash Volatile Protection Registers. Flash Address which program must written FARH/L registers, while Flash Data programmed must written FDR0H/L before starting execution setting WMS. sequence error flagged SEQER address written FARH/L range 0x0E8FB00x08DFBF. automatically reset Protection operation. Sector Erase This must select Sector Erase operation Flash modules. Sector Erase operation allows erase Flash locations value 0xFF. From sectors same Bank (excluded Test-Flash Bank selected erased through bits BxFy FCR1H/L registers before starting execution setting WMS. necessary pre-program sectors 0x00, because this done automatically. automatically reset Sector Erase operation. Double Word Program This must select Double Word bits) Program operation Flash module. Double Word Program operation allows program place Flash Address which program (aligned with even words) must written FARH/L registers, while Flash Data programmed must written FDR0H/L registers (even word) FDR1H/L registers (odd word) before starting execution setting WMS. DWPG automatically reset Double Word Program operation. Word Program This must select Word bits) Program operation Flash module. Word Program operation allows program place Flash Address programmed must written FARH/L registers, while Flash Data programmed must written FDR0H/L registers before starting execution setting WMS. automatically reset Word Program operation. DWPG 31/180 Internal Flash memory Table ST10F271B/ST10F271E Flash control register high (continued) Function Suspend This must suspend current Program (Word Double Word) Sector Erase operation order read data Sectors Bank under modification program data another Bank. Suspend operation resets Flash Bank normal read mode (automatically resetting BSY0). When Program Suspend, Flash module accepts only following operations: Read Program Resume. When Erase Suspend module accepts only following operations: Read, Erase Resume Program (Word Double Word; Program operations cannot suspended during Erase Suspend). resume suspended operation, must again, together with selection corresponding operation resume (WPG, DWPG, SER). Note: forbidden start Write operation with SUSP already set. Write Mode Start This must start every write operation Flash module. write operation during Suspend, this automatically reset. resume suspended operation, this must again. forbidden this high (the operation accepted). also forbidden start write (program erase) operation setting high) when SUSP FCR0 high. Resetting this software effect. SUSP 5.4.3 Flash control register Flash Control Register (FCR1L), together with Flash Control Register High (FCR1H), used select Sectors Erase, during write operation monitor status each Sector Bank. FCR1L (0x08 0004) reserved Reset value: 0000h B0F7 B0F6 B0F5 B0F4 B0F3 B0F2 B0F1 B0F0 Table Flash control register Function Bank IFLASH Sector Status These bits must during Sector Erase operation select sectors erase Bank Besides, during erase operation, these bits automatically give status sectors Bank (B0F7-B0F0). meaning B0Fy Sector Bank given next Table Banks (BxS) Sectors (BxFy) Status bits meaning. These bits automatically reset Write operation errors detected. B0F(7:0) 32/180 ST10F271B/ST10F271E Internal Flash memory 5.4.4 Flash control register high Flash Control Register High (FCR1H), together with Flash Control Register (FCR1L), used select Sectors Erase, during write operation monitor status each Sector Bank. FCR1H (0x08 0006) reserved reserved Reset value: 0000h Table Flash control register high Function Bank Status (IFLASH) During erase operation, this automatically modified gives status Bank meaning given next Table Banks (BxS) Sectors (BxFy) Status bits meaning. This automatically reset erase operation errors detected. During erase operation, this automatically gives status Bank meaning B0Fy Sector Bank given next Table Banks (BxS) Sectors (BxFy) Status bits meaning. These bits automatically reset erase operation errors detected. Table Banks (BxS) sectors (BxFy) status bits meaning meaning Erase Error Bank Erase Suspended Bank Don't care B0Fy meaning Erase Error Sector Bank Erase Suspended Sector Bank Don't care SUSP 5.4.5 Flash data register Flash Address Registers (FARH/L) Flash Data Registers (FDR1H/L-FDR0H/L) used during program operations store Flash Address which program Data program. FDR0L (0x08 0008) Reset value: FFFFh DIN15 DIN14 DIN13 DIN12 DIN11 DIN10 DIN9 DIN8 DIN7 DIN6 DIN5 DIN4 DIN3 DIN2 DIN1 DIN0 Table Flash data register Function Data Input 15:0 These bits must written with Data program Flash with following operations: Word Program (32-bit), Double Word Program (64-bit) Protection. DIN(15:0) 33/180 Internal Flash memory ST10F271B/ST10F271E 5.4.6 Flash data register high FDR0H (0x08 000A) Reset value: FFFFh DIN31 DIN30 DIN29 DIN28 DIN27 DIN26 DIN25 DIN24 DIN23 DIN22 DIN21 DIN20 DIN19 DIN18 DIN17 DIN16 Table Flash data register high Function Data Input 31:16 These bits must written with Data program Flash with following operations: Word Program (32-bit), Double Word Program (64-bit) Protection. DIN(31:16) 5.4.7 Flash data register FDR1L (0x08 000C) Reset value: FFFFh DIN15 DIN14 DIN13 DIN12 DIN11 DIN10 DIN9 DIN8 DIN7 DIN6 DIN5 DIN4 DIN3 DIN2 DIN1 DIN0 Table Flash data register Function Data Input 15:0 These bits must written with Data program Flash with following operations: Word Program (32-bit), Double Word Program (64-bit) Protection. DIN(15:0) 5.4.8 Flash data register high FDR1H (0x08 000E) Reset value: FFFFh DIN31 DIN30 DIN29 DIN28 DIN27 DIN26 DIN25 DIN24 DIN23 DIN22 DIN21 DIN20 DIN19 DIN18 DIN17 DIN16 Table Flash data register high Function Data Input 31:16 These bits must written with Data program Flash with following operations: Word Program (32-bit), Double Word Program (64-bit) Protection. DIN(31:16) 34/180 ST10F271B/ST10F271E Internal Flash memory 5.4.9 Flash address register FARL (0x08 0010) Reset value: 0000h ADD15ADD14ADD13ADD12ADD11ADD10 ADD9 ADD8 ADD7 ADD6 ADD5 ADD4 ADD3 ADD2 reserved Table Flash address register Function Address 15:2 These bits must written with Address Flash location program following operations: Word Program (32-bit) Double Word Program (64-bit). Double Word Program ADD2 must written `0'. ADD(15:2) 5.4.10 Flash address register high FARH (0x08 0012) reserved Reset value: 0000h ADD20 ADD19 ADD18 ADD17 ADD16 Table Flash address register high Function Address 20:16 These bits must written with Address Flash location program following operations: Word Program Double Word Program. ADD(20:16) 35/180 Internal Flash memory ST10F271B/ST10F271E 5.4.11 Flash error register Flash Error register, well other Flash registers, properly read only once LOCK register FCR0L low. Nevertheless, content updated when also BSY0 reset well; this reason, definitively meaningful reading register content only when LOCK BSY0 cleared. (0x8 0014h) reserved Reset value: 0000h RESER SEQER reserved 10ER PGER ERER Table Flash error register Function Write Error This automatically when error occurs during Flash write operation when write operation setup done. Once error been discovered understood, must software reset. Erase Error This automatically when Erase error occurs during Flash write operation. This error real failure Flash cell, that more erased. This kind error fatal sector where occurred must discarded. This software reset. Program Error This automatically when Program error occurs during Flash write operation. This error real failure Flash cell, that more programmed. word where this error occurred must discarded. This software reset. over Error This automatically when trying program bits previously (this does happen when programming Protection bits). This error failure Flash cell, only flags that desired data been written. This software reset. Sequence Error This automatically when control registers (FCR1H/L-FCR0H/L, FARH/L, FDR1H/L-FDR0H/L) correctly filled execute valid Write Operation. this case Write Operation executed. This software reset. Resume Error This automatically when suspended Program Erase operation resumed correctly protocol error. this case suspended operation aborted. This software reset. Write Protection Flag This automatically when trying program erase sector write protected. case multiple Sector Erase, protected sectors erased, while protected sectors erased set. This software reset. ERER PGER 10ER SEQER RESER 36/180 ST10F271B/ST10F271E Internal Flash memory Protection strategy protection bits stored Volatile Flash cells inside IFLASH module, that read once reset stored Volatile registers. Before they read from Volatile cells, available protections forced active during reset. protections programmed using Protection operation (see Flash Control Registers paragraph), that executed from internal external memories except from Flash itself. kind protections available: write protections avoid unwanted writings access protections avoid piracy. next paragraphs different level protections shown, architecture limitations highlighted well. 5.5.1 Protection registers Volatile Protection Registers time programmable user. register (FNVWPIR) used store Write Protection fuses respectively each sector IFLASH module. other three Registers (FNVAPR0 FNVAPR1L/H) used store Access Protection fuses. 5.5.2 Flash volatile write protection register FNVWPIR (0x08 DFB0) Reset value: FFFFh reserved Table Flash volatile write protection register Function Write Protection Bank Sectors (IFLASH) These bits, programmed disable write access sectors Bank (IFLASH) W0P(9:0) 37/180 Internal Flash memory ST10F271B/ST10F271E 5.5.3 Flash volatile access protection register FNVAPR0 (0x08 DFB8) Reset value: ACFFh reserved DBGP ACCP Table Flash volatile access protection register Function Access Protection This bit, programmed disables access (read/write) data mapped inside IFlash Module address space, unless current instruction fetched from IFlash. Debug Protection This bit, erased allows by-pass protections using Debug features through Test Interface. programmed contrary, debug features, Test Interface Flash Test Modes disabled. Even STMicroelectronics will able access device eventual failure analysis. ACCP DBGP 5.5.4 Flash volatile access protection register FNVAPR1L (0x08 DFBC) Delivery value:: FFFFh PDS15 PDS14 PDS13 PDS12 PDS11 PDS10 PDS9 PDS8 PDS7 PDS6 PDS5 PDS4 PDS3 PDS2 PDS1 PDS0 Table Flash volatile access protection register Function Protections Disable 15-0 PDSx programmed PENx erased action ACCP disabled. PDS0 programmed only both bits DBGP ACCP have already been programmed PDSx programmed only PENx-1 already been programmed PDS(15:0) 38/180 ST10F271B/ST10F271E Internal Flash memory 5.5.5 Flash volatile access protection register high FNVAPR1H (0x08 DFBE) Delivery value: FFFFh PEN15PEN14PEN13PEN12PEN11PEN10 PEN9 PEN8 PEN7 PEN6 PEN5 PEN4 PEN3 PEN2 PEN1 PEN0 Table Flash volatile access protection register high Function Protections Enable 15-0 PENx programmed PDSx+1 erased action ACCP enabled again. PENx programmed only PDSx already been programmed PEN15-0 5.5.6 XBus flash volatile temporary access unprotection register (XFVTAUR0) XFVTAUR0 (0x00 EB50) Reset value: 0000h TAUB reserved Table XBus flash volatile temporary access unprotection register Function Temporary Access Unprotection this Access Protection temporary disabled. This written only executing from IFlash.This fact guarantees that only code executed IFlash, unprotect IFlash, when Access Protected. TAUB 5.5.7 Access protection I-Flash module level access protection (access data both Reading Writing): ACCP FNVAPR0 programmed TAUB XFVTAUR0 I-Flash module becomes access protected: data I-Flash module read only current execution from I-Flash module itself. enable Access Protection, following sequence operations recommended: execution from external memory internal Rams program TAUB XFVTAUR0 register program ACCP FNVAPR0 using Protection operation program TAUB XFVTAUR0 register Access Protection active when both ACCP TAUB Protection permanently disabled programming PDS0 FNVAPR1H, order analyze rejects. Protection permanently enabled again programming PEN0 FNVAPR1L. action disable enable again Access Protections permanent executed maximum times. execute above described operations, Flash temporary unprotected (See Section 5.5.9: Temporary unprotection) 39/180 Internal Flash memory ST10F271B/ST10F271E Trying write into access protected Flash from internal external memories will unsuccessful. Trying read into access protected Flash from internal external memories will output dummy data (software trap 0x009Bh). When Flash module protected access, also data access through peripheral forbidden. read/write data mode from/to protected Bank, first necessary temporary unprotect Flash module. following table summary levels possible Access protection reported: particular, supposing enable possible access protections, when fetching from memory listed first column, what possible what possible (see column headers) shown table. Figure Summary access protection level Read XRAMS Read IFLASH Jump Jump IFLASH XRAM Fetching from IFLASH Fetching from IRAM Fetching from XRAM Fetching from External Memory Read FLASH Registers Write FLASH Registers When Access Protection enabled, Flash registers written, program/erase operation I-Flash. enable access registers again, Temporary Access Unprotection procedure followed (see Section 5.5.9). 5.5.8 Write protection Flash modules have level Write Protections: each Sector each Bank each Flash Module Software Write Protected programming related W0Px FNVWPIRL register. 5.5.9 Temporary unprotection Bits W0Px FNVWPIRL temporary unprotected executing Protection operation writing into these bits. restore write protection bits necessary reset microcontroller execute Protection operation write into desired bits. reality, when temporary write unprotection operation executed, corresponding volatile register written while volatile registers bits previously written (for protection operation), will continue maintain this reason, User software must charge track current write protection status (for instance using specific area), possible deduce reading volatile register content temporary unprotection cannot detected). temporary unprotect Flash when Access Protection active, necessary TAUB XFVTAUR0. This write only executing from Flash: this only instruction executed from Flash unprotect Flash itself. restore Access Protection, necessary reset microcontroller write TAUB XFVTAUR0. 40/180 ST10F271B/ST10F271E Internal Flash memory Note: Write operation examples following, examples each kind Flash write operation presented. write operation commands must executed from another memory (internal external memory), ST10F269 device. fact, IBus characteristics, possible perform write operation Flash while fetching code from Flash. Moreover, direct addressing allowed write accesses IFlash control registers. This means that both address data writing operation must loaded ST10 register (R0.R15). Write operation IBus registers wide. Example indirect addressing mode RWm, #ADDRESS; RWn, #DATA; [RWm], RWn; /*Load RWm*/ /*Load Data RWn*/ /*Indirect addressing*/ Word program Example: 32-bit Word Program data 0xAAAAAAAA address 0x025554 FCR0H|= FARL FARH FDR0L FDR0H FCR0H|= 0x2000; 0x5554; 0x0002; 0xAAAA; 0xAAAA; 0x8000; /*Set FCR0H*/ /*Load FARL*/ /*Load FARH*/ /*Load Data FDR0L*/ /*Load Data FDR0H*/ /*Operation start*/ Double word program Example: Double Word Program (64-bit) data 0x55AA55AA address 0x035558 data 0xAA55AA55 address 0x03555C IFLASH Module. FCR0H FARL FARH FDR0L FDR0H FDR1L FDR1H FCR0H 0x1000; 0x5558; 0x0003; 0x55AA; 0x55AA; 0xAA55; 0xAA55; 0x8000; /*Set DWPG/ /*Load FARL*/ /*Load FARH*/ /*Load Data FDR0L*/ /*Load Data FDR0H*/ /*Load Data FDR1L*/ /*Load Data FDR1H*/ /*Operation start*/ Double Word Program always performed Double Word aligned even Word: ADD2 FARL ignored. Sector erase Example: Sector Erase sectors B0F1 B0F0 Bank IFLASH Module. FCR0H FCR1L FCR0H 0x0800; 0x0003; 0x8000; /*Set FCR0H*/ /*Set B0F1, B0F0*/ /*Operation start*/ 41/180 Internal Flash memory ST10F271B/ST10F271E Suspend resume Word Program, Double Word Program, Sector Erase operations suspended following way: FCR0H 0x4000; /*Set SUSP FCR0H*/ Then operation resumed following way: FCR0H FCR0H 0x0800; 0x8000; /*Set FCR0H*/ /*Operation resume*/ Before resuming suspended Erase, FCR1H/FCR1L must read check Erase already completed (FCR1H FCR1L 0x0000 Erase complete). Original setup Select Operation bits FCR0H/L must restored before operation resume, otherwise operation aborted RESER set. Erase suspend, program resume Sector Erase operation suspended order program (Word Double Word) another Sector. Example: Sector Erase sector B0F1 IFLASH Module. FCR0H FCR1L FCR0H 0x0800; 0x0002; 0x8000; /*Set FCR0H*/ /*Set B0F1*/ /*Operation start*/ Example: Sector Erase Suspend. FCR0H 0x4000; /*Set SUSP FCR0H*/ /*Loop wait LOCK=0 WMS=0*/ {tmp1 FCR0L; tmp2 FCR0H; while ((tmp1 0x0010) (tmp2 0x8000)); Example: Word Program data 0x5555AAAA address 0x045554 IFLASH module. FCR0H 0xBFFF; /*Rst SUSP FCR0H*/ FCR0H|= 0x2000;/*Set FCR0H*/ FARL 0x5554; /*Load FARL*/ FARH 0x0004; /*Load FARH*/ FDR0L 0xAAAA; /*Load Data FDR0L*/ FDR0H 0x5555; /*Load Data FDR0H*/ FCR0H 0x8000; /*Operation start*/ Once Program operation finished, Erase operation resumed following way: FCR0H|= 0x0800;/*Set FCR0H*/ FCR0H|= 0x8000;/*Operation resume*/ Notice that during Program Operation Erase suspend, bits SUSP low. Word Double Word Program during Erase Suspend cannot suspended. summary: 42/180 ST10F271B/ST10F271E Sector Erase suspended setting SUSP bit. Internal Flash memory perform Word Program operation during Erase Suspend, firstly bits SUSP must reset, then set. resume Sector Erase operation must again. case forbidden start write operation with SUSP already set. protection Example Enable Write Protection sectors B0F3-0 Bank IFLASH module. FCR0H FARL FARH FDR0L FDR0H FCR0H 0x0100; 0xDFB4; 0x0008; 0xFFF0; 0xFFFF; 0x8000; /*Set FCR0H*/ /*Load register FNVWPIR FARL*/ /*Load register FNVWPIR FARH*/ /*Load Data FDR0L*/ /*Load Data FDR0H*/ /*Operation start*/ Example Enable Access Debug Protection. FCR0H FARL FARH FDR0L FCR0H 0x0100; 0xDFB8; 0x0008; 0xFFFC; 0x8000; /*Set FCR0H*/ /*Load register FNVAPR0 FARL*/ /*Load register FNVAPR0 FARH*/ /*Load Data FDR0L*/ /*Operation start*/ Example Disable permanent Access Debug Protection. XFVTAUR0 0x0001; FCR0H 0x0100; FARL 0xDFBC; FARH 0x0008; FDR0L 0xFFFE; FCR0H 0x8000; /*Set TAUB XFVTAUR0*/ /*Set FCR0H*/ /*Load register FNVAPR1L FARL*/ /*Load register FNVAPR1L FARH*/ /*Load Data FDR0L clearing PDS0*/ /*Operation start*/ Example Enable again permanent Access Debug Protection, after having disabled them. XFVTAUR0 0x0001; FCR0H 0x0100; FARL 0xDFBC; FARH 0x0008; FDR0H 0xFFFE; PEN0*/ FCR0H 0x8000; XFVTAUR0 0x0000; /*Set TAUB XFVTAUR0*/ /*Set FCR0H*/ /*Load register FNVAPR1H FARL*/ /*Load register FNVAPR1H FARH*/ /*Load Data FDR0H clearing /*Operation start*/ /*Reset TAUB XFVTAUR0*/ Disable re-enable Access Debug Protection permanent shown examples done maximum times. 43/180 Internal Flash memory ST10F271B/ST10F271E Write operation summary general, each write operation started through sequence steps: first instruction used select desired operation setting corresponding selection Flash Control Register second step definition Address Data programming Sectors Banks erase. last instruction used start write operation, setting start FCR0. Once selected, started, operation canceled resetting operation selection bit. summary available Flash Module Write Operations shown following Table Flash write operations. Table Flash write operations Operation Word Program (32-bit) Select Address data FARL/FARH FDR0L/FDR0H FARL/FARH FDR0L/FDR0H FDR1L/FDR1H FCR1L/FCR1H FDR0L/FDR0H None Start Double Word Program (64-bit) Sector Erase Protection Program/Erase Suspend DWPG SUSP None 44/180 ST10F271B/ST10F271E Bootstrap loader Bootstrap loader ST10F271 implements Boot capabilities order Support bootstrap UART bootstrap standard bootstrap. Support Selective Bootstrap Loader, manage bootstrap sequence different way. Selection among user-code, standard selective bootstrap boot modes triggered with special combination Port0L[5.4]. Those signals, other configuration signals, latched rising edge RSTIN pin. Decoding reset configuration (P0L.5 P0L.4 will select normal mode (also called User Mode) select user Flash mapped from address 00'0000h. Decoding reset configuration (P0L.5 P0L.4 will select ST10 standard bootstrap mode (Test-Flash active overlaps user Flash code fetches from address 00'0000h; user Flash active available read accesses). Decoding reset configuration (P0L.5 P0L.4 will activate verifications select which bootstrap software execute: User mode signature User Flash programmed correctly, then software reset sequence selected User code executed; User mode signature programmed correctly user Flash, then User location read again. value will determine which communication channel will enabled bootstraping ST10F271 boot mode selection P0.4 ST10 decoding User Mode: user Flash mapped 00'0000h Standard Bootstrap Loader: User Flash mapped from 00'0000h, code fetches redirected Test-Flash 00'0000h Selective Boot Mode: User Flash mapped from 00'0000h, code fetches redirected Test-Flash 00'0000h (different sequence execution respect Standard Bootstrap Loader) Reserved Table P0.5 Standard bootstrap loader After entering standard mode respective initialization, ST10F271 scans RxD0 line CAN1_RxD line receive either valid dominant from interface, start condition from UART line. Start condition UART RxD: ST10F271 starts standard bootstrap loader. This bootstrap loader identical other ST10 devices (example: ST10F269, ST10F168). Valid dominant CAN1 RxD: ST10F271 start bootstrapping CAN1. 45/180 Bootstrap loader ST10F271B/ST10F271E 6.3.1 Alternate selective boot mode (ABM SBM) Activation Alternate boot activated with combination `01' Port0L[5.4] rising edge RSTIN. 6.3.2 User mode signature integrity check behavior Selective Boot Mode based computing signature between content memory locations comparison with reference signature. This requires that users Selective Boot have reserved programmed Flash memory locations. 6.3.3 Selective boot mode When user signature correct, instead executing Standard Bootstrap Loader (triggered P0L.4 reset), additional check made. Depending value User location, following behavior will occur: jump performed Standard Bootstrap Loader Only UART enabled bootstraping Only CAN1 enabled bootstraping device enters infinite loop. 46/180 ST10F271B/ST10F271E Central processing unit (CPU) Central processing unit (CPU) includes 4-stage instruction pipeline, 16-bit arithmetic logic unit (ALU) dedicated SFRs. Additional hardware been added separate multiply divide unit, bit-mask generator barrel shifter. Most ST10F271's instructions executed instruction cycle which requires 31.25ns clock. example, shift rotate instructions processed instruction cycle independent number bits shifted. Multiple-cycle instructions have been optimized: branches carried cycles, 16-bit multiplication cycles 32/16-bit division cycles. jump cache reduces execution time repeatedly performed jumps loop, from cycles cycle. uses bank word registers current context. This bank General Purpose Registers (GPR) physically stored within on-chip Internal (IRAM) area. Context Pointer (CP) register determines base address active register bank accessed CPU. number register banks only restricted available Internal space. easy parameter passing, register bank overlap others. system stack 2048 bytes provided storage temporary data. system stack allocated on-chip area, accessed stack pointer (SP) register. separate SFRs, STKOV STKUN, implicitly compared against stack pointer value upon each stack access detection stack overflow underflow. Figure block diagram (MAC Unit included) STKOV STKUN 128K Byte Flash memory SYSCON BUSCON BUSCON BUSCON BUSCON BUSCON Data Ptrs Exec. Unit Instr. 4-Stage Pipeline Mul./Div.-HW Bit-Mask Gen. Byte Internal Bank 16-Bit Barrel-Shift ADDRSEL ADDRSEL ADDRSEL ADDRSEL Code Seg. Ptr. General Purpose Registers Bank Bank 47/180 Central processing unit (CPU) ST10F271B/ST10F271E Multiplier-accumulator unit (MAC) co-processor specialized co-processor added ST10 Core order improve performances ST10 Family signal processing algorithms. standard ST10 been modified include addressing capabilities which enable supply co-processor with operands instruction cycle. This co-processor (so-called MAC) contains fast multiply-accumulate unit repeat unit. co-processor instructions extend ST10 instruction with multiply, multiplyaccumulate, 32-bit signed arithmetic operations. Figure unit architecture Operand Operand Pointers IDX0 Pointer IDX1 Pointer Offset Register Offset Register Offset Register Offset Register Concatenation signed/unsigned Multiplier Sign Extend Repeat Unit Interrupt Controller ST10 Scaler 08000h 40-bit Signed Arithmetic Unit 8-bit Left/Right Shifter Flags Control Unit Shared with standard 48/180 ST10F271B/ST10F271E Central processing unit (CPU) Instruction summary Table lists instructions ST10F271. detailed description each instruction found "ST10 Family Programming Manual". Table Standard instruction summary Description word (byte) operands word (byte) operands with Carry Subtract word (byte) operands Subtract word (byte) operands with Carry (Un)Signed multiply direct direct (16-16-bit) (Un)Signed divide register direct (16-/16-bit) (Un)Signed long divide reg. direct (32-/16-bit) Complement direct word (byte) Negate direct word (byte) Bit-wise AND, (word/byte operands) Bit-wise (word/byte operands) Bit-wise XOR, (word/byte operands) Clear direct direct Move (negated) direct direct AND/OR/XOR direct with direct Compare direct direct Bit-wise modify masked high/low byte bit-addressable direct word memory with immediate data Compare word (byte) operands Compare word data decrement Compare word data increment Determine number shift cycles normalize direct word store result direct word Shift left/right direct word Rotate left/right direct word Arithmetic (sign bit) shift right direct word Move word (byte) data Move byte operand word operand with sign extension Move byte operand word operand with zero extension Jump absolute/indirect/relative condition Jump absolute code segment Bytes 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 CMP(B) CMPD1/2 CMPI1/2 PRIOR ASHR MOV(B) MOVBS MOVBZ JMPA, JMPI, JMPR JMPS 49/180 Central processing unit (CPU) Table Standard instruction summary (continued) Description Jump relative direct (not) Jump relative clear direct Jump relative direct ST10F271B/ST10F271E Mnemonic J(N)B JNBS CALLA, CALLI, CALLR CALLS PCALL TRAP PUSH, SCXT RETS RETP RETI SRST IDLE PWRDN SRVWDT DISWDT EINIT ATOMIC EXTR EXTP(R) EXTS(R) Bytes Call absolute/indirect/relative subroutine condition Call absolute subroutine code segment Push direct word register onto system stack call absolute subroutine Call interrupt service routine immediate trap number Push/pop direct word register onto/from system stack Push direct word register onto system stack update register with word operand Return from intra-segment subroutine Return from inter-segment subroutine Return from intra-segment subroutine 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 RSTOUT-pin Begin ATOMIC sequence Begin EXTended Register sequence Begin EXTended Page (and Register) sequence Begin EXTended Segment (and Register) sequence Null operation 50/180 ST10F271B/ST10F271E Central processing unit (CPU) co-processor specific instructions Table lists instructions ST10F271. detailed description each instruction found "ST10 Family Programming Manual". Note that instructions encoded Bytes. Table instruction summary Mnemonic CoABS CoADD(2) CoASHR(rnd) CoCMP CoLOAD(-,2) CoMAC(R,u,s,-,rnd) CoMACM(R)(u,s,-,rnd) CoMAX CoMIN CoMOV CoMUL(u,s,-,rnd) CoNEG(rnd) CoNOP CoRND CoSHL CoSHR CoSTORE CoSUB(2,R) Description Absolute Value Accumulator Addition Accumulator Arithmetic Shift Right Optional Round Compare Accumulator with Operands Load Accumulator with Operands (Un)Signed/(Un)Signed Multiply-Accumulate Optional Round (Un)Signed/(Un)Signed Multiply-Accumulate with Parallel Data Move Optional Round Maximum Minimum Operands Accumulator Memory Memory Move (Un)Signed/(Un)Signed multiply Optional Round Negate Accumulator Optional Round No-Operation Round Accumulator Accumulator Logical Shift Left Right Store Unit Register Substraction 51/180 External controller ST10F271B/ST10F271E External controller external memory accesses performed on-chip external controller. programmed single chip mode when external memory required, four different external memory access modes: 24-bit addresses 16-bit data, demultiplexed 24-bit addresses 16-bit data, multiplexed 24-bit addresses 8-bit data, multiplexed 24-bit addresses 8-bit data, demultiplexed demultiplexed modes addresses output PORT1 data input output PORT0 P0L, respectively. multiplexed modes both addresses data PORT0 input output. Timing characteristics external interface (memory cycle time, memory tri-state time, length read write delay) programmable giving choice wide range memories external peripherals. four independent address windows defined (using register pairs ADDRSELx BUSCONx) access different resources characteristics. These address windows arranged hierarchically where BUSCON4 overrides BUSCON3 BUSCON2 overrides BUSCON1. accesses locations covered these four address windows controlled BUSCON0. five external signals (four windows plus default) generated order save external glue logic. Access very slow memories supported `Ready' function. HOLD HLDA protocol available arbitration which shares external resources with other masters. arbitration enabled setting HLDEN register PSW. After setting HLDEN once, pins P6.7.P6.5 (BREQ, HLDA, HOLD) automatically controlled EBC. master mode (default after reset) HLDA output. setting DP6.7 to'1' slave mode selected where HLDA switched input. This directly connects slave controller another master controller without glue logic. applications which require less external memory space, address space restricted Mbyte, Kbytes Kbytes. Port outputs eight address lines address space Bytes used, otherwise four, address lines. Chip select timing made programmable. default (after reset), lines change half clock cycle after rising edge ALE. With CSCFG SYSCON register lines change with rising edge ALE. active level READY RDYPOL BUSCONx registers. When READY function enabled specific address window, each cycle within window must terminated with active level defined RDYPOL associated BUSCON register. 52/180 ST10F271B/ST10F271E Interrupt system Interrupt system interrupt response time internal program execution from 78ns 187.5ns clock. ST10F271 architecture supports several mechanisms fast flexible response service requests that generated from various sources (internal external) microcontroller. these interrupt requests serviced Interrupt Controller Peripheral Event Controller (PEC). contrast standard interrupt service where current program execution suspended branch interrupt vector table performed, just cycle `stolen' from current activity perform service. service implies single Byte Word data transfer between memory locations with additional increment either source destination pointer. individual transfer counter implicitly decremented each service except when performing continuous transfer mode. When this counter reaches zero, standard interrupt performed corresponding source related vector location. services very well suited perform transmission reception blocks data. ST10F271 channels, each them offers such fast interrupt-driven data transfer capabilities. interrupt control register which contains interrupt request flag, interrupt enable flag interrupt priority bit-field dedicated each existing interrupt source. Thanks related register, each source programmed sixteen interrupt priority levels. Once starting processed CPU, interrupt service only interrupted higher prioritized service request. standard interrupt processing, each possible interrupt sources dedicated vector location. Software interrupts supported means `TRAP' instruction combination with individual trap (interrupt) number. Fast external interrupt inputs provided service external interrupts with high precision requirements. These fast interrupt inputs feature programmable edge detection (rising edge, falling edge both edges). Fast external interrupts also have interrupt sources selected from other peripherals; example CANx controller receive signals (CANx_RxD) serial clock signal used interrupt system. Table shows available ST10F271 interrupt sources corresponding hardware-related interrupt flags, vectors, vector locations trap (interrupt) numbers: Table Interrupt sources Request Flag CC0IR CC1IR CC2IR CC3IR CC4IR CC5IR Enable Flag CC0IE CC1IE CC2IE CC3IE CC4IE CC5IE Interrupt Vector CC0INT CC1INT CC2INT CC3INT CC4INT CC5INT Vector Location 00'0040h 00'0044h 00'0048h 00'004Ch 00'0050h 00'0054h Trap Number Source Interrupt Service Request CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register 53/180 Interrupt system Table Interrupt sources (continued) Request Flag CC6IR CC7IR CC8IR CC9IR CC10IR CC11IR CC12IR CC13IR CC14IR CC15IR CC16IR CC17IR CC18IR CC19IR CC20IR CC21IR CC22IR CC23IR CC24IR CC25IR CC26IR CC27IR CC28IR CC29IR CC30IR CC31IR T0IR T1IR T7IR T8IR T2IR T3IR T4IR T5IR Enable Flag CC6IE CC7IE CC8IE CC9IE CC10IE CC11IE CC12IE CC13IE CC14IE CC15IE CC16IE CC17IE CC18IE CC19IE CC20IE CC21IE CC22IE CC23IE CC24IE CC25IE CC26IE CC27IE CC28IE CC29IE CC30IE CC31IE T0IE T1IE T7IE T8IE T2IE T3IE T4IE T5IE Interrupt Vector CC6INT CC7INT CC8INT CC9INT CC10INT CC11INT CC12INT CC13INT CC14INT CC15INT CC16INT CC17INT CC18INT CC19INT CC20INT CC21INT CC22INT CC23INT CC24INT CC25INT CC26INT CC27INT CC28INT CC29INT CC30INT CC31INT T0INT T1INT T7INT T8INT T2INT T3INT T4INT T5INT ST10F271B/ST10F271E Source Interrupt Service Request CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Register CAPCOM Timer CAPCOM Timer CAPCOM Timer CAPCOM Timer GPT1 Timer GPT1 Timer GPT1 Timer GPT2 Timer Vector Location 00'0058h 00'005Ch 00'0060h 00'0064h 00'0068h 00'006Ch 00'0070h 00'0074h 00'0078h 00'007Ch 00'00C0h 00'00C4h 00'00C8h 00'00CCh 00'00D0h 00'00D4h 00'00D8h 00'00DCh 00'00E0h 00'00E4h 00'00E8h 00'00ECh 00'00F0h 00'0110h 00'0114h 00'0118h 00'0080h 00'0084h 00'00F4h 00'00F8h 00'0088h 00'008Ch 00'0090h 00'0094h Trap Number 54/180 ST10F271B/ST10F271E Table Interrupt sources (continued) Request Flag T6IR CRIR ADCIR ADEIR S0TIR S0TBIR S0RIR S0EIR SCTIR SCRIR SCEIR PWMIR XP0IR XP1IR XP2IR XP3IR Enable Flag T6IE CRIE ADCIE ADEIE S0TIE S0TBIE S0RIE S0EIE SCTIE SCRIE SCEIE PWMIE XP0IE XP1IE XP2IE XP3IE Interrupt Vector T6INT CRINT ADCINT ADEINT S0TINT S0TBINT S0RINT S0EINT SCTINT SCRINT SCEINT PWMINT XP0INT XP1INT XP2INT XP3INT Interrupt system Source Interrupt Service Request GPT2 Timer GPT2 CAPREL Register Conversion Complete Overrun Error ASC0 Transmit ASC0 Transmit Buffer ASC0 Receive ASC0 Error Transmit Receive Error Channel Paragraph Paragraph Paragraph Paragraph Vector Location 00'0098h 00'009Ch 00'00A0h 00'00A4h 00'00A8h 00'011Ch 00'00ACh 00'00B0h 00'00B4h 00'00B8h 00'00BCh 00'00FCh 00'0100h 00'0104h 00'0108h 00'010Ch Trap Number Hardware traps exceptions error conditions that arise during run-time. They cause immediate non-maskable system reaction similar standard interrupt service (branching dedicated vector table location). occurrence hardware trap additionally signified individual trap flag register (TFR). Except when another higher prioritized trap service progress, hardware trap will interrupt other program execution. Hardware trap services cannot interrupted standard interrupt interrupts. X-Peripheral interrupt limited number X-Bus interrupt lines present ST10 architecture, imposes some constraints implementation functionality. particular, additional XPeripherals SSC1, ASC1, I2C, PWM1 need some resources implement interrupt transfer capabilities. this reason, multiplexed structure interrupt management proposed. next Figure principle explained through simple diagram, which shows basic structure replicated each four X-interrupt available vectors (XP0INT, XP1INT, XP2INT XP3INT). based 16-bit registers XIRxSEL (x=0,1,2,3), divided portions each: Byte High Byte XIRxSEL[15:8] XIRxSEL[7:0] Interrupt Enable bits Interrupt Flag bits When different sources submit interrupt request, enable bits (Byte High XIRxSEL register) define mask which controls which sources will associated with unique 55/180 Interrupt system ST10F271B/ST10F271E available vector. more than source enabled issue request, service routine will have take care identify real event serviced. This easily done checking flag bits (Byte XIRxSEL register). Note that flag bits also provide information about events which currently serviced interrupt controller (since masked through enable bits), allowing effective software management also absence possibility serve related interrupt request: periodic polling flag bits implemented inside user application. Figure X-Interrupt basic structure Flag[7:0] Source Source Source Source Source Source Source Source Enable[7:0] XIRxSEL[7:0] XPxIC.XPxIR XIRxSEL[15:8] Table summarizes mapping different interrupt sources which shares four X-interrupt vectors. Table X-Interrupt detailed mapping XP0INT CAN1 Interrupt CAN2 Interrupt Receive Transmit Error SSC1 Receive SSC1 Transmit SSC1 Error ASC1 Receive ASC1 Transmit ASC1 Transmit Buffer XP1INT XP2INT XP3INT 56/180 ST10F271B/ST10F271E Table X-Interrupt detailed mapping (continued) XP0INT ASC1 Error Unlock PWM1 Channel Interrupt system XP1INT XP2INT XP3INT Exception error traps list Table shows possible exceptions error conditions that arise during runtime. Table Trap priorities Trap Flag Trap Vector RESET RESET RESET STKOF STKUF UNDOPC MACTRP PRTFLT ILLOPA ILLINA ILLBUS NMITRAP STOTRAP STUTRAP BTRAP BTRAP BTRAP BTRAP BTRAP BTRAP Vector Location 00'0000h 00'0000h 00'0000h 00'0008h 00'0010h 00'0018h 00'0028h 00'0028h 00'0028h 00'0028h 00'0028h 00'0028h [002Ch 003Ch] 0000h 01FCh steps Trap Number [0Bh 0Fh] [00h 7Fh] Current Priority Trap* Priority Exception Condition Reset Functions: Hardware Reset Software Reset Watchdog Timer Overflow Class Hardware Traps: Non-Maskable Interrupt Stack Overflow Stack Underflow Class Hardware Traps: Undefined Opcode Interruption Protected Instruction Fault Illegal word Operand Access Illegal Instruction Access Illegal External Access Reserved Software Traps TRAP Instruction Note: class traps have same trap number (and vector) same lower priority compare class traps resets. Each class traps dedicated trap number (and vector). They prioritized second priority level. resets have highest priority level same trap number. PSW.ILVL priority forced highest level (15) when these exceptions serviced. 57/180 Capture compare (CAPCOM) units ST10F271B/ST10F271E Capture compare (CAPCOM) units ST10F271 16-channel CAPCOM units which support generation control timing sequences channels with maximum resolution 125ns clock. CAPCOM units typically used handle high speed tasks such pulse waveform generation, pulse width modulation (PMW), Digital Analog (D/A) conversion, software timing, time recording relative external events. Four 16-bit timers (T0/T1, T7/T8) with reload registers provide independent time bases capture/compare register array. input clock timers programmable several prescaled values internal system clock, derived from overflow/underflow timer module GPT2. This provides wide range variation timer period resolution allows precise adjustments application specific requirements. addition, external count inputs CAPCOM timers allow event scheduling capture/compare registers relative external events. Each capture/compare register arrays contain dual purpose capture/compare registers, each which individually allocated either CAPCOM timer respectively), programmed capture compare functions. Each registers associated port which serves input triggering capture function, output indicate occurrence compare event. When capture/compare register been selected capture mode, current contents allocated timer will latched (captured) into capture/compare register response external event port which associated with this register. addition, specific interrupt request this capture/compare register generated. Either positive, negative, both positive negative external signal transition selected triggering event. contents registers which have been selected five compare modes continuously compared with contents allocated timers. When match occurs between timer value value capture compare register, specific actions will taken based selected compare mode. input frequencies fTx, timer input selector determined function clocks. timer input frequencies, resolution periods which result from selected pre-scaler option when using clock listed Table Table respectively. numbers timer periods based reload value 0000h. Note that some numbers rounded significant figures. 58/180 ST10F271B/ST10F271E Table Compare Modes Mode Mode Mode Mode Capture compare (CAPCOM) units Compare modes Function Interrupt-only compare mode; several compare interrupts timer period possible toggles each compare match; several compare events timer period possible Interrupt-only compare mode; only compare interrupt timer period generated match; reset compare time overflow; only compare event timer period generated Double Register registers operate pin; toggles each compare match; several Mode compare events timer period possible. Table CAPCOM timer input frequencies, resolutions periods Timer Input Selection fCPU 000b Pre-scaler fCPU 001b 010b 011b 100b 312.5 3.2µs 101b 156.25 6.4µs 110b 78.125 12.8µs 111b 1024 39.1 25.6µs 1.678s 5MHz 200ns 13.1ms Input Frequency Resolution Period 2.5MHz 1.25MHz 400ns 26.2ms 0.8µs 52.4ms 1.6µs 104.8 209.7ms 419.4ms 838.9ms Table CAPCOM timer input frequencies, resolutions periods Timer Input Selection fCPU 000b Pre-scaler fCPU 001b 4MHz 250ns 010b 2MHz 0.5µs 011b 1.0µs 100b 2.0µs 101b 4.0µs 110b 8.0µs 524.3ms 111b 1024 16.0µs 1.049s 8MHz 125ns 8.2ms Input Frequency Resolution Period 16.4ms 32.8ms 65.5ms 131.1ms 262.1ms 59/180 General purpose timer unit ST10F271B/ST10F271E General purpose timer unit unit flexible multifunctional timer/counter structure which used time related tasks such event timing counting, pulse width duty cycle measurements, pulse generation, pulse multiplication. unit contains five 16-bit timers organized into separate modules GPT1 GPT2. Each timer each module operate independently several different modes, concatenated with another timer same module. 11.1 GPT1 Each three timers GPT1 module configured individually four basic modes operation: timer, gated timer, counter mode incremental interface mode. timer mode, input clock timer derived from clock, divided programmable prescaler. counter mode, timer clocked reference external events. Pulse width duty cycle measurement supported gated timer mode where operation timer controlled `gate' level external input pin. these purposes, each timer associated port (TxIN) which serves gate clock input. Table Table list timer input frequencies, resolution periods each prescaler option 40MHz 64MHz clock respectively. Incremental Interface Mode, GPT1 timers (T2, directly connected incremental position sensor signals their respective inputs TxIN TxEUD. Direction count signals internally derived from these input signals that contents respective timer corresponds sensor position. third position sensor signal TOP0 connected interrupt input. Timer output toggle latches (TxOTL) which changes state each timer over flow underflow. state this latch output port pins (TxOUT) time monitoring external hardware components, used internally clock timers high resolution long duration measurements. addition their basic operating modes, timers configured reload capture registers timer Table GPT1 timer input frequencies, resolutions periods Timer Input Selection fCPU 000b Pre-scaler factor Input frequency 5MHz 001b 2.5MHz 010b 1.25 011b 100b 312.5 101b 156.25 110b 78.125 111b 1024 39.1 60/180 ST10F271B/ST10F271E Table General purpose timer unit GPT1 timer input frequencies, resolutions periods Timer Input Selection fCPU 000b Resolution Period maximum 200ns 13.1ms 001b 400ns 26.2ms 010b 0.8µs 52.4ms 011b 1.6µs 104.8 100b 3.2µs 101b 6.4µs 110b 12.8µs 838.9ms 111b 25.6µs 1.678s 209.7ms 419.4ms Table GPT1 timer input frequencies, resolutions periods Timer Input Selection fCPU 000b Pre-scaler factor Input Freq Resolution Period maximum 8MHz 125ns 8.2ms 001b 4MHz 250ns 16.4ms 010b 2MHz 0.5µs 32.8ms 011b 1.0µs 100b 2.0µs 101b 4.0µs 110b 8.0µs 524.3ms 111b 1024 16.0µs 1.049s 65.5ms 131.1ms 262.1ms Figure Block diagram GPT1 T2EUD Clock T2IN n=3.10 GPT1 Timer Mode Control Reload Capture Interrupt Request Clock T3IN T3EUD n=3.10 Mode Control T3OUT GPT1 Timer Capture T3OTL T4IN Clock T4EUD n=3.10 Mode Control Reload Interrupt Request GPT1 Timer Interrupt Request 61/180 General purpose timer unit ST10F271B/ST10F271E 11.2 GPT2 GPT2 module provides precise event control time measurement. includes timers (T5, capture/reload register (CAPREL). Both timers clocked with input clock which derived from clock programmable prescaler with external signals. count direction (up/down) each timer programmable software additionally altered dynamically external signal port (TxEUD). Concatenation timers supported output toggle latch (T6OTL) timer which changes state each timer overflow/underflow. state this latch used clock timer output port (T6OUT). overflow underflow timer additionally used clock CAPCOM timers cause reload from CAPREL register. CAPREL register capture contents timer based external signal transition corresponding port (CAPIN), timer optionally cleared after capture procedure. This allows absolute time differences measured pulse multiplication performed without software overhead. capture trigger (timer CAPREL) also generated upon transitions GPT1 timer inputs T3IN and/or T3EUD. This advantageous when operates Incremental Interface Mode. Table Table list timer input frequencies, resolution periods each prescaler option 40MHz 64MHz clock respectively. Table GPT2 timer input frequencies, resolutions periods Timer Input Selection fCPU 40MHz 000b Pre-scaler factor Input Freq Resolution Period maximum 10MHz 100ns 6.55ms 001b 5MHz 200ns 13.1ms 010b 2.5MHz 400ns 26.2ms 011b 1.25 0.8µs 52.4ms 100b 1.6µs 101b 312.5 3.2µs 110b 156.25 6.4µs 111b 78.125 12.8µs 838.9ms 104.8ms 209.7ms 419.4ms Table GPT2 timer input frequencies, resolutions periods Timer Input Selection fCPU 64MHz 000b Pre-scaler factor Input Freq Resolution Period maximum 16MHz 62.5ns 4.1ms 001b 8MHz 125ns 8.2ms 010b 4MHz 250ns 16.4ms 011b 2MHz 0.5µs 32.8ms 100b 1.0µs 65.5ms 101b 2.0µs 110b 4.0µs 111b 8.0µs 524.3ms 131.1ms 262.1ms 62/180 ST10F271B/ST10F271E Figure Block diagram GPT2 T5EUD Clock T5IN n=2.9 General purpose timer unit Mode Control GPT2 Timer Clear Capture Interrupt Request CAPIN GPT2 CAPREL Reload Interrupt Request Interrupt Request Toggle T6IN Clock T6EUD n=2.9 Mode Control GPT2 Timer T60TL T6OUT CAPCOM Timers 63/180 modules ST10F271B/ST10F271E modules pulse width modulation modules available ST10F271: standard PWM0 XBus PWM1. They generate four output signals each, using edge-aligned centre-aligned PWM. addition, modules generate burst signals single shot outputs. Table Table show frequencies different resolutions. level output signals selectable modules generate interrupt requests. Figure Block diagram module Period Register Match Comparator Clock Clock Input Control 16-bit Up/Down Counter Up/Down/ Clear Control Match Comparator Output Control Enable POUTx Shadow Register Write Control User readable writeable register Pulse Width Register Table Mode Clock/1 Clock/64 Mode Clock/1 Clock/64 unit frequencies resolutions clock Resolution 25ns 1.6µs Resolution 25ns 1.6µs 8-bit 156.25 2.44 8-bit 78.12 1.22 10-bit 39.1 610Hz 10-bit 19.53 305.17Hz 12-bit 9.77 152.6Hz 12-bit 4.88 76.29Hz 14-bit 2.44Hz 38.15Hz 14-bit 1.22 19.07Hz 16-bit 610Hz 9.54Hz 16-bit 305.2Hz 4.77Hz Table Mode Clock/1 Clock/64 Mode Clock/1 Clock/64 unit frequencies resolutions clock Resolution 15.6ns 1.0µs Resolution 15.6ns 1.0µs 8-bit 3.91 8-bit 1.95 10-bit 62.5 976.6Hz 10-bit 31.25 488.28Hz 12-bit 15.63 244.1Hz 12-bit 7.81 122.07Hz 14-bit 3.91Hz 61.01Hz 14-bit 1.95 30.52Hz 16-bit 977Hz 15.26Hz 16-bit 488.3Hz 7.63Hz 64/180 ST10F271B/ST10F271E Parallel ports 13.1 Parallel ports Introduction ST10F271 provides lines with programmable features. These capabilities bring very flexible adaptation this wide range applications. ST10F271 nine groups lines gathered follows: Port time 8-bit port named (Low less significant byte) (high most significant byte) Port time 8-bit port named Port 16-bit port Port 15-bit port (P3.14 line implemented) Port 8-bit port Port 16-bit port input only Port Port Port 8-bit ports These ports used general purpose bidirectional input output, software controlled with dedicated registers. example, output drivers ports configured (bitwise) push-pull open drain operation using ODPx registers. input threshold levels programmable (TTL/CMOS) ports. logic level clocked into input latch once state time, regardless whether port configured input output. threshold selected with PICON XPICON registers control bits. write operation port configured input causes value written into port output latch, while read operation returns latched state itself. readmodify-write operation reads value pin, modifies writes back output latch. Writing configured output (DPx.y=`1') causes output latch have written value, since output buffer enabled. Reading this returns value output latch. read-modify-write operation reads value output latch, modifies writes back output latch, thus also modifying level pin. lines support alternate function which detailed following description each port. 13.2 13.2.1 I/O's special features Open drain mode Some ports ST10F271 support open drain capability. This programmable feature used with external pull-up resistor, order wired logical function. This feature implemented ports (see respective sections), controlled through respective Open Drain Control Registers ODPx. 65/180 Parallel ports ST10F271B/ST10F271E 13.2.2 Input threshold control standard inputs ST10F271 determine status input signals according levels. order accept recognize noisy signals, CMOS input thresholds selected instead standard thresholds pins. These CMOS thresholds defined above thresholds feature higher hysteresis prevent inputs from toggling while respective input signal level near thresholds. Port Input Control registers PICON XPICON used select these thresholds each Byte indicated ports, this means 8-bit ports P0L, P0H, P1L, P1H, controlled each while ports controlled bits each. options individual direction output mode control available each pin, independent selected input threshold. 13.3 Alternate port functions Each port line associated programmable alternate input output function. PORT0 PORT1 used address data lines when accessing external memory. Besides, PORT1 provides also: Input capture lines additional analog input channels converter Port Port Port associated with capture inputs compare outputs CAPCOM units and/or with outputs PWM0 module, PWM1 module ASC1. Port also used fast external interrupt inputs timer input. Port includes alternate functions timers, serial interfaces, optional control signal system clock output (CLKOUT). Port outputs additional segment address A23.A16 systems where more than Kbytes memory access directly. addition, CAN1, CAN2 lines provided. Port used analog input channels converter timer control signals. Port provides optional arbitration signals (BREQ, HLDA, HOLD) chip select signals SSC1 lines. alternate output function used, direction this must programmed output (DPx.y=`1'), except some signals that used directly after reset configured automatically. Otherwise remains high-impedance state effected alternate output function. respective port latch should hold `1', because output ANDed with alternate output data (except output signals). alternate input function used, direction must programmed input (DPx.y=`0') external device driving pin. input direction default after reset. external device connected pin, however, also direction this output. this case, reflects state port output latch. Thus, alternate input function reads value stored port output latch. This used testing purposes allow software trigger alternate input function writing port output latch. most port lines, user software responsible setting proper direction when using alternate input output function pin. 66/180 ST10F271B/ST10F271E Parallel ports This done setting clearing direction control DPx.y before enabling alternate function. There port lines, however, where direction port line switched automatically. instance, multiplexed external modes PORT0, direction must switched several times instruction fetch order output addresses input data. Obviously, this cannot done through instructions. these cases, direction port line switched automatically hardware alternate function such enabled. determine appropriate level port output latches check alternate data output combined with respective port latch output. There basic structure port lines with only alternate input function. Port lines with only alternate output function, however, have different structures direction switched depending whether accessible user software alternate function mode. port lines that used these alternate functions used general purpose lines. 67/180 converter ST10F271B/ST10F271E converter 10-bit converter with 16+8 multiplexed input channels sample hold circuit integrated on-chip. automatic self-calibration adjusts converter module process parameter variations each reset event. sample time (for loading capacitors) conversion time programmable adjusted external circuitry. ST10F271B multiplexed input channels Port ST10F271E 16+8 multiplexed input channels Port Port selection between Port Port made XBus register. Refer User Manual detailed description. different accuracy guaranteed (Total Unadjusted Error) Port Port analog channels (with higher restrictions when overload conditions occur); particular, Port channels more accurate than Port ones. Refer Chapter Electrical characteristics details. converter input bandwidth limited achievable accuracy: supposing maximum error 0.5LSB (2mV) impacting global (TUE depends also other causes), worst case temperature process, maximum frequency sine wave analog signal around kHz. course, reduce effect input signal variation accuracy down 0.05LSB, maximum input frequency sine wave shall reduced static signal applied during sampling phase, series resistance shall greater than (this taking into account eventual input leakage). suggested connect capacitance analog input pins, order reduce effect charge partitioning (and consequent voltage drop error) between external internal capacitance: case filter necessary external capacitance must greater than 10nF minimize accuracy impact. Overrun error detection protection controlled ADDAT register. Either interrupt request generated when result previous conversion been read from result register time next conversion complete, next conversion suspended until previous result been read. applications which require less than 16+8 analog input channels, remaining channel inputs used digital input port pins. converter ST10F271 supports different conversion modes: Single channel single conversion: analog level selected channel sampled once converted. result conversion stored ADDAT register. Single channel continuous conversion: analog level selected channel repeatedly sampled converted. result conversion stored ADDAT register. Auto scan single conversion: analog level selected channels sampled once converted. After each conversion result stored ADDAT register. data transferred interrupt software management using powerful Peripheral Event Controller (PEC) data transfer. Auto scan continuous conversion: analog level selected channels repeatedly sampled converted. result conversion stored ADDAT 68/180 ST10F271B/ST10F271E converter register. data transferred interrupt software management using data transfer. Wait ADDAT read mode: When using continuous modes, order avoid overwrite result current conversion next one, ADWR ADCON control register must activated. Then, until ADDAT register read, result stored temporary buffer conversion hold. Channel injection mode: When using continuous modes, selected channel converted between without changing current operating mode. 10-bit data conversion stored ADRES field ADDAT2. current continuous mode remains active after single conversion completed. full calibration sequence performed after reset. This full calibration lasts 40.630 clock cycles. During this time, busy flag ADBSY indicate operation. compensates capacitance mismatch, calibration procedure does need update during normal operation. conversion performed during this time: ADBSY shall polled verify when calibration over, module able start convertion. 69/180 Serial channels ST10F271B/ST10F271E Serial channels Serial communication with other microcontrollers, microprocessors, terminals external peripheral components provided four serial interfaces: asynchronous synchronous serial channels (ASC0 ASC1) high-speed synchronous serial channel (SSC0 SSC1). Dedicated Baud rate generators standard Baud rates without requirement oscillator tuning. transmission, reception erroneous reception, separate interrupt vectors provided ASC0 SSC0 serial channel. more complex mechanism interrupt sources multiplexing implemented ASC1 SSC1 (XBus mapped). 15.1 Asynchronous synchronous serial interfaces asynchronous synchronous serial interfaces (ASC0 ASC1) provides serial communication between ST10F271 other microcontrollers, microprocessors external peripherals. 15.2 ASCx asynchronous mode asynchronous mode, 9-bit data transfer, parity generation number stop bits selected. Parity framing overrun error detection provided increase reliability data transfers. Transmission reception data double-buffered. Fullduplex communication Bauds fCPU) supported this mode. Table asynchronous baud rates reload value deviation errors (fCPU MHz) S0BRS `0', fCPU S0BRS `1', fCPU Baud Rate (Baud) Deviation Error 0.0% 0.0% +6.3% -7.0% +6.3% -0.8% +3.3% -1.4% +0.9% -1.4% +0.9% -0.2% +0.4% -0.2% +0.1% -0.2% +0.1% -0.1% +0.1% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 0006 0007 000D 000E 0014 0015 002A 002B 0055 0056 00AC 00AD 015A 015B 02B5 02B6 056B 056C 0AD8 0AD9 1FE8 1FE9 Baud Rate (Baud) Deviation Error 0.0% 0.0% +1.5% -7.0% +1.5% -3.0% +1.7% -1.4% +0.2% -1.4% +0.2% -0.6% +0.2% -0.2% +0.2% 0.0% 0.1% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 000A 000B 0015 0016 001F 0020 0040 0041 0081 0082 0103 0104 0207 0208 0410 0411 0822 0823 1045 1046 1FE8 1FE9 70/180 ST10F271B/ST10F271E Table Serial channels asynchronous baud rates reload value deviation errors (fCPU MHz) S0BRS `0', fCPU S0BRS `1', fCPU Baud Rate (Baud) Deviation Error 0.0% 0.0% +6.3% -7.0% +6.3% -0.8% +3.3% -1.4% +0.9% -1.4% +0.9% -0.2% +0.4% -0.2% +0.1% -0.2% +0.1% -0.1% +0.1% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 000A 000B 0016 0017 0021 0022 0044 0045 0089 008A 0114 0115 022A 015B 0456 0457 08AD 08AE 115B 115C 1FF2 1FF3 Baud Rate (Baud) Deviation Error 0.0% 0.0% +1.5% -7.0% +1.5% -3.0% +1.7% -1.4% +0.2% -1.4% +0.2% -0.6% +0.2% -0.2% +0.2% 0.0% 0.1% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 0010 0011 0022 0023 0033 0034 0067 0068 00CF 00D0 019F 01A0 0340 0341 0681 0682 0D04 0D05 1A09 1A0A 1FE2 1FE3 Note: deviation errors given Table Table rounded. avoid deviation errors Baud rate crystal (providing multiple ASC0 sampling frequency). 15.3 ASCx synchronous mode synchronous mode, data transmitted received synchronously shift clock which generated ST10F271. Half-duplex communication Baud fCPU) possible this mode. Table synchronous baud rates reload value deviation errors (fCPU MHz) S0BRS `0', fCPU S0BRS `1', fCPU Baud Rate (Baud) Deviation Error 0.0% 0.0% +2.6% -0.8% +0.9% -0.8% +0.9% -0.2% +0.4% -0.2% +0.1% -0.2% +0.1% -0.1% +0.1% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 001C 001D 003A 003B 0055 0056 00AC 00AD 015A 015B 02B5 02B6 056B 056C 0AD8 0AD9 Baud Rate (Baud) Deviation Error 0.0% 0.0% +1.5% -0.8% +0.3% -0.8% +0.2% -0.6% +0.2% -0.2% +0.2% 0.0% +0.1% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 002B 002C 0058 0059 0081 0082 0103 0104 0207 0208 0410 0411 0822 0823 1045 1046 71/180 Serial channels Table ST10F271B/ST10F271E synchronous baud rates reload value deviation errors (fCPU MHz) S0BRS `0', fCPU S0BRS `1', fCPU Baud Rate (Baud) Deviation Error 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 15B2 15B3 1FFD 1FFE Baud Rate (Baud) Deviation Error 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 15B2 15B3 1FE8 1FE9 Table synchronous baud rates reload value deviation errors (fCPU MHz) S0BRS `0', fCPU S0BRS `1', fCPU Baud Rate (Baud) Deviation Error 0.0% 0.0% +1.3% -0.8% +0.3% -0.8% +0.6% -0.1% +0.3% -0.1% +0.1% -0.1% 0.0% -0.1% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 002E 002F 005E 005F 0089 008A 0114 0115 022A 022B 0456 0457 08AD 08AE 115B 115C 1724 1725 1FF2 1FF3 Baud Rate (Baud) Deviation Error 0.0% 0.0% +0.6% -0.8% +0.6% -0.1% +0.2% -0.3% +0.2% -0.1% +0.0% -0.1% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% Reload Value (hex) 0000 0000 0046 0047 008D 008E 00CF 00D0 019F 01A0 0340 0341 0681 0682 0D04 0D05 1A09 1A0A 1FFB 1FFC Note: deviation errors given Table Table rounded. avoid deviation errors Baud rate crystal (providing multiple ASC0 sampling frequency) 15.4 High speed synchronous serial interfaces High-Speed Synchronous Serial Interfaces (SSC0 SSC1) provides flexible highspeed serial communication between ST10F271 other microcontrollers, microprocessors external peripherals. SSCx supports full-duplex half-duplex synchronous communication. serial clock signal generated SSCx itself (master mode) received from external master (slave mode). Data width, shift direction, clock polarity phase programmable. This allows communication with SPI-compatible devices. Transmission reception data double-buffered. 16-bit Baud rate generator provides SSCx with separate serial clock signal. serial channel SSCx dedicated 16-bit Baud rate generator with 16-bit reload capability, allowing Baud rate generation independent from timers. 72/180 ST10F271B/ST10F271E Serial channels Table Table list some possible Baud rates against required reload values resulting times clock respectively. maximum anyway limited 8Mbaud. Table synchronous baud rate reload values (fCPU MHz) Baud Rate Reserved used only with fCPU lower) 6.6M Baud Baud 2.5M Baud Baud 100K Baud Baud Ba Other recent searchesTMP86FH46ANG - TMP86FH46ANG TMP86FH46ANG Datasheet SN74ALVCH16525 - SN74ALVCH16525 SN74ALVCH16525 Datasheet Si7940DP - Si7940DP Si7940DP Datasheet RS-232 - RS-232 RS-232 Datasheet RS-422 - RS-422 RS-422 Datasheet LC78833M - LC78833M LC78833M Datasheet LA7851 - LA7851 LA7851 Datasheet GCSS5580 - GCSS5580 GCSS5580 Datasheet DSP56303 - DSP56303 DSP56303 Datasheet CNZ3731 - CNZ3731 CNZ3731 Datasheet AP3710 - AP3710 AP3710 Datasheet
Privacy Policy | Disclaimer |