RNFULLF is set when more than three 16-bit words or six 8-bit bytes of data remain in
the receive FIFO provided C3[4] = 0 or when more than two 16-bit words or four 8-bit
bytes of data remain in the receive FIFO provided C3[4] = 1.
Clearing this interrupt depends on the state of C3[3] and the status of RNFULLF. Refer
to the description of the SPI status (S) register.
35.5.13.7 Asynchronous interrupt in low-power modes
When the CPU is in Wait mode or Stop mode and the SPI module receives a
transmission, the SPI module can generate an asynchronous interrupt to wake the CPU
from the low power mode. The module generates the asynchronous interrupt only when
all of the following conditions apply:
1. C1[SPIE] is set to 1.
2. The CPU is in Wait mode—in which case C2[SPISWAI] must be 1—or in Stop
mode where the peripheral bus clock is stopped but internal logic states are retained.
3. The SPI module is in slave mode.
4. The received transmission ends.
5. When the FIFO feature is supported, FIFO mode is disabled: C3[FIFOMODE] is 0.
After the interrupt wakes the CPU and the peripheral bus clock is active again, the SPI
module copies the received data from the shifter into the Data register and generates flags
or DMA request signals. During the wakeup phase, a continuous transmission from a
master would destroy the first received data.
35.6 Initialization/application information
This section discusses an example of how to initialize and use the SPI.
NOTE
When operating the SPI at the maximum baud rate it must be
configured for 16 bit operation.
35.6.1 Initialization sequence
Before the SPI module can be used for communication, an initialization procedure must
be carried out, as follows:
Chapter 35 Serial Peripheral Interface (SPI)
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Freescale Semiconductor, Inc.
605
Содержание MKL27Z128VFM4
Страница 2: ...KL27 Sub Family Reference Manual Rev 5 01 2016 2 Freescale Semiconductor Inc...
Страница 54: ...AWIC introduction KL27 Sub Family Reference Manual Rev 5 01 2016 54 Freescale Semiconductor Inc...
Страница 100: ...Module operation in low power modes KL27 Sub Family Reference Manual Rev 5 01 2016 100 Freescale Semiconductor Inc...
Страница 142: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 142 Freescale Semiconductor Inc...
Страница 248: ...Memory map and register descriptions KL27 Sub Family Reference Manual Rev 5 01 2016 248 Freescale Semiconductor Inc...
Страница 256: ...Memory map register descriptions KL27 Sub Family Reference Manual Rev 5 01 2016 256 Freescale Semiconductor Inc...
Страница 262: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 262 Freescale Semiconductor Inc...
Страница 292: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 292 Freescale Semiconductor Inc...
Страница 324: ...Functional Description KL27 Sub Family Reference Manual Rev 5 01 2016 324 Freescale Semiconductor Inc...
Страница 390: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 390 Freescale Semiconductor Inc...
Страница 422: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 422 Freescale Semiconductor Inc...
Страница 432: ...Initialization Application Information KL27 Sub Family Reference Manual Rev 5 01 2016 432 Freescale Semiconductor Inc...
Страница 442: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 442 Freescale Semiconductor Inc...
Страница 512: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 512 Freescale Semiconductor Inc...
Страница 610: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 610 Freescale Semiconductor Inc...
Страница 646: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 646 Freescale Semiconductor Inc...
Страница 744: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 744 Freescale Semiconductor Inc...
Страница 784: ...Application Information KL27 Sub Family Reference Manual Rev 5 01 2016 784 Freescale Semiconductor Inc...
Страница 830: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 830 Freescale Semiconductor Inc...
Страница 850: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 850 Freescale Semiconductor Inc...
Страница 886: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 886 Freescale Semiconductor Inc...