ST72361AR9-Auto STMicroelectronics, ST72361AR9-Auto Datasheet

no-image

ST72361AR9-Auto

Manufacturer Part Number
ST72361AR9-Auto
Description
8-bit MCU for automotive with K Flash, 10-bit ADC, 5 Timers, SPI, 2x LINSCI
Manufacturer
STMicroelectronics
Datasheet

Specifications of ST72361AR9-Auto

Hdflash Endurance
100 cycles, data retention 20 years at 55 °C
5 Power Saving Modes
halt, auto wake up from halt, active halt, wait and slow
Features
August 2010
Memories
– 16 K to 60 K High Density Flash (HDFlash)
– 1.5 to 2 K RAM
– HDFlash endurance: 100 cycles, data
Clock, reset and supply management
– Low power crystal/ceramic resonator
– PLL for 2 x frequency multiplication
– 5 power saving modes: halt, auto wake up
Interrupt management
– Nested interrupt controller
– 14 interrupt vectors plus TRAP and RESET
– TLI top level interrupt (on 64-pin devices)
– Up to 21 external interrupt lines (on 4
Up to 48 I/O ports
– Up to 48 multifunctional bidirectional I/O
– Up to 36 alternate function lines
– Up to 6 high sink outputs
5 timers
– 16-bit timer with 2 input captures, 2 output
– 8-bit timer with 1 or 2 input captures, 1 or 2
– 8-bit PWM auto-reload timer with 1 or 2
or ROM with read-out protection capability.
In-application programming and in-circuit
programming for HDFlash devices
retention 20 years at 55 °C
oscillators and bypass for external clock
from halt, active halt, wait and slow
vectors)
lines
compares, external clock input, PWM and
pulse generator modes
output compares, PWM and pulse
generator modes
input captures, 2 or 4 independent PWM
output channels, output compare and time
base interrupt, external clock with event
detector
8-bit MCU for automotive with Flash or ROM,
Doc ID 12468 Rev 3
10-bit ADC, 5 timers, SPI, LINSCI™
Table 1.
ST72361xx
Reference
– Main clock controller with real-time base
– Window watchdog timer
Up to 3 communications interfaces
– SPI synchronous serial interface
– Master/ slave LINSCI™ asynchronous
– Master only LINSCI™ asynchronous serial
Analog peripheral (low current coupling)
– 10-bit A/D converter with up to 16 inputs
– Up to 9 robust ports (low current coupling)
Instruction set
– 8-bit data manipulation
– 63 basic instructions
– 17 main addressing modes
– 8 x 8 unsigned multiply instruction
Development tools
– Full hardware/ software development
-Auto
and clock output
serial interface
interface
package
LQFP44 10x10mm
ST72361K4-Auto, ST72361K6-Auto,
ST72361K7-Auto, ST72361K9-Auto,
ST72361J4-Auto, ST72361J6-Auto,
ST72361J7-Auto, ST72361J9-Auto,
ST72361AR4-Auto, ST72361AR6-Auto,
ST72361AR7-Auto, ST72361AR9-Auto
Device summary
ST72361xx-Auto
LQFP32 7x7mm
Part number
LQFP64 10x10mm
www.st.com
1/279
1

Related parts for ST72361AR9-Auto

ST72361AR9-Auto Summary of contents

Page 1

... Development tools – Full hardware/ software development package Table 1. Reference ST72361xx -Auto Doc ID 12468 Rev 3 ST72361xx-Auto LQFP32 7x7mm LQFP64 10x10mm Device summary Part number ST72361K4-Auto, ST72361K6-Auto, ST72361K7-Auto, ST72361K9-Auto, ST72361J4-Auto, ST72361J6-Auto, ST72361J7-Auto, ST72361J9-Auto, ST72361AR4-Auto, ST72361AR6-Auto, ST72361AR7-Auto, ST72361AR9-Auto www.st.com 1/279 1 ...

Page 2

Contents Contents 1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 3

