Auto Page CPX-3600 Especificaciones Pagina 130

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 243
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 129
Serial peripheral interface (SPI) ST72321xx-Auto
130/243 Doc ID 13829 Rev 1
14.6 Low power modes
14.6.1 Using the SPI to wake up the MCU from Halt mode
In slave configuration, the SPI is able to wake up the ST7 device from Halt mode through a
SPIF interrupt. The data received is subsequently read from the SPIDR register when the
software is running (interrupt vector fetch). If multiple data transfers have been performed
before software clears the SPIF bit, then the OVR bit is set by hardware.
Note: When waking up from Halt mode, if the SPI remains in Slave mode, it is recommended to
perform an extra communications cycle to bring the SPI from Halt mode state to normal
state. If the SPI exits from Slave mode, it returns to normal state immediately.
Caution: The SPI can wake up the ST7 from Halt mode only if the Slave Select signal (external SS
pin or the SSI bit in the SPICSR register) is low when the ST7 enters Halt mode. So if Slave
selection is configured as external (see Slave select management on page 123), make sure
the master drives a low level on the SS
pin when the slave enters Halt mode.
14.7 Interrupts
Note: The SPI interrupt events are connected to the same interrupt vector (see Interrupts chapter).
They generate an interrupt if the corresponding Enable Control Bit is set and the interrupt
mask in the CC register is reset (RIM instruction).
Table 64. Effect of low power modes on SPI
Mode Effect
Wait
No effect on SPI.
SPI interrupt events cause the device to exit from Wait mode.
Halt
SPI registers are frozen.
In Halt mode, the SPI is inactive. SPI operation resumes when the MCU is woken up by
an interrupt with “exit from Halt mode” capability. The data received is subsequently
read from the SPIDR register when the software is running (interrupt vector fetching). If
several data are received before the wake-up event, then an overrun error is generated.
This error can be detected after the fetch of the interrupt routine that woke up the
device.
Table 65. SPI interrupt control/wake-up capability
Interrupt event Event flag
Enable
control bit
Exit from
Wait
Exit from
Halt
SPI End of Transfer event SPIF
SPIE Yes
Ye s
Master Mode Fault event MODF
No
Overrun error OVR
Vista de pagina 129
1 2 ... 125 126 127 128 129 130 131 132 133 134 135 ... 242 243

Comentarios a estos manuales

Sin comentarios