ST72F361K9T6 STMicroelectronics, ST72F361K9T6 Datasheet
![MCU 8BIT 60KB FLASH MEM 32-LQFP](/photos/12/25/122537/st72f361k9t6_sml.jpg)
ST72F361K9T6
Specifications of ST72F361K9T6
Available stocks
Related parts for ST72F361K9T6
ST72F361K9T6 Summary of contents
Page 1
Features Memories ■ – 16K to 60K High Density Flash (HDFlash) or ROM with read-out protection capability. In- Application Programming and In-Circuit Pro- gramming for HDFlash devices – 1 RAM – HDFlash endurance: 100 cycles, data reten- tion ...
Page 2
DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Page 3
ON-CHIP PERIPHERALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Page 4
ST72361 1 DESCRIPTION The ST72361 devices are members of the ST7 mi- crocontroller family designed for mid-range appli- cations with LIN (Local Interconnect Network) in- terface. All devices are based on a common industry- standard 8-bit core, featuring an enhanced ...
Page 5
PIN DESCRIPTION Figure 2. LQFP 64-Pin Package Pinout OSC1 OSC2 ARTIC1 / PA0 PWM0 / PA1 PWM1 / (HS) PA2 PWM2 / PA3 PWM3 / PA4 V SS_3 V DD_3 ARTCLK / (HS) PA5 ARTIC2 / (HS) PA6 T8_OCMP2 ...
Page 6
ST72361 PIN DESCRIPTION (Cont’d) Figure 3. LQFP 44-Pin Package Pinout OSC1 OSC2 PWM0 / PA1 PWM1 / (HS) PA2 PWM2 / PA3 PWM3 / PA4 ARTCLK / (HS) PA5 ARTIC2 / (HS) PA6 T8_OCMP1 / PB1 T8_ICAP1 / PB2 MCO ...
Page 7
PIN DESCRIPTION (Cont’d) Figure 4. LQFP 32-Pin Package Pinout OSC1 OSC2 PWM0 / PA1 PWM1 / (HS) PA2 ARTCLK / (HS) PA5 T8_OCMP1 / PB1 T8_ICAP1 / PB2 MCO / PB3 For external pin connection guidelines, refer ...
Page 8
ST72361 PIN DESCRIPTION (Cont’d) For external pin connection guidelines, refer to Legend / Abbreviations for Table Type input output supply In/Output level CMOS 0. TTL 0. with ...
Page 9
Pin n° Pin Name PB6 / AIN2 / T16_OCMP1 SS_2 DD_2 PB7 /AIN3 / T16_OCMP2 PC0 / AIN4 / T16_ICAP1 ...
Page 10
ST72361 Pin n° Pin Name PD4 / SCI2_RDI SSA SS_0 DDA DD_0 PD5 / SCI2_TDO ...
Page 11
REGISTER AND MEMORY MAP As shown in Figure 5, the MCU is capable of ad- dressing 64 Kbytes of memories and I/O registers. The available memory locations consist of 128 bytes of register locations Kbytes of ...
Page 12
ST72361 Register Address Block Label 000Fh PFDR 0010h Port F PFDDR 0011h PFOR 0012h to 0020h 0021h SPIDR 0022h SPI SPICR 0023h SPICSR 0024h FLASH FCSR 0025h ISPR0 0026h ISPR1 0027h ISPR2 ITC 0028h ISPR3 0029h EICR0 002Ah EICR1 002Bh ...
Page 13
Register Address Block Label 0048h SCI1ISR 0049h SCI1DR 004Ah SCI1BRR LINSCI1 004Bh SCI1CR1 (LIN Master/ 004Ch SCI1CR2 Slave) 004Dh SCI1CR3 004Eh SCI1ERPR 004Fh SCI1ETPR 0050h 0051h T16CR2 0052h T16CR1 0053h T16CSR 0054h T16IC1HR 0055h T16IC1LR 0056h T16OC1HR 0057h T16OC1LR 16-BIT ...
Page 14
ST72361 4 FLASH PROGRAM MEMORY 4.1 INTRODUCTION The ST7 dual voltage High Density Flash (HDFlash non-volatile memory that can be electrically erased as a single block or by individu- al sectors and programmed on a Byte-by-Byte ba- sis ...
Page 15
FLASH PROGRAM MEMORY (Cont’d) 4.4 ICC INTERFACE ICC (In-Circuit Communication) needs a minimum of four and up to six pins to be connected to the programming tool (see Figure – RESET: device reset – device power supply ground ...
Page 16
... Flash memory programming can be fully custom- ized (number of bytes to program, program loca- tions, or selection serial communication interface for downloading). When using an STMicroelectronics or third-party programming tool that supports ICP and the spe- cific microcontroller device, the user needs only to implement the ICP hardware interface on the ap- ...
Page 17
CENTRAL PROCESSING UNIT 5.1 INTRODUCTION This CPU has a full 8-bit architecture and contains six internal registers allowing efficient 8-bit data manipulation. 5.2 MAIN FEATURES Enable executing 63 basic instructions ■ Fast 8-bit by 8-bit multiply ■ 17 main ...
Page 18
ST72361 CENTRAL PROCESSING UNIT (Cont’d) Condition Code Register (CC) Read/Write Reset Value: 111x1xxx The 8-bit Condition Code register contains the in- terrupt masks and four flags representative of the result of the instruction just ...
Page 19
CENTRAL PROCESSING UNIT (Cont’d) Stack Pointer (SP) Read/Write Reset Value: 01 FFh SP7 SP6 SP5 SP4 SP3 The Stack Pointer is a 16-bit register which is al- ways pointing to the next free ...
Page 20
ST72361 6 SUPPLY, RESET AND CLOCK MANAGEMENT The device includes a range of utility features for securing the application in critical situations (for example, in case of a power brown-out), and re- ducing the number of external components. An overview ...
Page 21
MULTI-OSCILLATOR (MO) The main clock of the ST7 can be generated by two different source types coming from the multi- oscillator block: an external source ■ a crystal or ceramic resonator oscillator ■ Each oscillator is optimized for a ...
Page 22
ST72361 6.3 RESET SEQUENCE MANAGER (RSM) 6.3.1 Introduction The reset sequence manager includes three RE- SET sources as shown in Figure External RESET source pulse ■ Internal LVD RESET (Low Voltage Detection) ■ Internal WATCHDOG RESET ■ These sources act ...
Page 23
RESET SEQUENCE MANAGER (Cont’d) The RESET pin is an asynchronous signal which plays a major role in EMS performance noisy environment recommended to follow the guidelines mentioned in the electrical characteris- tics section. 6.3.3 External Power-On ...
Page 24
ST72361 6.4 SYSTEM INTEGRITY MANAGEMENT (SI) The System Integrity Management block contains the Low Voltage Detector (LVD) and Auxiliary Volt- age Detector (AVD) functions managed by the SICSR register. 6.4.1 Low Voltage Detector (LVD) The Low Voltage Detector ...
Page 25
SYSTEM INTEGRITY MANAGEMENT (Cont’d) 6.4.2 Auxiliary Voltage Detector (AVD) The Voltage Detector function (AVD) is based on an analog comparison between reference value and the V IT+(AVD) ply. The V reference value for falling volt- IT-(AVD) age ...
Page 26
ST72361 SYSTEM INTEGRITY MANAGEMENT (Cont’d) 6.4.3 Low Power Modes Mode Description No effect on SI. AVD interrupts cause the WAIT device to exit from Wait mode. HALT The SICSR register is frozen. 6.4.3.1 Interrupts The AVD interrupt event generates an ...
Page 27
SYSTEM INTEGRITY MANAGEMENT (Cont’d) 6.4.4 Register Description SYSTEM INTEGRITY (SI) CONTROL/STATUS REGISTER (SICSR) Read / Write Reset Value: 000x 000x (00h) 7 AVD AVD LVD Bit 7 = Reserved, must be kept cleared. Bit 6 ...
Page 28
ST72361 7 INTERRUPTS 7.1 INTRODUCTION The ST7 enhanced interrupt management pro- vides the following features: Hardware interrupts ■ Software interrupt (TRAP) ■ Nested or concurrent interrupt management ■ with flexible interrupt priority management: – software programmable nesting ...
Page 29
INTERRUPTS (Cont’d) Servicing Pending Interrupts As several interrupts can be pending at the same time, the interrupt to be taken into account is deter- mined by the following two-step process: – the highest software priority interrupt is serviced, – if ...
Page 30
ST72361 INTERRUPTS (Cont’d) 7.3 INTERRUPTS AND LOW POWER MODES All interrupts allow the processor to exit the WAIT low power mode. On the contrary, only external and other specified interrupts allow the processor to exit from the HALT modes (see ...
Page 31
INTERRUPTS (Cont’d) 7.5 INTERRUPT REGISTER DESCRIPTION CPU CC REGISTER INTERRUPT BITS Read / Write Reset Value: 111x 1010 (xAh Bit I1, I0 Software Interrupt Priority These two bits indicate the current ...
Page 32
ST72361 INTERRUPTS (Cont’d) Table 8. Dedicated Interrupt Instruction Set Instruction New Description HALT Entering Halt mode IRET Interrupt routine return JRM Jump if I1 (level 3) JRNM Jump if I1:0 <> 11 POP CC Pop CC from the ...
Page 33
INTERRUPTS (Cont’d) Table 9. Interrupt Mapping Source N° Block RESET Reset TRAP Software interrupt 0 TLI External top level interrupt 1 MCC/RTC Main clock controller time base interrupt 2 ei0/AWUFH External interrupt ei0/ Auto wake-up from Halt 3 ei1/AVD External ...
Page 34
ST72361 INTERRUPTS (Cont’d) 7.6 EXTERNAL INTERRUPTS 7.6.1 I/O Port Interrupt Sensitivity The external interrupt sensitivity is controlled by the ISxx bits in the EICR register control allows up to four fully independent external interrupt source sensitivities. Each external interrupt source ...
Page 35
INTERRUPTS (Cont’d) 7.6.2 Register Description EXTERNAL INTERRUPT CONTROL REGISTER 0 (EICR0) Read / Write Reset Value: 0000 0000 (00h) 7 IS31 IS30 IS21 IS20 IS11 Bits 7:6 = IS3[1:0] ei3 sensitivity The interrupt sensitivity, defined using the IS3[1:0] bits, is ...
Page 36
ST72361 INTERRUPTS (Cont’d) Table 10. Nested Interrupts Register Map and Reset Values Address Register 7 (Hex.) Label 0025h ISPR0 I1_3 Reset Value 1 0026h ISPR1 I1_7 1 Reset Value 0027h ISPR2 I1_11 1 Reset Value 0028h ISPR3 Reset Value 1 ...
Page 37
POWER SAVING MODES 8.1 INTRODUCTION To give a large measure of flexibility to the applica- tion in terms of power consumption, five main pow- er saving modes are implemented in the ST7 (see Figure 22): Slow ■ Wait (and ...
Page 38
ST72361 POWER SAVING MODES (Cont’d) 8.3 WAIT MODE WAIT mode places the MCU in a low power con- sumption mode by stopping the CPU. This power saving mode is selected by calling the ‘WFI’ instruction. All peripherals remain active. During ...
Page 39
POWER SAVING MODES (Cont’d) 8.4 HALT MODE The HALT mode is the lowest power consumption mode of the MCU entered by executing the ‘HALT’ instruction when the OIE bit of the Main Clock Controller Status register (MCCSR) is ...
Page 40
ST72361 POWER SAVING MODES (Cont’d) Halt Mode Recommendations – Make sure that an external event is available to wake up the microcontroller from Halt mode. – When using an external interrupt to wake up the microcontroller, reinitialize the corresponding I/O ...
Page 41
POWER SAVING MODES (Cont’d) Figure 27. ACTIVE HALT Timing Overview ACTIVE 256 OR 4096 CYCLE RUN HALT DELAY (AFTER RESET) RESET OR HALT INTERRUPT INSTRUCTION (Active Halt enabled) Figure 28. ACTIVE HALT Mode Flow-chart OSCILLATOR HALT INSTRUCTION PERIPHERALS (MCCSR.OIE=1) CPU ...
Page 42
ST72361 POWER SAVING MODES (Cont’d) 8.6 AUTO WAKE-UP FROM HALT MODE Auto Wake-Up From Halt (AWUFH) mode is simi- lar to Halt mode with the addition of an internal RC oscillator for wake-up. Compared to ACTIVE HALT mode, AWUFH has ...
Page 43
POWER SAVING MODES (Cont’d) Figure 31. AWUFH Mode Flow-chart HALT INSTRUCTION (MCCSR.OIE=0) (AWUCSR.AWUEN=1) ENABLE 0 1) WDGHALT 1 AWU RC OSC WATCHDOG MAIN OSC RESET PERIPHERALS CPU I[1:0] BITS INTERRUPT AWU RC OSC Y MAIN OSC PERIPHERALS ...
Page 44
ST72361 POWER SAVING MODES (Cont’d) 8.6.1 Register Description AWUFH CONTROL/STATUS REGISTER (AWUCSR) Read / Write (except bit 2 read only) Reset Value: 0000 0000 (00h Bits 7:3 = Reserved. Bit 2 = AWUF Auto ...
Page 45
I/O PORTS 9.1 INTRODUCTION The I/O ports offer different functional modes: – transfer of data through digital inputs and outputs and for specific pins: – external interrupt generation – alternate signal input/output for the on-chip pe- ripherals. An I/O ...
Page 46
ST72361 I/O PORTS (Cont’d) Figure 32. I/O Port General Block Diagram ALTERNATE REGISTER OUTPUT ACCESS ALTERNATE ENABLE DR DDR OR If implemented OR SEL DDR SEL DR SEL 1 0 EXTERNAL INTERRUPT SOURCE ( Table 12. I/O Port ...
Page 47
I/O PORTS (Cont’d) Table 13. I/O Port Configurations NOT IMPLEMENTED IN V TRUE OPEN DRAIN I/O PORTS PAD NOT IMPLEMENTED IN TRUE OPEN DRAIN V I/O PORTS PAD NOT IMPLEMENTED IN TRUE OPEN DRAIN V I/O PORTS PAD Notes: 1. ...
Page 48
ST72361 I/O PORTS (Cont’d) CAUTION: The alternate function must not be ac- tivated as long as the pin is configured as input with interrupt, in order to avoid generating spurious interrupts. Analog alternate function When the pin is used as ...
Page 49
I/O PORTS (Cont’d) 9.6 I/O PORT REGISTER CONFIGURATIONS The I/O port register configurations are summa- rized as follows. 9.6.1 Standard Ports PB7:6, PC0, PC3, PC7:5, PD3:2, PD5, PE7:0, PF7:0 MODE floating input pull-up input open drain output push-pull output 9.6.2 ...
Page 50
ST72361 I/O PORTS (Cont’d) Table 14. Port Configuration Port Pin name PA0 PA1 PA2 PA3 Port A PA4 PA5 PA6 PA7 PB0 PB1 PB2 Port B PB3 PB4 PB5 PC0 PC1 PC2 Port C PC3 PC4 PC7:5 PD0 PD1 PD3:2 ...
Page 51
I/O PORTS (Cont’d) Table 15. I/O Port Register Map and Reset Values Address Register 7 (Hex.) Label Reset Value 0 of all IO port registers 0000h PADR 0001h PADDR MSB 0002h PAOR 0003h PBDR 0004h PBDDR MSB 0005h PBOR 0006h ...
Page 52
ST72361 10 ON-CHIP PERIPHERALS 10.1 WINDOW WATCHDOG (WWDG) 10.1.1 Introduction The Window Watchdog is used to detect the oc- currence of a software fault, usually generated by external interference or by unforeseen logical con- ditions, which causes the application program ...
Page 53
WINDOW WATCHDOG (Cont’d) The application program must write in the WDGCR register at regular intervals during normal operation to prevent an MCU reset. This operation must occur only when the counter value is lower than the window register value. The ...
Page 54
ST72361 WINDOW WATCHDOG (Cont’d) 10.1.5 How to Program the Watchdog Timeout Figure 2 shows the linear relationship between the 6-bit value to be loaded in the Watchdog Counter (CNT) and the resulting timeout duration in milli- seconds. This can be ...
Page 55
WINDOW WATCHDOG (Cont’d) Figure 36. Exact Timeout Duration (t WHERE (LSB + 128 min0 OSC2 t = 16384 x t max0 OSC2 t = 125ns MHz OSC2 OSC2 CNT = ...
Page 56
ST72361 WINDOW WATCHDOG (Cont’d) Figure 37. Window Watchdog Timing Diagram T[5:0] CNT downcounter WDGWR 3Fh T6 bit Reset 10.1.6 Low Power Modes Mode Description SLOW No effect on Watchdog: The downcounter continues to decrement at normal speed. WAIT No effect ...
Page 57
WINDOW WATCHDOG (Cont’d) 10.1.9 Interrupts None. 10.1.10 Register Description CONTROL REGISTER (WDGCR) Read / Write Reset Value: 0111 1111 ( WDGA Bit 7 = WDGA Activation bit. This bit is set by software and ...
Page 58
ST72361 ON-CHIP PERIPHERALS (Cont’d) 10.2 MAIN CLOCK CONTROLLER WITH REAL TIME CLOCK MCC/RTC The Main Clock Controller consists of three differ- ent functions: ■ a programmable CPU clock prescaler a clock-out signal to supply external devices ■ a real time ...
Page 59
MAIN CLOCK CONTROLLER WITH REAL TIME CLOCK (Cont’d) 10.2.4 Low Power Modes Mode Description No effect on MCC/RTC peripheral. WAIT MCC/RTC interrupt cause the device to exit from WAIT mode. No effect on MCC/RTC counter (OIE bit is set), the ...
Page 60
ST72361 MAIN CLOCK CONTROLLER WITH REAL TIME CLOCK (Cont’d) Bit 0 = OIF Oscillator interrupt flag This bit is set by hardware and cleared by software reading the CSR register. It indicates when set that the main oscillator has reached ...
Page 61
ON-CHIP PERIPHERALS (Cont’d) 10.3 PWM AUTO-RELOAD TIMER (ART) 10.3.1 Introduction The Pulse Width Modulated Auto-Reload Timer on-chip peripheral consists of an 8-bit auto reload counter with compare/capture capabilities and of a 7-bit prescaler clock source. These resources allow five possible ...
Page 62
ST72361 PWM AUTO-RELOAD TIMER (Cont’d) 10.3.2 Functional Description Counter The free running 8-bit counter is fed by the output of the prescaler, and is incremented on every ris- ing edge of the clock signal possible to read or ...
Page 63
PWM AUTO-RELOAD TIMER (Cont’d) Independent PWM signal generation This mode allows up to four Pulse Width Modulat- ed signals to be generated on the PWMx output pins with minimum core processing overhead. This function is stopped during HALT mode. Each ...
Page 64
ST72361 PWM AUTO-RELOAD TIMER (Cont’d) Output compare and Time base interrupt On overflow, the OVF flag of the ARTCSR register is set and an overflow interrupt request is generat the overflow interrupt enable bit, OIE, in the ARTCSR ...
Page 65
PWM AUTO-RELOAD TIMER (Cont’d) Input Capture Function Input Capture mode allows the measurement of external signal pulse widths through ARTICRx registers. Each input capture can generate an interrupt inde- pendently on a selected input signal transition. This event is flagged ...
Page 66
ST72361 PWM AUTO-RELOAD TIMER (Cont’d) Figure 46. input Capture Timing Diagram CPU f COUNTER COUNTER 03h ARTICx PIN CFx FLAG ICRx REGISTER f CPU f COUNTER COUNTER 03h ARTICx PIN CFx FLAG ICRx REGISTER External Interrupt Capability This ...
Page 67
ON-CHIP PERIPHERALS (Cont’d) 10.3.3 Register Description CONTROL / STATUS REGISTER (ARTCSR) Read / Write Reset Value: 0000 0000 (00h) 7 EXCL CC2 CC1 CC0 TCE Bit 7 = EXCL External Clock This bit is set and cleared by software. It ...
Page 68
ST72361 ON-CHIP PERIPHERALS (Cont’d) PWM CONTROL REGISTER (PWMCR) Read / Write Reset Value: 0000 0000 (00h) 7 OE3 OE2 OE1 OE0 OP3 Bit 7:4 = OE[3:0] PWM Output Enable These bits are set and cleared by software. They enable or ...
Page 69
ON-CHIP PERIPHERALS (Cont’d) INPUT CAPTURE CONTROL / STATUS REGISTER (ARTICCSR) Read / Write Reset Value: 0000 0000 (00h CS2 CS1 CIE2 Bit 7:6 = Reserved, always read as 0. Bit 5:4 = CS[2:1] Capture Sensitivity These bits ...
Page 70
ST72361 PWM AUTO-RELOAD TIMER (Cont’d) Table 17. PWM Auto-Reload Timer Register Map and Reset Values Address Register 7 Label (Hex.) PWMDCR3 DC7 0031h 0 Reset Value PWMDCR2 DC7 0032h 0 Reset Value PWMDCR1 DC7 0033h 0 Reset Value PWMDCR0 DC7 ...
Page 71
TIMER 10.4.1 Introduction The timer consists of a 16-bit free-running counter driven by a programmable prescaler. It may be used for a variety of purposes, including pulse length measurement two input sig- nals (input capture) ...
Page 72
ST72361 16-BIT TIMER (Cont’d) Figure 48. Timer Block Diagram f CPU 8 high EXEDG 1/2 COUNTER 1/4 REGISTER 1/8 ALTERNATE EXTCLK pin COUNTER REGISTER CC[1:0] OVERFLOW DETECT CIRCUIT ICF1 OCF1 TOF ICF2 (Control/Status Register) ICIE OCIE TOIE FOLV2 (See note) ...
Page 73
TIMER (Cont’d) 16-bit read sequence: (from either the Counter Register or the Alternate Counter Register). Beginning of the sequence Read MS Byte At t0 Other instructions Returns the buffered Read At t0 +Δt LS Byte value ...
Page 74
ST72361 16-BIT TIMER (Cont’d) Figure 49. Counter Timing Diagram, Internal Clock Divided by 2 CPU CLOCK INTERNAL RESET TIMER CLOCK COUNTER REGISTER TIMER OVERFLOW FLAG (TOF) Figure 50. Counter Timing Diagram, Internal Clock Divided by 4 CPU CLOCK INTERNAL RESET ...
Page 75
TIMER (Cont’d) 10.4.3.3 Input Capture In this section, the index, i, may because there are two input capture functions in the 16-bit timer. The two 16-bit input capture registers (IC1R and IC2R) are used to ...
Page 76
ST72361 16-BIT TIMER (Cont’d) Figure 52. Input Capture Block Diagram ICAP1 pin EDGE DETECT CIRCUIT2 ICAP2 pin IC2R Register 16-BIT 16-BIT FREE RUNNING COUNTER Figure 53. Input Capture Timing Diagram TIMER CLOCK COUNTER REGISTER ICAPi PIN ICAPi FLAG ICAPi REGISTER ...
Page 77
TIMER (Cont’d) 10.4.3.4 Output Compare In this section, the index, i, may because there are two output compare functions in the 16- bit timer. This function can be used to control an output waveform or ...
Page 78
ST72361 16-BIT TIMER (Cont’d) Notes: 1. After a processor write cycle to the OCiHR reg- ister, the output compare function is inhibited until the OCiLR register is also written the OCiE bit is not set, the OCMPi pin ...
Page 79
TIMER (Cont’d) Figure 55. Output Compare Timing Diagram, f INTERNAL CPU CLOCK COUNTER REGISTER OUTPUT COMPARE REGISTER i (OCRi) OUTPUT COMPARE FLAG i (OCFi) OCMPi PIN (OLVLi = 1) Figure 56. Output Compare Timing Diagram, f INTERNAL CPU CLOCK ...
Page 80
ST72361 16-BIT TIMER (Cont’d) 10.4.3.5 One Pulse Mode One Pulse mode enables the generation of a pulse when an external event occurs. This mode is selected via the OPM bit in the CR2 register. The One Pulse mode uses the ...
Page 81
TIMER (Cont’d) Figure 57. One Pulse Mode Timing Example IC1R 01F8 COUNTER ICAP1 OCMP1 Note: IEDG1 = 1, OC1R = 2ED0h, OLVL1 = 0, OLVL2 = 1 Figure 58. Pulse Width Modulation Mode Timing Example with 2 Output Compare ...
Page 82
ST72361 16-BIT TIMER (Cont’d) 10.4.3.6 Pulse Width Modulation Mode Pulse Width Modulation (PWM) mode enables the generation of a signal with a frequency and pulse length determined by the value of the OC1R and OC2R registers. Pulse Width Modulation mode ...
Page 83
TIMER (Cont’d) 10.4.4 Low Power Modes Mode No effect on 16-bit Timer. WAIT Timer interrupts cause the device to exit from WAIT mode. 16-bit Timer registers are frozen. In HALT mode, the counter stops counting until Halt mode is ...
Page 84
ST72361 16-BIT TIMER (Cont’d) 10.4.7 Register Description Each Timer is associated with three control and status registers, and with six pairs of data registers (16-bit values) relating to the two input captures, the two output compares, the counter and the ...
Page 85
TIMER (Cont’d) CONTROL REGISTER 2 (CR2) Read/Write Reset Value: 0000 0000 (00h) 7 OC1E OC2E OPM PWM CC1 CC0 IEDG2 EXEDG Bit 7 = OC1E Output Compare 1 Pin Enable. This bit is used only to output the signal ...
Page 86
ST72361 16-BIT TIMER (Cont’d) CONTROL/STATUS REGISTER (CSR) Read/Write (bits 7:3 read only) Reset Value: xxxx x0xx (xxh) 7 ICF1 OCF1 TOF ICF2 OCF2 TIMD Bit 7 = ICF1 Input Capture Flag input capture (reset value ...
Page 87
TIMER (Cont’d) INPUT CAPTURE 1 HIGH REGISTER (IC1HR) Read Only Reset Value: Undefined This is an 8-bit read only register that contains the high part of the counter value (transferred by the input capture 1 event). 7 MSB INPUT ...
Page 88
ST72361 16-BIT TIMER (Cont’d) OUTPUT COMPARE 2 (OC2HR) Read/Write Reset Value: 1000 0000 (80h) This is an 8-bit register that contains the high part of the value to be compared to the CHR register. 7 MSB OUTPUT COMPARE 2 (OC2LR) ...
Page 89
TIMER (Cont’d) Table 19. 16-Bit Timer Register Map Address Register 7 Name (Hex.) 51 CR2 OC1E 52 CR1 ICIE 53 CSR ICF1 54 IC1HR MSB 55 IC1LR MSB 56 OC1HR MSB 57 OC1LR MSB 58 CHR MSB 59 CLR ...
Page 90
ST72361 10.5 8-BIT TIMER (TIM8) 10.5.1 Introduction The timer consists of a 8-bit free-running counter driven by a programmable prescaler. It may be used for a variety of purposes, including pulse length measurement two input sig- nals ...
Page 91
TIMER (Cont’d) Figure 59. Timer Block Diagram f CPU 1/2 COUNTER 1/4 REGISTER 1/8 f 1/8000 ALTERNATE OSC2 COUNTER REGISTER CC[1:0] OVERFLOW DETECT CIRCUIT ICF1 OCF1 TOF ICF2 (Control/Status Register) ICIE OCIE TOIE FOLV2 (See note) TIMER INTERRUPT ST7 ...
Page 92
ST72361 8-BIT TIMER (Cont’d) Whatever the timer mode used (input capture, out- put compare, one pulse mode or PWM mode) an overflow occurs when the counter rolls over from FFh to 00h then: – The TOF bit of the SR ...
Page 93
TIMER (Cont’d) Figure 60. Counter Timing Diagram, Internal Clock Divided CPU INTERNAL RESET TIMER CLOCK COUNTER REGISTER TIMER OVERFLOW FLAG (TOF) Figure 61. Counter Timing Diagram, Internal Clock Divided CPU INTERNAL RESET TIMER ...
Page 94
ST72361 8-BIT TIMER (Cont’d) 10.5.3.2 Input Capture In this section, the index, i, may because there are two input capture functions in the 8-bit timer. The two 8-bit input capture registers (IC1R and IC2R) are used ...
Page 95
TIMER (Cont’d) Figure 63. Input Capture Block Diagram ICAP1 pin EDGE DETECT CIRCUIT2 ICAP2 pin IC2R Register 8-bit 8-bit FREE RUNNING COUNTER Figure 64. Input Capture Timing Diagram TIMER CLOCK COUNTER REGISTER ICAPi PIN ICAPi FLAG ICAPi REGISTER Note: ...
Page 96
ST72361 8-BIT TIMER (Cont’d) 10.5.3.3 Output Compare In this section, the index, i, may because there are two output compare functions in the 8-bit timer. This function can be used to control an output waveform or ...
Page 97
TIMER (Cont’d) Notes: 1. Once the OCIE bit is set both output compare features may trigger interrupt requests. If only one is needed in the application, the interrupt routine software needs to discard the unwanted compare interrupt. This can ...
Page 98
ST72361 8-BIT TIMER (Cont’d) Figure 66. Output Compare Timing Diagram, f COUNTER REGISTER OUTPUT COMPARE REGISTER i (OCRi) OUTPUT COMPARE FLAG i (OCFi) OCMPi PIN (OLVLi = 1) Figure 67. Output Compare Timing Diagram, f COUNTER REGISTER OUTPUT COMPARE REGISTER ...
Page 99
TIMER (Cont’d) 10.5.3.4 One Pulse Mode One Pulse mode enables the generation of a pulse when an external event occurs. This mode is selected via the OPM bit in the CR2 register. The one pulse mode uses the Input ...
Page 100
ST72361 8-BIT TIMER (Cont’d) Figure 68. One Pulse Mode Timing Example IC1R F8 COUNTER ICAP1 OCMP1 Note: IEDG1 = 1, OC1R = D0h, OLVL1 = 0, OLVL2 = 1 Figure 69. Pulse Width Modulation Mode Timing Example COUNTER E2 OCMP1 ...
Page 101
TIMER (Cont’d) 10.5.3.5 Pulse Width Modulation Mode Pulse Width Modulation (PWM) mode enables the generation of a signal with a frequency and pulse length determined by the value of the OC1R and OC2R registers. Pulse Width Modulation mode uses ...
Page 102
ST72361 8-BIT TIMER (Cont’d) 10.5.4 Low Power Modes Mode No effect on 8-bit Timer. WAIT Timer interrupts cause the device to exit from WAIT mode. 8-bit Timer registers are frozen. In HALT mode, the counter stops counting until Halt mode ...
Page 103
TIMER (Cont’d) 10.5.7 Register Description Each Timer is associated with three control and status registers, and with six data registers (8-bit values) relating to the two input captures, the two output compares, the counter and the alternate counter. CONTROL ...
Page 104
ST72361 8-BIT TIMER (Cont’d) CONTROL REGISTER 2 (CR2) Read/Write Reset Value: 0000 0000 (00h) 7 OC1E OC2E OPM PWM CC1 CC0 IEDG2 Bit 7 = OC1E Output Compare 1 Pin Enable. This bit is used only to output the signal ...
Page 105
TIMER (Cont’d) CONTROL/STATUS REGISTER (CSR) Read Only (except bit 2 R/W) Reset Value: 0000 0000 (00h) 7 ICF1 OCF1 TOF ICF2 OCF2 TIMD Bit 7 = ICF1 Input Capture Flag input capture (reset value ...
Page 106
ST72361 8-BIT TIMER (Cont’d) INPUT CAPTURE 1 REGISTER (IC1R) Read Only Reset Value: Undefined This is an 8-bit read only register that contains the counter value (transferred by the input capture 1 event). 7 MSB OUTPUT COMPARE 1 REGISTER (OC1R) ...
Page 107
TIMER (Cont’d) 10.5.8 8-bit Timer Register Map Address Register 7 Name (Hex.) 3C CR2 OC1E 3D CR1 ICIE 3E CSR ICF1 3F IC1R MSB 40 OC1R MSB 41 CTR MSB 42 ACTR MSB 43 IC2R MSB 44 OC2R MSB ...
Page 108
ST72361 ON-CHIP PERIPHERALS (cont’d) 10.6 SERIAL PERIPHERAL INTERFACE (SPI) 10.6.1 Introduction The Serial Peripheral Interface (SPI) allows full- duplex, synchronous, serial communication with external devices. An SPI system may consist of a master and one or more slaves or a ...
Page 109
SERIAL PERIPHERAL INTERFACE (SPI) (cont’d) Figure 70. Serial Peripheral Interface Block Diagram SPIDR MOSI MISO 8-bit Shift Register SOD bit SCK SS Data/Address Bus Read Read Buffer 7 SPIF WCOL Write SPIE MASTER CONTROL SERIAL CLOCK GENERATOR Interrupt request SPICSR ...
Page 110
ST72361 SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.3.1 Functional Description A basic example of interconnections between a single master and a single slave is illustrated in Figure 71. The MOSI pins are connected together and the MISO pins are connected together. In ...
Page 111
SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.3.2 Slave Select Management As an alternative to using the SS pin to control the Slave Select signal, the application can choose to manage the Slave Select signal by software. This is configured by the SSM ...
Page 112
ST72361 SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.3.3 Master Mode Operation In master mode, the serial clock is output on the SCK pin. The clock frequency, polarity and phase are configured by software (refer to the description of the SPICSR register). Note: ...
Page 113
SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.4 Clock Phase and Clock Polarity Four possible timing relationships may be chosen by software, using the CPOL and CPHA bits (See Figure 74). Note: The idle state of SCK must correspond to the polarity selected ...
Page 114
ST72361 SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.5 Error Flags 10.6.5.1 Master Mode Fault (MODF) Master mode fault occurs when the master de- vice’s SS pin is pulled low. When a Master mode fault occurs: – The MODF bit is set and ...
Page 115
SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.5.4 Single Master Configurations There are two types of SPI systems: – Single Master System – Multimaster System Single Master System A typical single master system may be configured using a device as the master and ...
Page 116
ST72361 SERIAL PERIPHERAL INTERFACE (cont’d) 10.6.6 Low Power Modes Mode Description No effect on SPI. WAIT SPI interrupt events cause the device to exit from WAIT mode. SPI registers are frozen. In HALT mode, the SPI is inactive. SPI oper- ...
Page 117
Register Description SPI CONTROL REGISTER (SPICR) Read/Write Reset Value: 0000 xxxx (0xh) 7 SPIE SPE SPR2 MSTR CPOL CPHA SPR1 Bit 7 = SPIE Serial Peripheral Interrupt Enable This bit is set and cleared by software. 0: Interrupt is ...
Page 118
ST72361 SERIAL PERIPHERAL INTERFACE (cont’d) SPI CONTROL/STATUS REGISTER (SPICSR) Read/Write (some bits Read Only) Reset Value: 0000 0000 (00h) 7 SPIF WCOL OVR MODF - Bit 7 = SPIF Serial Peripheral Data Transfer Flag (Read only) This bit is set ...
Page 119
SERIAL PERIPHERAL INTERFACE (Cont’d) Table 22. SPI Register Map and Reset Values Address Register 7 Label (Hex.) SPIDR MSB 21 Reset Value x SPICR SPIE 22 Reset Value 0 SPICSR SPIF 23 Reset Value ...
Page 120
ST72361 10.7 LINSCI SERIAL COMMUNICATION INTERFACE (LIN MASTER/SLAVE) 10.7.1 Introduction The Serial Communications Interface (SCI) offers a flexible means of full-duplex data exchange with external equipment requiring an industry standard NRZ asynchronous serial data format. The SCI of- fers a ...
Page 121
LINSCI™ SERIAL COMMUNICATION INTERFACE (cont’d) 10.7.4 General Description The interface is externally connected to another device by two pins: – TDO: Transmit Data Output. When the transmit- ter is disabled, the output pin returns to its I/O port configuration. When ...
Page 122
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) Figure 77. SCI Block Diagram (in Conventional Baud Rate Generator Mode) Write Transmit Data Register (TDR) TDO Transmit Shift Register RDI TRANSMIT CONTROL SCICR2 TIE TCIE RIE SCI INTERRUPT CONTROL TRANSMITTER CLOCK ...
Page 123
LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.5 SCI Mode - Functional Description Conventional Baud Rate Generator Mode The block diagram of the Serial Control Interface in conventional baud rate generator mode is shown in Figure 1. It uses four ...
Page 124
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.5.2 Transmitter The transmitter can send data words of either bits depending on the M bit status. When the M bit is set, word length is 9 bits and ...
Page 125
LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.5.3 Receiver The SCI can receive data words of either bits. When the M bit is set, word length is 9 bits and the MSB is stored in the R8 ...
Page 126
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.5.4 Conventional Baud Rate Generation The baud rates for the receiver and transmitter (Rx and Tx) are set independently and calculated as follows: f CPU (16 PR) TR ...
Page 127
LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) Figure 79. SCI Baud Rate and Extended Prescaler Block Diagram EXTENDED PRESCALER TRANSMITTER RATE CONTROL EXTENDED TRANSMITTER PRESCALER REGISTER EXTENDED RECEIVER PRESCALER REGISTER EXTENDED PRESCALER RECEIVER RATE CONTROL f CPU /PR /16 SCP1 ...
Page 128
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.5.6 Receiver Muting and Wake-up Feature In multiprocessor configurations it is often desira- ble that only the intended message recipient should actively receive the full message contents, thus reducing redundant SCI service ...
Page 129
LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.6 Low Power Modes Mode Description No effect on SCI. WAIT SCI interrupts cause the device to exit from Wait mode. SCI registers are frozen. HALT In Halt mode, the SCI stops transmitting/re- ...
Page 130
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) 10.7.8 SCI Mode Register Description STATUS REGISTER (SCISR) Read Only Reset Value: 1100 0000 (C0h TDRE TC RDRF IDLE OR Bit 7 = TDRE Transmit data register empty This bit ...
Page 131
LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) CONTROL REGISTER 1 (SCICR1) Read/Write Reset Value: x000 0000 (x0h SCID M WAKE PCE 1) This bit has a different function in LIN mode, please refer to the LIN mode ...
Page 132
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) CONTROL REGISTER 2 (SCICR2) Read/Write Reset Value: 0000 0000 ( TIE TCIE RIE ILIE TE 1) This bit has a different function in LIN mode, please refer to the LIN ...
Page 133
LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) BAUD RATE REGISTER (SCIBRR) Read/Write Reset Value: 0000 0000 (00h) 7 SCP1 SCP0 SCT2 SCT1 SCT0 Note: When LIN slave mode is disabled, the SCI- BRR register controls the conventional baud rate generator. ...
Page 134
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (SCI Mode) (cont’d) EXTENDED RECEIVE PRESCALER DIVISION REGISTER (SCIERPR) Read/Write Reset Value: 0000 0000 ( ERPR ERPR ERPR ERPR ERPR Bits 7:0 = ERPR[7:0] 8-bit Extended Receive Prescaler ...
Page 135
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) 10.7.9 LIN Mode - Functional Description. The block diagram of the Serial Control Interface, in LIN slave mode is shown in It uses six registers: – 3 control registers: SCICR1, SCICR2 and SCICR3 – ...
Page 136
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) Figure 80. LIN Characters 8-bit Word length (M bit is reset) Data Character Start Bit0 Bit1 Bit2 Bit3 Bit4 Bit5 Bit6 Bit7 Bit Idle Line LIN Synch Field Start Bit0 Bit1 Bit2 ...
Page 137
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) Figure 81. SCI Block Diagram in LIN Slave Mode Transmit Data Register (TDR) TDO RDI TRANSMIT CONTROL SCICR2 TIE TCIE SCI INTERRUPT CONTROL f CPU LIN SLAVE BAUD RATE AUTO SYNCHRONIZATION SCIBRR LPR7 ...
Page 138
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) 10.7.9.3 LIN Reception In LIN mode the reception of a byte is the same as in SCI mode but the LINSCI has features for han- dling the LIN Header automatically (identifier de- ...
Page 139
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) 10.7.9.4 LIN Error Detection LIN Header Error Flag The LIN Header Error Flag indicates that an invalid LIN Header has been detected. When a LIN Header Error occurs: – The LHE flag is ...
Page 140
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) If LHE bit is set due to this error during Fields other than LIN Synch Field or if LASE bit is reset then the current received Header is discarded and the SCI ...
Page 141
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) 10.7.9.5 LIN Baud Rate Baud rate programming is done by writing a value in the LPR prescaler or performing an automatic resynchronization as described below. Automatic Resynchronization To automatically adjust the baud rate ...
Page 142
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) Figure 84. LDIV Read / Write Operations When LDUM = 0 Write LPR Write LPFR MANT(7:0) MANT(7:0) Read LPR Figure 85. LDIV Read / Write Operations When LDUM = 1 Write LPR ...
Page 143
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) 10.7.9.7 LINSCI Clock Tolerance LINSCI Clock Tolerance when unsynchronized When LIN slaves are unsynchronized (meaning no characters have been transmitted for a relatively long time), the maximum tolerated deviation of the LINSCI clock ...
Page 144
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) 10.7.9.9 Error due to LIN Synch measurement The LIN Synch Field is measured over eight bit times. This measurement is performed using a counter clocked by the CPU clock. The edge detections ...
Page 145
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) 10.7.10 LIN Mode Register Description STATUS REGISTER (SCISR) Read Only Reset Value: 1100 0000 (C0h) 7 TDRE TC RDRF IDLE LHE Bits 7:4 = Same function as in SCI mode; please refer to ...
Page 146
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) CONTROL REGISTER 2 (SCICR2) Read/Write Reset Value: 0000 0000 ( TIE TCIE RIE ILIE TE Bits 7:2 Same function as in SCI mode; please re- fer to Section 0.1.8 SCI ...
Page 147
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) SCICR2 register is set, the LHDM bit selects the Wake-Up method (replacing the WAKE bit). 0: LIN Synch Break Detection Method 1: LIN Identifier Field Detection Method Bit 2 = LHIE LIN Header ...
Page 148
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) LIN PRESCALER FRACTION REGISTER (LPFR) Read/Write Reset Value 0000 (00h) 7 LPFR Bits 7:4 = Reserved. Bits 3:0 = LPFR[3:0] Fraction of LDIV These 4 ...
Page 149
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Mode) (cont’d) LIN HEADER LENGTH REGISTER (LHLR) Read Only Reset Value: 0000 0000 (00 h). 7 LHL7 LHL6 LHL5 LHL4 LHL3 Note: In LIN Slave mode when LASE = 1 or LHDM = 1, the ...
Page 150
ST72361 SCI™ SERIAL COMMUNICATION INTERFACE (LIN Master/Slave) (Cont’d) LIN Table 24. SCI1 Register Map and Reset Values LIN Addr. Register Name (Hex. ) SCI1SR 48 Reset Value SCI1DR 49 Reset Value SCI1BRR 4A LPR (LIN Slave Mode) Reset Value SCI1CR1 ...
Page 151
LINSCI SERIAL COMMUNICATION INTERFACE (LIN Master Only) 10.8.1 Introduction The Serial Communications Interface (SCI) offers a flexible means of full-duplex data exchange with external equipment requiring an industry standard NRZ asynchronous serial data format. The SCI of- fers a ...
Page 152
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) Figure 88. SCI Block Diagram Write Transmit Data Register (TDR) TDO Transmit Shift Register RDI CLOCK EXTRACTION SCLK PHASE AND POLARITY CONTROL TRANSMIT CONTROL SCICR2 TIE TCIE RIE SCI INTERRUPT CONTROL ...
Page 153
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.4 Functional Description The block diagram of the Serial Control Interface, is shown in Figure 88 on page en dedicated registers: – Three control registers (SCICR1, SCICR2 and SCICR3) – A status ...
Page 154
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.4.2 Transmitter The transmitter can send data words of either bits depending on the M bit status. When the M bit is set, word length is 9 bits ...
Page 155
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.4.3 Receiver The SCI can receive data words of either bits. When the M bit is set, word length is 9 bits and the MSB is stored in the ...
Page 156
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) Figure 90. SCI Baud Rate and Extended Prescaler Block Diagram EXTENDED PRESCALER TRANSMITTER RATE CONTROL EXTENDED TRANSMITTER PRESCALER REGISTER EXTENDED RECEIVER PRESCALER REGISTER EXTENDED PRESCALER RECEIVER RATE CONTROL f CPU /PR ...
Page 157
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.4.4 Conventional Baud Rate Generation The baud rates for the receiver and transmitter (Rx and Tx) are set independently and calculated as follows : f CPU (16 PR) ...
Page 158
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.4.7 Parity control Parity control (generation of parity bit in transmis- sion and parity checking in reception) can be ena- bled by setting the PCE bit in the SCICR1 register. Depending ...
Page 159
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.7 SCI Synchronous Transmission The SCI transmitter allows the user to control a one way synchronous serial transmission. The SCLK pin is the output of the SCI transmitter clock. No clock pulses ...
Page 160
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) Figure 92. SCI Data Clock Timing Diagram ( Idle or preceding Start transmission Clock (CPOL=0, CPHA=0) Clock (CPOL=0, CPHA=1) Clock (CPOL=1, CPHA=0) Clock (CPOL=1, CPHA=1) Data Start Figure 93. ...
Page 161
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) 10.8.8 Register Description STATUS REGISTER (SCISR) Read Only Reset Value: 1100 0000 (C0h) 7 TDRE TC RDRF IDLE OR Bit 7 = TDRE Transmit data register empty. This bit is set by ...
Page 162
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) CONTROL REGISTER 1 (SCICR1) Read/Write Reset Value: x000 0000 (x0h SCID M WAKE Bit Receive data bit 8. This bit is used to store the ...
Page 163
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) CONTROL REGISTER 2 (SCICR2) Read/Write Reset Value: 0000 0000 ( TIE TCIE RIE ILIE TE Bit 7 = TIE Transmitter interrupt enable. This bit is set and cleared by software. ...
Page 164
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) CONTROL REGISTER 3 (SCICR3) Read/Write Reset Value: 0000 0000 (00h LINE - - CLKEN CPOL CPHA Bit 7 = Reserved, must be kept cleared. Bit 6 = LINE LIN ...
Page 165
LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) DATA REGISTER (SCIDR) Read/Write Reset Value: Undefined Contains the Received or Transmitted data char- acter, depending on whether it is read from or writ- ten to. 7 DR7 DR6 DR5 DR4 DR3 ...
Page 166
ST72361 LINSCI™ SERIAL COMMUNICATION INTERFACE (LIN Master Only) (Cont’d) EXTENDED RECEIVE PRESCALER DIVISION REGISTER (SCIERPR) Read/Write Reset Value: 0000 0000 ( ERPR ERPR ERPR ERPR ERPR Bits 7:0 = ERPR[7:0] 8-bit Extended Receive ...
Page 167
SCI™ SERIAL COMMUNICATIONS INTERFACE (LIN Master) (Cont’d) LIN Table 28. SCI2 Register Map and Reset Values LIN Address Register Name (Hex.) SCI2SR TDRE 60 Reset Value SCI2DR 61 Reset Value SCI2BRR SCP1 62 Reset Value SCI2CR1 63 Reset Value SCI2CR2 ...
Page 168
ST72361 10.9 10-BIT A/D CONVERTER (ADC) 10.9.1 Introduction The on-chip Analog to Digital Converter (ADC) pe- ripheral is a 10-bit, successive approximation con- verter with internal sample and hold circuitry. This peripheral has multiplexed analog input channels ...
Page 169
A/D CONVERTER (ADC) (Cont’d) 10.9.3.2 A/D Conversion The analog input ports must be configured as in- put, no pull-up, no interrupt. Refer to the “I/O ports” chapter. Using these pins as analog inputs does not affect the ability of ...
Page 170
ST72361 10-BIT A/D CONVERTER (ADC) (Cont’d) 10.9.6 Register Description CONTROL/STATUS REGISTER (ADCCSR) Read / Write (Except bit 7 read only) Reset Value: 0000 0000 (00h) 7 EOC SPEED ADON SLOW CH3 Bit 7 = EOC End of Conversion This bit ...
Page 171
A/D CONVERTER (ADC) (Cont’d) Table 30. ADC Register Map and Reset Values Address Register Label (Hex.) ADCCSR EOC 45h Reset Value ADCDRH D9 46h Reset Value ADCDRL 47h Reset Value SPEED ADON SLOW 0 0 ...
Page 172
ST72361 11 INSTRUCTION SET 11.1 CPU ADDRESSING MODES The CPU features 17 different addressing modes which can be classified in seven main groups: Addressing Mode Example Inherent nop Immediate ld A,#$55 Direct ld A,$55 Indexed ld A,($55,X) Indirect ld A,([$55],X) ...
Page 173
INSTRUCTION SET OVERVIEW (Cont’d) 11.1.1 Inherent All Inherent instructions consist of a single byte. The opcode fully specifies all the required informa- tion for the CPU to process the operation. Inherent Instruction NOP No operation TRAP S/W Interrupt Wait For ...
Page 174
ST72361 INSTRUCTION SET OVERVIEW (Cont’d) 11.1.6 Indirect Indexed (Short, Long) This is a combination of indirect and short indexed addressing modes. The operand is referenced by its memory address, which is defined by the un- signed addition of an index ...
Page 175
INSTRUCTION SET OVERVIEW (Cont’d) 11.2 INSTRUCTION GROUPS The ST 7 family devices use an Instruction Set consisting of 63 instructions. The instructions may Load and Transfer Stack operation Increment/Decrement Compare and Tests Logical operations Bit Operation Conditional Bit Test and ...
Page 176
ST72361 INSTRUCTION SET OVERVIEW (Cont’d) Mnemo Description ADC Add with Carry ADD Addition AND Logical And BCP Bit compare A, Memory BRES Bit Reset BSET Bit Set BTJF Jump if bit is false (0) BTJT Jump if bit is true ...
Page 177
INSTRUCTION SET OVERVIEW (Cont’d) Mnemo Description JRULE Jump Load MUL Multiply NEG Negate (2's compl) NOP No Operation OR OR operation POP Pop from the Stack PUSH Push onto the Stack RCF Reset ...
Page 178
ST72361 12 ELECTRICAL CHARACTERISTICS 12.1 PARAMETER CONDITIONS Unless otherwise specified, all voltages are re- ferred 12.1.1 Minimum and Maximum Values Unless otherwise specified the minimum and max- imum values are guaranteed in the worst condi- tions ...
Page 179
ABSOLUTE MAXIMUM RATINGS Stresses above those listed as “absolute maxi- mum ratings” may cause permanent damage to the device. This is a stress rating only and func- tional operation of the device under these condi- 12.2.1 Voltage Characteristics Symbol ...
Page 180
ST72361 12.3 OPERATING CONDITIONS 12.3.1 General Operating Conditions Symbol Parameter f Internal clock frequency CPU Extended Operating voltage V DD Standard Operating Voltage Operating Voltage for Flash Write/Erase T Ambient temperature range A Figure 97. f Maximum vs V CPU ...
Page 181
Operating Conditions with Low Voltage Detector (LVD) Subject to general operating conditions for T Symbol Parameter V Reset release threshold (V IT+(LVD) V Reset generation threshold (V IT-(LVD) V LVD voltage threshold hysteresis hys(LVD rise time ...
Page 182
ST72361 12.4 SUPPLY CURRENT CHARACTERISTICS The following current consumption specified for the ST7 functional operating modes over tempera- ture range does not take into account the clock source current consumption. To get the total de- Symbol Parameter Supply current in ...
Page 183
SUPPLY CURRENT CHARACTERISTICS (Cont’d) 12.4.1 Supply and Clock Managers The previous current consumption specified for the ST7 functional operating modes over tempera- ture range does not take into account the clock Symbol Parameter I Supply current of resonator oscillator DD(RES) ...
Page 184
ST72361 12.4.2 On-Chip Peripherals T = 25° MHz. A CPU Symbol Parameter I 16-bit Timer supply current DD(TIM) I 8-bit Timer supply current DD(TIM8) I ART PWM supply current DD(ART SPI supply current DD(SPI) 4) ...
Page 185
CLOCK AND TIMING CHARACTERISTICS Subject to general operating conditions for V 12.5.1 General Timings Symbol Parameter t Instruction cycle time c(INST) Interrupt reaction time t = Δt v(IT v(IT) c(INST) 12.5.2 External Clock Source Symbol Parameter ...
Page 186
ST72361 CLOCK AND TIMING CHARACTERISTICS (Cont’d) 12.5.3 Crystal and Ceramic Resonator Oscillators The ST7 internal clock can be supplied with four different Crystal/Ceramic resonator oscillators. All the information given in this paragraph is based on characterization results with specified typical ...
Page 187
CLOCK CHARACTERISTICS (Cont’d) 12.5.4 PLL Characteristics Operating conditions: V 3 Symbol Parameter V PLL Voltage Range DD(PLL) f PLL input frequency range OSC Δ PLL jitter CPU CPU Notes: 1. Data characterized ...
Page 188
ST72361 CLOCK CHARACTERISTICS (Cont’d) 12.6 Auto Wakeup from Halt Oscillator (AWU) Symbol Parameter f AWU oscillator frequency AWU t AWU oscillator startup time RCSRT 1. Data based on characterization results, not tested in production. Figure 102. AWU Oscillator Freq. @ ...
Page 189
MEMORY CHARACTERISTICS 12.7.1 RAM and Hardware Registers Symbol Parameter 1) V Data retention mode RM 12.7.2 FLASH Memory DUAL VOLTAGE HDFLASH MEMORY Symbol Parameter f Operating frequency CPU V Programming voltage PP 4) current ...
Page 190
ST72361 12.8 EMC CHARACTERISTICS Susceptibility tests are performed on a sample ba- sis during product characterization. 12.8.1 Functional EMS (Electro Magnetic Susceptibility) Based on a simple running application on the product (toggling two LEDs through I/O ports), the product is ...
Page 191
EMC CHARACTERISTICS (Cont’d) 12.8.2 Electro Magnetic Interference (EMI) Based on a simple application running on the product (toggling two LEDs through the I/O ports), the product is monitored in terms of emission. This Symbol Parameter Flash devices: V LQFP44 package ...
Page 192
ST72361 EMC CHARACTERISTICS (Cont’d) 12.8.3 Absolute Maximum Ratings (Electrical Sensitivity) Based on two different tests (ESD and LU) using specific measurement methods, the product is stressed in order to determine its performance in terms of electrical sensitivity (see Table 34 ...
Page 193
I/O PORT PIN CHARACTERISTICS 12.9.1 General Characteristics Subject to general operating conditions for V Symbol Parameter V Input low level voltage IL V Input high level voltage IH V Schmitt trigger voltage hysteresis hys V Input low level voltage ...
Page 194
ST72361 I/O PORT PIN CHARACTERISTICS (Cont’d) Figure 103. Connecting Unused I/O Pins V DD 10kΩ UNUSED I/O PORT UNUSED I/O PORT 10kΩ ST72XXX Figure 104 with 200 150 100 50 0 3.5 4 4.5 ...
Page 195
I/O PORT PIN CHARACTERISTICS (Cont’d) 12.9.2 Output Driving Current Subject to general operating conditions for V Symbol Parameter Output low level voltage for a standard I/O pin when eight pins are sunk at same time (see Figure 106 ...
Page 196
ST72361 I/O PORT PIN CHARACTERISTICS (Cont’d) Figure 109. Typical 1.1 1 0.9 0.8 0.7 0.6 0.5 0.4 0 Vdd(V) Figure 110. Typical 0.4 0.35 0.3 0.25 0.2 0.15 0.1 3 ...
Page 197
I/O PORT PIN CHARACTERISTICS (Cont’d) Figure 111. Typical Vdd( -45°C 25°C 3 130° -45°C 25°C 130° Vdd(V) ST72361 ...
Page 198
ST72361 12.10 CONTROL PIN CHARACTERISTICS 12.10.1 Asynchronous RESET Pin Subject to general operating conditions for V Symbol Parameter V Input low level voltage IL V Input high level voltage IH V Schmitt trigger voltage hysteresis hys V Output low level ...
Page 199
CONTROL PIN CHARACTERISTICS (Cont’d) Figure 112. RESET Pin Protection When LVD Is Enabled Optional Recommended (note 2.2) EXTERNAL RESET 0.01μF 1MΩ Figure 113. RESET Pin Protection When LVD Is Disabled USER EXTERNAL RESET CIRCUIT 0.01μF Required Note 1: 1.1 The ...
Page 200
ST72361 CONTROL PIN CHARACTERISTICS (Cont’d) Figure 114. RESET 100 3.5 4 4.5 Vdd 12.10.2 ICCSEL/V Pin PP Subject to general operating conditions for V Symbol Parameter V Input low level voltage ...