ST72361xx-Auto 5.5.2 5.5.3 5.5.4 5.5.5 5.6 System integrity management (SI ...

Page 4

Contents 8.2.2 8.2.3 8.3 I/O port implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 5

ST72361xx-Auto 11.2 Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 6

Contents 12.7.8 12.7.9 12.7.10 Counter high register (CHR ...

Page 7

ST72361xx-Auto 14.2 Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 8

Contents 15.8 SCI mode register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 15.8.1 ...

Page 9

ST72361xx-Auto 16.4.2 16.4.3 16.4.4 16.4.5 16.4.6 16.4.7 16.5 Low power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 10

Contents 18.1.1 18.1.2 18.1.3 18.1.4 18.1.5 18.1.6 18.1.7 18.2 Instruction groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 11

ST72361xx-Auto 19.8.1 19.8.2 19.8.3 19.9 I/O port pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 12

Contents 23.2 Flash/FastROM devices only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 23.2.1 ...

Page 13

ST72361xx-Auto List of tables Table 1. Device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 14

List of tables Table 49. Timer modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 15

ST72361xx-Auto Table 101. EMS test results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 16

List of figures List of figures Figure 1. Device block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Page 17

ST72361xx-Auto Figure 49. Counter timing diagram, internal clock divided ...

Page 18

List of figures Figure 101. PLL jitter vs signal frequency Figure 102. AWU oscillator freq 25° ...

Page 19

ST72361xx-Auto 1 Description The ST72361xx-Auto devices are members of the ST7 microcontroller family designed for automotive mid-range applications with LIN (Local Interconnect Network) interface. All devices are based on a common industry-standard 8-bit core, featuring an enhanced instruction set and ...

Page 20

Description Figure 1. Device block diagram OSC1 OSC2 RESET 1 TLI 1. On some devices only (see 20/279 option PLL x 2 OSC /2 POWER SUPPLY CONTROL 8-BIT CORE ALU PROGRAM MEMORY ( Kbytes) ...

Page 21

ST72361xx-Auto 1.1 Pin description Figure 2. LQFP 64-pin package pinout ARTIC1 / PA0 PWM0 / PA1 PWM1 / (HS) PA2 PWM2 / PA3 PWM3 / PA4 ARTCLK / (HS)PA5 ARTIC2 / (HS) PA6 T8_OCMP2 / PA7 T8_ICAP2 / PB0 T8_OCMP1 ...

Page 22

Description Figure 3. LQFP 44-pin package pinout ARTCLK / (HS)PA5 ARTIC2 / (HS) PA6 T8_OCMP1 / PB1 22/279 OSC1 1 ei3 OSC2 2 PWM0 / PA1 3 PWM1 / ...

Page 23

ST72361xx-Auto Figure 4. LQFP 32-pin package pinout For external pin connection guidelines, refer OSC1 1 ei3 OSC2 2 ei3 PWM0 / PA1 3 PWM1 / (HS) PA2 4 ei0 ARTCLK / ...

Page 24

Description List of abbreviations used in Type: In/Output level: C Output level: Input: Output: Refer to Chapter 8: I/O ports The RESET configuration of each pin is shown in bold which is valid as long as the device is in ...

Page 25

ST72361xx-Auto Table 3. Device pin description (continued) Pin n° Pin name PE2 / AIN14 PE3 / AIN15 PB5 / AIN1 / ICCDATA I/O C PB6 / AIN2 / ...

Page 26

Description Table 3. Device pin description (continued) Pin n° Pin name PF0 PF1 / AIN7 PF2 / AIN8 PD1 / SCI1_RDI PD2 / SCI1_TDO 49 ...

Page 27

ST72361xx-Auto 2 Register and memory map As shown in Figure registers. The available memory locations consist of 128 bytes of register locations Kbytes of RAM and Kbytes of user program memory. The RAM space ...

Page 28

Register and memory map Table 4. Hardware register map (continued) Register Address Block label 000Fh PFDR 0010h Port F PFDDR 0011h PFOR 0012h to Reserved Area (15 bytes) 0020h 0021h SPIDR 0022h SPI SPICR 0023h SPICSR 0024h FLASH FCSR 0025h ...

Page 29

ST72361xx-Auto Table 4. Hardware register map (continued) Register Address Block label 0048h SCI1ISR 0049h SCI1DR 004Ah SCI1BRR LINSCI1 004Bh SCI1CR1 (LIN 004Ch SCI1CR2 Master/Slave) 004Dh SCI1CR3 004Eh SCI1ERPR 004Fh SCI1ETPR 0050h 0051h T16CR2 0052h T16CR1 0053h T16CSR 0054h T16IC1HR 0055h ...

Page 30

Flash program memory 3 Flash program memory 3.1 Introduction The ST7 dual voltage High Density Flash (HDFlash non-volatile memory that can be electrically erased as a single block or by individual sectors and programmed on a Byte-by- Byte ...

Page 31

ST72361xx-Auto 3.3.1 Read-out protection Read-out protection, when selected, provides a protection against Program Memory content extraction and against write access to Flash memory. Even if no protection can be considered as totally unbreakable, the feature provides a very high level ...

Page 32

... Depending on the ICP code downloaded in RAM, Flash memory programming can be fully customized (number of bytes to program, program locations, or selection serial communication interface for downloading). When using an STMicroelectronics or third-party programming tool that supports ICP and the specific microcontroller device, the user needs only to implement the ICP hardware 32/279 ...

Page 33

ST72361xx-Auto interface on the application board (see to the device pinout description. 3.6 IAP (in-application programming) This mode uses a Bootloader program previously stored in Sector 0 by the user (in ICP mode or by plugging the device in a ...

Page 34

Central processing unit 4 Central processing unit 4.1 Introduction This CPU has a full 8-bit architecture and contains six internal registers allowing efficient 8-bit data manipulation. 4.2 Main features ● Enable executing 63 basic instructions ● Fast 8-bit by 8-bit ...

Page 35

ST72361xx-Auto Figure 8. CPU registers PCH 15 RESET VALUE = RESET VECTOR @ FFFEh-FFFFh RESET VALUE = 1 15 RESET VALUE = STACK HIGHER ADDRESS 4.3.4 Condition code register (CC) Read/ write Reset value: 111x1xxx The 8-bit ...

Page 36

Central processing unit This bit is accessed by the JRMI and JRPL instructions. Bit Zero. This bit is set and cleared by hardware. This bit indicates that the result of the last arithmetic, logical or data manipulation ...

Page 37

ST72361xx-Auto 4.3.5 Stack pointer (SP) Read/ write Reset value: 01 FFh SP7 SP6 The Stack Pointer is a 16-bit register which is always pointing to the next free location in the stack then decremented ...

Page 38

Central processing unit Figure 9. Stack manipulation example CALL Subroutine @ 0100h SP PCH @ 01FFh PCL Stack Higher Address = 01FFh Stack Lower Address = 0100h 38/279 PUSH Y Interrupt Event ...

Page 39

ST72361xx-Auto 5 Supply, reset and clock management 5.1 Introduction 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 reducing the number of external components. An ...

Page 40

Supply, reset and clock management Figure 11. Clock, reset and supply block diagram OSC2 OSC1 RESET 5.4 Multi-oscillator (MO) The main clock of the ST7 can be generated by two different source types coming from the ...

Page 41

ST72361xx-Auto output distortion and start-up stabilization time. The loading capacitance values must be adjusted according to the selected oscillator. These oscillators are not stopped during the RESET phase to avoid losing time in the oscillator start-up phase. Table 8. ST7 ...

Page 42

Supply, reset and clock management The reset vector fetch phase duration is two clock cycles. Figure 12. RESET sequence phases 5.5.2 Asynchronous external RESET pin The RESET pin is both an input and an open-drain output with integrated R resistor. ...

Page 43

ST72361xx-Auto The device RESET pin acts as an output that is pulled low when V V < V (falling edge) as shown in DD IT- The LVD filters spikes on V 5.5.5 Internal watchdog reset The RESET sequence generated by ...

Page 44

Supply, reset and clock management The LVD function is illustrated in Provided the minimum V the MCU can only be in two modes: ● under full software control ● in static safe reset In these conditions, secure operation is always ...

Page 45

ST72361xx-Auto greater than 256 or 4096 cycles then: rv ● If the AVD interrupt is enabled before the V interrupts will be received: The first when the AVDIE bit is set and the second when the threshold ...

Page 46

Supply, reset and clock management 5.6.5 Register description System integrity (SI) control/status register (SICSR) Read/Write Reset value: 000x 000x (00h AVDIE Bit 7 = Reserved, must be kept cleared. Bit 6 = AVDIE Voltage Detector interrupt enable This ...

Page 47

ST72361xx-Auto Table 11. Reset source flags External RESET pin Watchdog LVD Application notes The LVDRF flag is not cleared when another RESET type occurs (external or watchdog), the LVDRF flag remains set to keep trace of the original failure. In ...

Page 48

Interrupts 6 Interrupts 6.1 Introduction The ST7 enhanced interrupt management provides the following features: ● Hardware interrupts ● Software interrupt (TRAP) ● Nested or concurrent interrupt management with flexible interrupt priority and level management: – software programmable ...

Page 49

ST72361xx-Auto Table 12. Interrupt software priority levels Interrupt software priority Level 0 (main) Level 1 Level 2 Level 3 (= interrupt disable) Figure 17. Interrupt processing flowchart RESET RESTORE PC FROM STACK Servicing pending interrupts As several ...

Page 50

Interrupts When an interrupt request is not serviced immediately latched and then processed when its software priority combined with the hardware priority becomes the highest one. Note: 1 The hardware priority is exclusive while the software one is ...

Page 51

ST72361xx-Auto if the corresponding enable bit is set in the peripheral control register. The general sequence for clearing an interrupt is based on an access to the status register followed by a read or write to an associated register. Note: ...

Page 52

Interrupts Figure 20. Nested interrupt management RIM MAIN 6.5 Interrupt register description 6.5.1 CPU CC register interrupt bits Read/Write Reset value: 111x 1010 (xAh Bit I1, I0 Software Interrupt Priority These ...

Page 53

ST72361xx-Auto 6.5.2 Interrupt software priority registers (ISPRX) Read/ write (bit 7:4 of ISPR3 are read only) Reset value: 1111 1111 (FFh) ISPR0 ISPR1 ISPR2 ISPR3 These four registers contain the interrupt software priority of each interrupt vector. ● Each interrupt ...

Page 54

Interrupts Table 15. Dedicated interrupt instruction set (continued) Instruction POP CC Pop CC from the Stack RIM Enable interrupt (level 0 set) SIM Disable interrupt (level 3 set) TRAP Software trap WFI Wait for interrupt Note: During the execution of ...

Page 55

ST72361xx-Auto Table 16. 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 External interrupt ei1/Auxiliary Voltage ...

Page 56

Interrupts 6.6 External interrupts 6.6.1 I/O port interrupt sensitivity The external interrupt sensitivity is controlled by the ISxx bits in the EICR register (Figure 21). This control allows up to four fully independent external interrupt source sensitivities. Each external interrupt ...

Page 57

ST72361xx-Auto Figure 21. External interrupt control bits PORT A [7:0] INTERRUPTS PAOR.0 PADDR.0 PA0 PORT B [5:0] INTERRUPTS PBOR.0 PBDDR.0 PB0 PORT C [2:1] INTERRUPTS PCOR.7 PCDDR.7 PC1 PORT D [7:6, 4, 1:0] INTERRUPTS PDOR.0 PDDDR.0 PD0 EICR IS00 IS01 ...

Page 58

Interrupts 6.6.2 Register description External interrupt control register 0 (EICR0) Read/Write Reset value: 0000 0000 (00h) 7 IS31 IS30 Bits 7:6 = IS3[1:0] ei3 sensitivity The interrupt sensitivity, defined using the IS3[1:0] bits, is applied to the ei3 external interrupts: ...

Page 59

ST72361xx-Auto Table 19. Interrupt sensitivity - ei1 IS11 IS10 These 2 bits can be written only when I1 and I0 of the CC register are both set to 1 (level 3). Bits 1:0 = IS0[1:0] ei0 sensitivity ...

Page 60

Interrupts Table 21. Nested interrupts register map and reset values Address Register 7 (Hex.) label 0025h ISPR0 I1_3 Reset value 1 0026h ISPR1 I1_7 Reset value 1 0027h ISPR2 I1_11 Reset value 1 0028h ISPR3 Reset value 1 EICR0 IS31 ...

Page 61

ST72361xx-Auto 7 Power saving modes 7.1 Introduction To give a large measure of flexibility to the application in terms of power consumption, five main power saving modes are implemented in the ST7 (see ● Slow ● Wait (and Slow-Wait) ● ...

Page 62

Power saving modes In this mode, the master clock frequency (f and peripherals are clocked at this lower frequency (f Note: SLOW-WAIT mode is activated by entering WAIT mode while the device is in SLOW mode. Figure 23. SLOW mode ...

Page 63

ST72361xx-Auto Figure 24. WAIT mode flow-chart Note: Before servicing an interrupt, the CC register is pushed on the stack. The I[1:0] bits of the CC register are set to the current software priority level of the interrupt routine and recovered ...

Page 64

Power saving modes system is enabled, can generate a Watchdog RESET (see more details). Figure 25. HALT timing overview Figure 26. HALT mode flow-chart Note: 1 WDGHALT is an option bit. See option byte section for more details. 2 Peripheral ...

Page 65

ST72361xx-Auto 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 as “Input Pull-up with ...

Page 66

Power saving modes Note: As soon as active halt is enabled, executing a HALT instruction while the Watchdog is active does not generate a RESET. This means that the device cannot spend more than a defined delay in this power ...

Page 67

ST72361xx-Auto It is entered by executing the HALT instruction when the AWUEN bit in the AWUCSR register has been set and the OIE bit in the MCCSR register is cleared (see Main clock controller with real time clock MCC/RTC Figure ...

Page 68

Power saving modes Figure 30. AWUF halt timing diagram RUN MODE f CPU f AWU_RC AWUFH interrupt Figure 31. AWUFH mode flow-chart Note: 1 WDGHALT is an option bit. See option byte section for more details. 2 Peripheral clocked with ...

Page 69

ST72361xx-Auto 7.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 Wake-Up Flag This bit is set by hardware when ...

Page 70

Power saving modes Table 23. AWUPR prescaler (continued) AWUPR[7:0 FEh FFh In AWU mode, the period that the MCU stays in Halt Mode (t  AWUP AWU This prescaler register can be programmed to modify the time ...

Page 71

ST72361xx-Auto 8 I/O ports 8.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 peripherals. An I/O ...

Page 72

I/O ports Each external interrupt vector is linked to a dedicated group of I/O port pins (see pinout description and interrupt section). If several input pins are selected simultaneously as interrupt sources, these are first detected according to the sensitivity ...

Page 73

ST72361xx-Auto Figure 32. I/O port general block diagram REGISTER ACCESS DR DDR OR OR SEL DDR SEL DR SEL EXTERNAL INTERRUPT SOURCE ( Table 26. I/O port mode options Configuration mode Floating with/without Interrupt Input Pull-up with/without Interrupt ...

Page 74

I/O ports Table 27. I/O port configurations NOT IMPLEMENTED IN TRUE OPEN DRAIN I/O PORTS NOT IMPLEMENTED IN TRUE OPEN DRAIN I/O PORTS NOT IMPLEMENTED IN TRUE OPEN DRAIN I/O PORTS 1. When the I/O port is in input configuration ...

Page 75

ST72361xx-Auto Warning: 8.3 I/O port implementation The hardware implementation on each I/O port depends on the settings in the DDR and OR registers and specific feature of the I/O port such as ADC Input or true open drain. Switching these ...

Page 76

I/O ports 8.4.2 Interrupt ports Table 29. Configuration of PA0 PB0, 2,4; PC1; PD0,6 (with pull-up) Floating input Pull-up interrupt input Open drain output Push-pull output Table 30. Configuration of PA1 PB1,3,5; PC2; PD1, ...

Page 77

ST72361xx-Auto 8.4.3 Pull-up input port Table 31. Configuration of PC4 The PC4 port cannot operate as a general purpose output. If DDR = still possible to read the port through the DR register. Table 32. Port configuration ...

Page 78

I/O ports Table 32. Port configuration (continued) Port Pin name PD0 PD1 PD3:2 Port D PD4 PD5 PD6 PD7 Port E PE7:0 Port F PF7:0 8.5 Low power modes Table 33. Effect of low power modes on I/O ports Mode ...

Page 79

ST72361xx-Auto Table 35. I/O port register map and reset values Address Register (Hex.) label Reset value of all IO port registers 0000h PADR 0001h PADDR 0002h PAOR 0003h PBDR 0004h PBDDR 0005h PBOR 0006h PCDR 0007h PCDDR 0008h PCOR 0009h ...

Page 80

Window watchdog (WWDG) 9 Window watchdog (WWDG) 9.1 Introduction The Window Watchdog is used to detect the occurrence of a software fault, usually generated by external interference or by unforeseen logical conditions, which causes the application program to abandon its ...

Page 81

ST72361xx-Auto Figure 34. Watchdog block diagram RESET 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 ...

Page 82

Window watchdog (WWDG) 9.4 Using halt mode with the WDG If Halt mode with Watchdog is enabled by option byte (no watchdog reset on HALT instruction recommended before executing the HALT instruction to refresh the WDG counter, to ...

Page 83

ST72361xx-Auto Figure 36. Exact timeout duration (t WHERE (LSB + 128 min0 t = 16384 x t max0 t = 125ns if f OSC2 CNT = Value of T[5:0] bits in the WDGCR register ...

Page 84

Window watchdog (WWDG) Figure 37. Window watchdog timing diagram 9.6 Low power modes Table 36. Effect of low power modes on WDG Mode SLOW No effect on Watchdog: the downcounter continues to decrement at normal speed. WAIT No effect on ...

Page 85

ST72361xx-Auto 9.8 Using halt mode with the WDG (WDGHALT option) The following recommendation applies if Halt mode is used when the watchdog is enabled. ● Before executing the HALT instruction, refresh the WDG counter, to avoid an unexpected WDG reset ...

Page 86

Window watchdog (WWDG) Table 37. Watchdog timer register map and reset values Address (Hex 86/279 Register label 7 WDGCR WDGA Reset value 0 WDGWR - Reset value 0 Doc ID 12468 Rev 3 ST72361xx-Auto ...

Page 87

ST72361xx-Auto 10 Main clock controller with real time clock MCC/RTC The Main Clock Controller consists of three different functions: ● a programmable CPU clock prescaler ● a clock-out signal to supply external devices ● a real time clock timer with ...

Page 88

Main clock controller with real time clock MCC/RTC 10.4 Low power modes Table 38. Effect of low power modes on MCC/RTC Mode No effect on MCC/RTC peripheral. WAIT MCC/RTC interrupt cause the device to exit from WAIT mode. No effect ...

Page 89

ST72361xx-Auto Table 40. CPU clock frequency in SLOW mode OSC2 OSC2 OSC2 OSC2 Bit 4 = SMS Slow mode select This bit is set and cleared by ...

Page 90

Main clock controller with real time clock MCC/RTC Caution: The BRES and BSET instructions must not be used on the MCCSR register to avoid unintentionally clearing the OIF bit. Table 42. Main clock controller register map and reset values Address ...

Page 91

ST72361xx-Auto 11 PWM auto-reload timer (ART) 11.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 operating modes: ...

Page 92

PWM auto-reload timer (ART) 11.2 Functional description 11.2.1 Counter The free running 8-bit counter is fed by the output of the prescaler, and is incremented on every rising edge of the clock signal possible to read or write ...

Page 93

ST72361xx-Auto Figure 40. Output compare control f COUNTER COUNTER OCRx PWMDCRx PWMx 11.2.5 Independent PWM signal generation This mode allows up to four Pulse Width Modulated signals to be generated on the PWMx output pins with minimum core processing overhead. ...

Page 94

PWM auto-reload timer (ART) Figure 42. PWM signal from 0% to 100% duty cycle COUNTER OCRx=FCh OCRx=FDh OCRx=FEh OCRx=FFh 11.2.6 Output compare and Time base interrupt On overflow, the OVF flag of the ARTCSR register is set and an overflow ...

Page 95

ST72361xx-Auto Each input capture can generate an interrupt independently on a selected input signal transition. This event is flagged by a set of the corresponding CFx bits of the Input Capture Control/Status register (ARTICCSR). These input capture interrupts are enabled ...

Page 96

PWM auto-reload timer (ART) Figure 45. Input capture timing diagram CPU f COUNTER COUNTER ARTICx PIN CFx FLAG ICRx REGISTER f CPU f COUNTER COUNTER ARTICx PIN CFx FLAG ICRx REGISTER 11.2.9 External interrupt capability This mode allows ...

Page 97

ST72361xx-Auto 11.3 Register description Control/status register (ARTCSR) Read/Write Reset value: 0000 0000 (00h) 7 EXCL CC2 Bit 7 = EXCL External Clock This bit is set and cleared by software. It selects the input clock for the 7-bit prescaler. 0: ...

Page 98

PWM auto-reload timer (ART) Bit 0 = OVF Overflow Flag This bit is set by hardware and cleared by software reading the ARTCSR register. It indicates the transition of the counter from FFh to the ARTARR value 0: New transition ...

Page 99

ST72361xx-Auto PWM control register (PWMCR) Read/write Reset value: 0000 0000 (00h) 7 OE3 OE2 Bit 7:4 = OE[3:0] PWM Output Enable These bits are set and cleared by software. They enable or disable the PWM output channels independently acting on ...

Page 100

PWM auto-reload timer (ART Bit 7:6 = Reserved, always read as 0. Bit 5:4 = CS[2:1] Capture Sensitivity These bits are set and cleared by software. They determine the trigger event polarity on the corresponding input capture ...

Page 101

ST72361xx-Auto Table 46. PWM auto-reload timer register map and reset values (continued) Address Register label (Hex.) PWMCR 0035h Reset value ARTCSR 0036h Reset value ARTCAR 0037h Reset value ARTARR 0038h Reset value ARTICCSR 0039h Reset value ARTICR1 003Ah Reset value ...

Page 102

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 signals (input ...

Page 103

ST72361xx-Auto 12.3 Functional description 12.3.1 Counter The main block of the Programmable Timer is a 16-bit free running upcounter and its associated 16-bit registers. The 16-bit registers are made up of two 8-bit registers called high and low. Counter Register ...

Page 104

Figure 47. Timer block diagram f CPU 1/2 1/4 1/8 EXTCLK pin CC[1:0] ICF1 OCF1 TOF ICIE OCIE TOIE TIMER INTERRUPT Figure 48. 16-bit read sequence: (from counter or alternate counter register) 104/279 ST7 INTERNAL BUS MCU-PERIPHERAL INTERFACE ...

Page 105

ST72361xx-Auto The user must read the MS Byte first, then the LS Byte value is buffered automatically. This buffered value remains unchanged until the 16-bit read sequence is completed, even if the user reads the MS Byte several times. After ...

Page 106

Figure 49. Counter timing diagram, internal clock divided by 2 TIMER OVERFLOW FLAG (TOF) Figure 50. Counter timing diagram, internal clock divided by 4 COUNTER REGISTER TIMER OVERFLOW FLAG (TOF) Figure 51. Counter timing diagram, internal clock divided ...

Page 107

ST72361xx-Auto The active transition is software programmable through the IEDGi bit in the control register (CRi). Timing resolution is one count of the free running counter: ( 12.3.4 Procedure To use the input capture function select the following in the ...

Page 108

Figure 52. Input capture block diagram ICAP1 pin EDGE DETECT ICAP2 pin IC2R Register 16-BIT Figure 53. Input capture timing diagram TIMER CLOCK COUNTER REGISTER ICAPi PIN ICAPi FLAG ICAPi REGISTER Note: The rising edge is the active ...

Page 109

ST72361xx-Auto These registers are readable and writable and are not affected by the timer hardware. A reset event changes the OC Timing resolution is one count of the free running counter: ( 12.3.6 Procedure To use the output compare function, ...

Page 110

The following procedure is recommended to prevent the OCFi bit from being set between the time it is read and the write to the OC ● Write to the OCiHR register (further compares are inhibited). ● Read the ...

Page 111

ST72361xx-Auto Figure 55. Output compare timing diagram, f OUTPUT COMPARE REGISTER i (OCRi) Figure 56. Output compare timing diagram, f OUTPUT COMPARE REGISTER i (OCRi) 12.3.8 One pulse mode One Pulse mode enables the generation of a pulse when an ...

Page 112

Select the following in the CR2 register: – Set the OC1E bit, the OCMP1 pin is then dedicated to the Output Compare 1 function. – Set the OPM bit. – Select the timer clock CC[1:0] (see Then, ...

Page 113

ST72361xx-Auto Note: 1 The OCF1 bit cannot be set by hardware in One Pulse mode but the OCF2 bit can generate an Output Compare interrupt. 2 When the Pulse Width Modulation (PWM) and One Pulse mode (OPM) bits are both ...

Page 114

Procedure To use Pulse Width Modulation mode: 1. Load the OC2R register with the value corresponding to the period of the signal using the formula in the opposite column. 2. Load the OC1R register with the value corresponding ...

Page 115

ST72361xx-Auto f = External timer clock frequency (in hertz) EXT The Output Compare 2 event causes the counter to be initialized to FFFCh (See Note: 1 After a write instruction to the OCiHR register, the output compare function is inhibited ...

Page 116

Note: The 16-bit Timer interrupt events are connected to the same interrupt vector (see Interrupts chapter). These events generate an interrupt if the corresponding Enable Control Bit is set and the interrupt mask in the CC register is ...

Page 117

ST72361xx-Auto Bit 5 = TOIE Timer Overflow Interrupt Enable. 0: Interrupt is inhibited timer interrupt is enabled whenever the TOF bit of the SR register is set. Bit 4 = FOLV2 Forced Output Compare 2. This bit is ...

Page 118

Bit 5 = OPM One Pulse Mode. 0: One Pulse mode is not active. 1: One Pulse mode is active, the ICAP1 pin can be used to trigger one pulse on the OCMP1 pin; the active transition is ...

Page 119

ST72361xx-Auto Bit 6 = OCF1 Output Compare Flag 1. 0: nomatch (reset value). 1: the content of the free running counter has matched the content of the OC1R register. To clear this bit, first read the SR register, then read ...

Page 120

Input capture 1 low register (IC1LR) Read only Reset value: Undefined This is an 8-bit read only register that contains the low part of the counter value (transferred by the input capture 1 event). 7 MSB 12.7.6 ...

Page 121

ST72361xx-Auto 12.7.9 Output compare 2 low register (OC2LR) Read/ write Reset value: 0000 0000 (00h) This is an 8-bit register that contains the low part of the value to be compared to the CLR register. 7 MSB 12.7.10 Counter high ...

Page 122

Alternate counter low register (ACLR) Read only Reset value: 1111 1100 (FCh) This is an 8-bit register that contains the low part of the counter value. A write to this register resets the counter. An access to ...

Page 123

ST72361xx-Auto Table 51. 16-bit timer register map (continued) Address Register name (Hex.) 54 IC1HR 55 IC1LR 56 OC1HR 57 OC1LR 58 CHR 59 CLR 5A ACHR 5B ACLR 5C IC2HR 5D IC2LR 5E OC2HR 5F OC2LR ...

Page 124

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 ...

Page 125

ST72361xx-Auto Writing in the CTR register or ACTR register resets the free running counter to the FCh value. Both counters have a reset value of FCh (this is the only value which is reloaded in the 8-bit timer). The reset ...

Page 126

Figure 59. Timer block diagram f CPU f 1/8000 OSC2 CC[1:0] ICF1 ICIE OCIE TOIE TIMER INTERRUPT Whatever the timer mode used (input capture, output compare, one pulse mode or PWM mode) an overflow occurs when the ...

Page 127

ST72361xx-Auto 1. Reading the SR register while the TOF bit is set access (read or write) to the CTR register. Note: The TOF bit is not cleared by accesses to ACTR register. The advantage of accessing the ACTR ...

Page 128

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 to ...

Page 129

ST72361xx-Auto Moreover if one of the ICAPi pins is configured as an input and the second one as an output, an interrupt can be generated if the user toggles the output pin and if the ICIE bit is set. 6 ...

Page 130

These registers are readable and writable and are not affected by the timer hardware. A reset event changes the OC Timing resolution is one count of the free running counter: (f Procedure To use the output compare ...

Page 131

ST72361xx-Auto When the timer clock is f counter value equals the OCiR register value plus 1 (see 4 The output compare functions can be used both for generating external events on the OCMPi pins even if the input capture mode ...

Page 132

Figure 67. Output compare timing diagram, f OUTPUT COMPARE REGISTER i (OCRi) 13.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 ...

Page 133

ST72361xx-Auto Then valid event on the ICAP1 pin, the counter is initialized to FCh and OLVL2 bit is loaded on the OCMP1 pin, the ICF1 bit is set and the value FFFDh is loaded in the IC1R register. ...

Page 134

Figure 68. One pulse mode timing example COUNTER Note: IEDG1 = 1, OC1R = D0h, OLVL1 = 0, OLVL2 = 1 Figure 69. Pulse width modulation mode timing example Note: OC1R = D0h, OC2R = E2, OLVL1 ...

Page 135

ST72361xx-Auto 1. Load the OC2R register with the value corresponding to the period of the signal using the formula in the opposite column. 2. Load the OC1R register with the value corresponding to the period of the pulse if (OLVL1 ...

Page 136

IC2R can be loaded) but the user must take care that the counter is reset each period and ICF1 can also generates interrupt if ICIE is set. 4 When the Pulse Width Modulation (PWM) and ...

Page 137

ST72361xx-Auto 13.6 Summary of timer modes Table 54. Timer modes Modes Input Capture (1 and/or 2) Output Compare (1 and/or 2) One Pulse Mode PWM Mode 1. See note 4 in One pulse 2. See note 5 in One pulse ...

Page 138

Bit 4 = FOLV2 Forced Output Compare 2. This bit is set and cleared by software effect on the OCMP2 pin. 1:Forces the OLVL2 bit to be copied to the OCMP2 pin, if the OC2E ...

Page 139

ST72361xx-Auto Bit 4 = PWM Pulse Width Modulation. 0: PWM mode is not active. 1: PWM mode is active, the OCMP1 pin outputs a programmable cyclic signal; the length of the pulse depends on the value of OC1R register; the ...

Page 140

Note: Reading or writing the ACTR register does not clear TOF. Bit 4 = ICF2 Input Capture Flag input capture (reset value input capture has occurred on the ICAP2 pin. To clear ...

Page 141

ST72361xx-Auto 13.7.6 Output compare 2 register (OC2R) Read/ write Reset value: 0000 0000 (00h) This is an 8-bit register that contains the value to be compared to the CTR register. 7 MSB 13.7.7 Counter register (CTR) Read only Reset value: ...

Page 142

Address Register name (Hex.) 3C CR2 3D CR1 3E CSR 3F IC1R 40 OC1R 41 CTR 42 ACTR 43 IC2R 44 OC2R 142/279 OC1E OC2E OPM PWM ICIE ...

Page 143

ST72361xx-Auto 14 Serial peripheral interface (SPI) 14.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 system in which devices ...

Page 144

Serial peripheral interface (SPI) Figure 70. Serial peripheral interface block diagram MOSI MISO SOD bit SCK SS 14.3.1 Functional description A basic example of interconnections between a single master and a single slave is illustrated in Figure The MOSI pins ...

Page 145

ST72361xx-Auto Figure 71. Single master/ single slave application MASTER MSBit 8-BIT SHIFT REGISTER SPI CLOCK GENERATOR 14.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 ...

Page 146

Serial peripheral interface (SPI) Figure 73. Hardware/software slave select management 14.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 ...

Page 147

ST72361xx-Auto 14.3.5 Slave mode operation In slave mode, the serial clock is received on the SCK pin from the master device. To operate the SPI in slave mode: 1. Write to the SPICSR register to perform the following actions: – ...

Page 148

Serial peripheral interface (SPI) MISO pin and the MOSI pin are directly connected between the master and the slave device. Note: If CPOL is changed at the communication byte boundaries, the SPI must be disabled by resetting the SPE bit. ...

Page 149

ST72361xx-Auto Clearing the MODF bit is done through a software sequence read access to the SPICSR register while the MODF bit is set write to the SPICR register. Note: To avoid any conflicts in an application ...

Page 150

Serial peripheral interface (SPI) Figure 75. Clearing the WCOL bit (write collision flag) software sequence Clearing sequence after SPIF = 1 (end of a data byte transfer) 1st Step 2nd Step Clearing sequence before SPIF = 1 (during a data ...

Page 151

ST72361xx-Auto Figure 76. Single master / multiple slave configuration SCK MOSI SCK 5V SS 14.6 Low power modes Table 56. Effect of low power modes on SPI Mode WAIT HALT Using the SPI to wake up the device from halt ...

Page 152

Serial peripheral interface (SPI) 14.7 Interrupts Table 57. SPI interrupt control and wake-up capability Interrupt event SPI End of Transfer Event Master Mode Fault Event Overrun Error Note: The SPI interrupt events are connected to the same interrupt vector (see ...

Page 153

ST72361xx-Auto Bit 4 = MSTR Master Mode This bit is set and cleared by software also cleared by hardware when, in master mode (see Master mode fault 0: Slave mode 1: Master mode. The function ...

Page 154

Serial peripheral interface (SPI) SPIE = 1 in the SPICR register cleared by a software sequence (an access to the SPICSR register followed by a write or a read to the SPIDR register). 0: Data transfer is in ...

Page 155

ST72361xx-Auto 14.8.3 Data I/O register (SPIDR) Read/ write Reset value: Undefined The SPIDR register is used to transmit and receive data on the serial bus master device, a write to this register will initiate transmission/reception ...

Page 156

LINSCI serial communication interface (LIN master/slave) 15 LINSCI serial communication interface (LIN master/slave) 15.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. ...

Page 157

ST72361xx-Auto 15.3 LIN features ● LIN master – 13-bit LIN synch break generation ● LIN slave – Automatic header handling – Automatic baud rate resynchronization based on recognition and measurement of the LIN synch field (for LIN slave nodes) – ...

Page 158

LINSCI serial communication interface (LIN master/slave) Figure 77. SCI block diagram (in conventional baud rate generator mode) TDO RDI SCICR2 TIE 15.5 SCI mode - functional description 15.5.1 Conventional baud rate generator mode The block diagram of the serial control ...

Page 159

ST72361xx-Auto 15.5.2 Extended prescaler mode Two additional prescalers are available in extended prescaler mode. They are shown in Figure 79. ● An extended prescaler receiver register (SCIERPR) ● An extended prescaler transmitter register (SCIETPR) 15.5.3 Serial data format Word length ...

Page 160

LINSCI serial communication interface (LIN master/slave) Character transmission During an SCI transmission, data shifts out least significant bit first on the TDO pin. In this mode, the SCIDR register consists of a buffer (TDR) between the internal bus and the ...

Page 161

ST72361xx-Auto Idle line Setting the TE bit drives the SCI to send a preamble consecutive ‘1’s (idle line) before the first character. In this case, clearing and then setting the ...

Page 162

LINSCI serial communication interface (LIN master/slave) When an overrun error occurs: ● The OR bit is set. ● The RDR content will not be lost. ● The shift register will be overwritten. ● An interrupt is generated if the RIE ...

Page 163

ST72361xx-Auto with (see SCP[1:0] bits 16, 32, 64,128 (see SCT[2:0] bits 16, 32, 64,128 (see SCR[2:0] bits) All these bits are ...

Page 164

LINSCI serial communication interface (LIN master/slave) Figure 79. SCI baud rate and extended prescaler block diagram f CPU /16 15.5.7 Receiver muting and wake-up feature In multiprocessor configurations it is often desirable that only the intended message recipient should actively ...

Page 165

ST72361xx-Auto Idle line detection Receiver wakes up by idle line detection when the receive line has recognized an Idle Line. Then the RWU bit is reset by hardware but the IDLE bit is not set. This feature is useful in ...

Page 166

LINSCI serial communication interface (LIN master/slave) Example 2: data = 00110101; 4 bits set => parity bit will even parity is selected (PS bit = 0). Odd parity The parity bit is calculated to obtain an odd ...

Page 167

ST72361xx-Auto The SCI interrupt events are connected to the same interrupt vector (see Interrupts chapter). These events generate an interrupt if the corresponding Enable Control Bit is set and the interrupt mask in the CC register is reset (RIM instruction). ...

Page 168

LINSCI serial communication interface (LIN master/slave) The OR bit is set by hardware when the word currently being received in the shift register is ready to be transferred into the RDR register whereas RDRF is still set. An interrupt is ...

Page 169

ST72361xx-Auto Bit 5 = SCID Disabled for low power consumption When this bit is set the SCI prescalers and outputs are stopped and the end of the current byte transfer in order to reduce power consumption.This bit is set and ...

Page 170

LINSCI serial communication interface (LIN master/slave) Bit 6 = TCIE Transmission complete interrupt enable This bit is set and cleared by software. 0: interrupt is inhibited 1: an SCI interrupt is generated whenever the SCISR register ...

Page 171

ST72361xx-Auto Contains the received or transmitted data character, depending on whether it is read from or written to. 7 DR7 DR6 The data register performs a double function (read and write) since it is composed of two registers, one for ...

Page 172

LINSCI serial communication interface (LIN master/slave) Table 64. Transmitter rate divider TR dividing factor Bits 2:0 = SCR[2:0] SCI Receiver rate divider. These 3 bits, in conjunction with the SCP[1:0] bits define the total division applied to the bus clock ...

Page 173

ST72361xx-Auto 15.8.7 Extended transmit prescaler division register (SCIETPR) Read/ write Reset value: 0000 0000 (00h) 7 ETPR7 ETPR6 Bits 7:0 = ETPR[7:0] 8-bit Extended Transmit Prescaler Register. The extended baud rate generator is activated when a value other than 00h ...

Page 174

LINSCI serial communication interface (LIN master/slave) In LIN Slave mode the LIN baud rate generator is selected instead of the conventional or extended prescaler. The LIN baud rate generator is common to the transmitter and the receiver. Then the baud ...

Page 175

ST72361xx-Auto Figure 81. SCI block diagram in LIN slave mode TDO RDI 15.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 handling the LIN header ...

Page 176

LINSCI serial communication interface (LIN master/slave) Note recommended to combine the header detection function with Mute mode. Putting the LINSCI in mute mode allows the detection of Headers only and prevents the reception of any other characters. This ...

Page 177

ST72361xx-Auto 15.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 set ● An interrupt is generated ...

Page 178

LINSCI serial communication interface (LIN master/slave) If the LHE flag is set, it means that: D > 15.625% If LHE flag is not set, it means that: D < 16.40625% If 15.625%  D  16.40625%, then the flag can ...

Page 179

ST72361xx-Auto worst case: This occurs when the LIN identifier lasts exactly 10 T case, the LIN break and synch fields last 39T Assuming the slave measures these first 39 bits with a desynchronized clock of 15.5%. ...

Page 180

LINSCI serial communication interface (LIN master/slave) 15.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 based ...

Page 181

ST72361xx-Auto Figure 84. LDIV read / write operations when LDUM = 0 Write LPR Figure 85. LDIV read / write operations when LDUM = 1 Write LPR 15.9.7 LINSCI clock tolerance LINSCI clock tolerance when unsynchronized When LIN slaves are ...

Page 182

LINSCI serial communication interface (LIN master/slave) Note: If the period desynchronization of the slave is +15% (slave too slow), the character “00h” which represents a sequence of 9 low bits must not be interpreted as a break character (9 bits ...

Page 183

ST72361xx-Auto 15.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 are performed using the CPU clock cycle. ...

Page 184

LINSCI serial communication interface (LIN master/slave) 15.10 LIN mode register description 15.10.1 Status register (SCISR) Read only Reset value: 1100 0000 (C0h) 7 TDRE TC Bits 7:4 = same function as in SCI mode, please refer to description. Bit 3 ...

Page 185

ST72361xx-Auto 15.10.2 Control Register 1 (SCICR1) Read/ write Reset value: x000 0000 (x0h Bits 7:3 = Same function as in SCI mode, please refer to description. Bit 2 = PCE Parity control enable. This bit is set ...

Page 186

LINSCI serial communication interface (LIN master/slave) 15.10.4 Control register 3 (SCICR3) Read/ write Reset value: 0000 0000 (00h) 7 LDUM LINE Bit 7 = LDUM LIN Divider Update Method. This bit is set and cleared by software and is also ...

Page 187

ST72361xx-Auto Bit 4 = LASE LIN Auto Synch Enable. This bit enables the Auto Synch Unit (ASU set and cleared by software only usable in LIN Slave mode. 0: auto synch unit disabled 1: auto synch ...

Page 188

LINSCI serial communication interface (LIN master/slave) 15.10.5 LIN divider registers LDIV is coded using the two registers LPR and LPFR. In LIN slave mode, the LPR register is accessible at the address of the SCIBRR register and the LPFR register ...

Page 189

ST72361xx-Auto Table 68. LDIV fraction LPFR[3: ... When initializing LDIV, the LPFR register must be written first. Then, the write to the LPR register will effectively update LDIV and so the clock generation ...

Page 190

LINSCI serial communication interface (LIN master/slave) 15.10.8 LIN header length register (LHLR) Read only Reset value: 0000 0000 (00h LHL7 LHL6 Note: In LIN slave mode when LASE = 1 or LHDM = 1, the LHLR register is ...

Page 191

ST72361xx-Auto Table 70. LHL fraction coding LHL[1: Example of LHL coding Example 1: LHL = 33h = 001100 11b LHL(7:3) = 1100b = 12d LHL(1:0) = 11b = 3d This leads to: Mantissa ( ...

Page 192

LINSCI serial communication interface (LIN master/slave) Table 71. LINSCI1 register map and reset values Addr. Register name (Hex.) SCI1SR 48 Reset value SCI1DR 49 Reset value SCI1BRR 4A LPR (LIN Slave Mode) Reset value SCI1CR1 4B Reset value SCI1CR2 4C ...

Page 193

ST72361xx-Auto 16 LINSCI serial communication interface (LIN master only) 16.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 offers a ...

Page 194

LINSCI serial communication interface (LIN master only) 16.3 General description The interface is externally connected to another device by three pins (see block diagram). Any SCI bidirectional communication requires a minimum of two pins: Receive Data In (RDI) and Transmit ...

Page 195

ST72361xx-Auto Figure 88. SCI block diagram TDO RDI CLOCK EXTRACTION SCLK PHASE AND POLARITY SCICR2 TIE TCIE INTERRUPT CONTROL TRANSMITTER CLOCK f 16.4 Functional description The block diagram of the serial control interface, is shown in dedicated registers: ● Three ...

Page 196

LINSCI serial communication interface (LIN master only) Refer to the register descriptions in definitions of each bit. 16.4.1 Serial data format Word length may be selected as being either bits by programming the M bit in the ...

Page 197

ST72361xx-Auto Character transmission During an SCI transmission, data shifts out least significant bit first on the TDO pin. In this mode, the SCIDR register consists of a buffer (TDR) between the internal bus and the transmit shift register (see Procedure ...

Page 198

LINSCI serial communication interface (LIN master only) Idle characters Setting the TE bit drives the SCI to send an idle frame before the first data frame. Clearing and then setting the TE bit during a transmission sends an idle frame ...

Page 199

ST72361xx-Auto Idle character When an idle frame is detected, there is the same procedure as a data received character plus an interrupt if the ILIE bit is set and the I bit is cleared in the CCR register. Overrun error ...

Page 200

LINSCI serial communication interface (LIN master only) Figure 90. SCI baud rate and extended prescaler block diagram f CPU /16 16.4.4 Conventional baud rate generation The baud rates for the receiver and transmitter (Rx and Tx) are set independently and ...

Related keywords