ST92124V1Q-Auto STMicroelectronics, ST92124V1Q-Auto Datasheet - Page 256

no-image

ST92124V1Q-Auto

Manufacturer Part Number
ST92124V1Q-Auto
Description
8-bit MCU for automotive
Manufacturer
STMicroelectronics
Datasheet

Specifications of ST92124V1Q-Auto

Internal Memory
Single Voltage FLASH up to 256 Kbytes, RAM up to 8Kbytes, 1K byte E3 TM (Emulated EEPROM)
Minimum Instruction Time
83 ns (24 MHz int. clock)
ST92124xxx-Auto/150xxxxx-Auto/250xxxx-Auto
SERIAL PERIPHERAL INTERFACE (Cont’d)
10.7.4.4 Write Collision Error
A write collision occurs when the software tries to
write to the SPDR register while a data transfer is
taking place with an external device. When this
happens, the transfer continues uninterrupted and
the software write will be unsuccessful.
Write collisions can occur both in master and slave
mode.
Note: a "read collision" will never occur since the
received data byte is placed in a buffer in which
access is always synchronous with the MCU oper-
ation.
In Slave mode
When the CPHA bit is set:
The slave device will receive a clock (SCK) edge
prior to the latch of the first data transfer. This first
clock edge will freeze the data in the slave device
SPDR register and output the MSBit on to the ex-
ternal MISO pin of the slave device.
The SS pin low state enables the slave device but
the output of the MSBit onto the MISO pin does
not take place until the first data transfer clock
edge.
Figure 124. Clearing the WCOL bit (Write Collision Flag) Software Sequence
256/430
9
1
2
st
nd
Step
Clearing sequence after SPIF = 1 (end of a data byte transfer)
Clearing sequence before SPIF = 1 (during a data byte transfer)
Step
1
2
st
nd
Step
Step
Read SPDR
Read SPSR
THEN
SPIF =0
WCOL=0
Read SPDR
Read SPSR
THEN
WCOL=0
When the CPHA bit is reset:
Data is latched on the occurrence of the first clock
transition. The slave device does not have any
way of knowing when that transition will occur;
therefore, the slave device collision occurs when
software attempts to write the SPDR register after
its SS pin has been pulled low.
For this reason, the SS pin must be high, between
each data byte transfer, to allow the CPU to write
in the SPDR register without generating a write
collision.
In Master mode
Collision in the master device is defined as a write
of the SPDR register while the internal serial clock
(SCK) is in the process of transfer.
The SS pin signal must be always high on the
master device.
WCOL Bit
The WCOL bit in the SPSR register is set if a write
collision occurs.
No SPI interrupt is generated when the WCOL bit
is set (the WCOL bit is a status flag only).
Clearing the WCOL bit is done through a software
sequence (see
Note: Writing in SPDR register
instead of reading in it do not re-
set WCOL bit
Figure
124).

Related parts for ST92124V1Q-Auto