231
MC97F60128
ABOV Semiconductor Co., Ltd.
11.11.3 Data Transmit / Receive Operation
User can use SPI 3 for serial data communication by following step
1.
Select SPI 3 operation mode(master/slave, polarity, phase) by control register SPI3CR.
2.
When the SPI 3 is configured as a Master, it selects a Slave by SS3 signal (active low).
When the SPI 3 is configured as a Slave, it is selected by SS3 signal incoming from Master
3.
When the user writes a byte to the data register SPI3DR, SPI 3 will start an operation.
4.
In this time, if the SPI 3 is configured as a Master, serial clock will come out of SCK3 pin. And Master shifts
the eight bits into the Slave (transmit), Slave shifts the eight bits into the Master at the same time (receive). If
the SPI 3 is configured as a Slave, serial clock will come into SCK3 pin. And Slave shifts the eight bits into
the Master (transmit), Master shifts the eight bits into the Slave at the same time (receive).
5.
When transmit/receive is done, SPI3IFR bit will be set. If the SPI 3 interrupt is enabled, an interrupt is
requested. And SPI3IFR bit is cleared by hardware when executing the corresponding interrupt. If SPI 3
interrupt is disable, SPI3IFR bit is cleared when user read the status register SPI3SR and then access
(read/write) the data register SPI3DR.
11.11.4 SS3 pin function
1.
When the SPI 3 is configured as a Slave, the SS3 pin is always input. If LOW signal come into SS3 pin, the
SPI 3 logic is active. And if
‘HIGH’ signal come into SS3 pin, the SPI 3 logic is stop. In this time, SPI 3 logic
will be reset and invalidated any received data.
2.
When the SPI 3 is configured as a Master, the user can select the direction of the SS3 pin by port direction
register (P22IO). If the SS3 pin is configured as an output, user can use general P22IO output mode. If the
SS3 pin is configured as an input,
‘HIGH’ signal must come into SS3 pin to guarantee Master operation. If
‘LOW’ signal come into SS3 pin, the SPI 3 logic interprets this as another master selecting the SPI 3 as a
slave and starting to send data to it. To avoid bus contention, MSB bit of SPICR will be cleared and the SPI 3
becomes a Slave and then, SPI3IFR bit of SPI3SR will be set and if the SPI 3 interrupt is enabled, an
interrupt is requested.
NOTE)
1. When the SS3 pin is configured as an output at Master mode, SS3
pin’s output value is defined
by user’s software (P22IO). Before SPI3CR setting, the direction of SS3 pin must be defined
2. If you don
’t need to use SS3 pin, clear the SPI3SSEN bit of SPI3SR. So, you can use disabled
pin by P22IO freely. In this case, SS3 signal is driven by
‘HIGH’ or ‘LOW’ internally. In other
words, master is
‘HIGH’, salve is ‘LOW’
3. When SS3 pin is configured as input, if
‘HIGH’ signal come into SS3 pin, SS_HIGH flag bit will
be set. And you can clear it by
writing ‘0’.
Содержание MC97F60128
Страница 17: ...17 MC97F60128 ABOV Semiconductor Co Ltd 4 Package Diagram Figure 4 1 100 pin LQFP 1414 Package...
Страница 18: ...18 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 2 80 Pin LQFP 1212 Package...
Страница 19: ...19 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 3 80 Pin LQFP 1414 Package...
Страница 20: ...20 MC97F60128 ABOV Semiconductor Co Ltd Figure 4 4 64 Pin LQFP 1414 Package...