|
|
|
Component
Init_SPI for HC08
Serial Peripheral Interface (SPI)
Properties:
-
Component name - Name of the component.
-
Device - Selection of the SPI device module.
-
Settings - Common SPI module settings.
-
Clock settings - Clock/timing module settings.
-
Divider - The property sets value used for setting SPI communication frequency in master mode (it has no effect in slave mode.)
This item modifies the SPR[1:0] bits in the SPSCR register.
-
Frequency - SPI communication speed (for information only).
This item is influenced by the following property: Divider.
-
Mode Select - The property selects master mode operation or slave mode operation.
This item modifies the SPMSTR bit in the SPCR register.
-
Clock Polarity - The property determines the logic state of the SPSCK pin between transmissions.
To transmit data between SPI modules, the SPI modules must have identical Clock polarity values. This item modifies the CPOL bit in the SPCR register.
There are 2 options:
- active-high: Active-high clocks selected. In idle state SCK is low.
- active-low: Active-low clocks selected. In idle state SCK is high.
-
Clock Phase - This property determines the edge used for data sampling (and the edge used for data sending).
This item modifies the CPHA bit in the SPCR register.
There are 2 options:
- Second edge: Sampling of data occurs at even edges (2,4,6,...,16) of the SCK clock.
- First edge: Sampling of data occurs at odd edges (1,3,5,...,15) of the SCK clock.
-
Mode Fault function - The property enables/disables Mode Fault checking.
This item modifies MODFEN bit in SPSCR register.
-
Wired-OR mode - The property enables or disables the pullup devices on pins SPSCK, MOSI, and MISO so that those pins become open-drain outputs.
This item modifies the SPWOM bit in the SPCR register.
-
Setting supported for Freescale HC08 EY16 and EY16A derivatives only.
-
SS pull up - The property enables or disables internal pullup resistor of the slave select pin.
This item modifies the SSBPUENB bit in the CONFIG2 register.
-
Setting supported for Freescale HC08 EY16A derivative only.
-
Slew Rate Control - The property enables or disables slew rate control for MISO, MOSI and SCK.
This item modifies the SPISRE bit in the CONFIG3 register.
-
Pins - Module pins/signals settings.
-
SCK pin - Clock signal pin.
-
SCK pin signal - Signal name of SCK pin.
-
MISO pin - Master in, slave out.
-
MISO pin signal - Signal name of MISO pin.
-
MOSI pin - Master out, Slave in
-
MOSI pin signal - Signal name of MOSI pin.
-
SS pin allocation - The property enables/disables allocation of the SS pin. Allocated pin is exclusively used by this peripheral and cannot be used by any other device.
The following items are available only if the group is enabled (the value is "Enabled"):
-
Interrupts - Interrupt settings of the module.
-
Receive and fault Interrupt - Receive and fault Interrupt settings.
-
Interrupt - Interrupt vector (for information only)
-
Receive Interrupt - Enable/disable Receive Interrupt. This interrupt request is generated when a byte transfers from the shift register to the receive data register.
This item modifies the SPRIE bit in the SPCR register.
-
Error Interrupt - Enable/disable Error interrupt.
This item modifies the ERRIE bit in the SPSCR register.
-
ISR name - Name of the interrupt service routine (ISR) invoked by this interrupt vector.
The user code of the routine should handle all respective interrupt flags correctly. The routine must be implemented in the user code, it is not generated by Processor Expert. Find external prototypes of the ISRs in the component module header file.
-
Transmit Interrupt - Transmit Interrupt settings.
-
Interrupt - Interrupt vector (for information only)
-
Transmit Interrupt - Enable/disable Transmit Interrupt. This interrupt request is generated when a byte transfers from the transmit data register to the shift register.
This item modifies the SPTIE bit in the SPCR register.
-
ISR name - Name of the interrupt service routine (ISR) invoked by this interrupt vector.
The user code of the routine should handle all respective interrupt flags correctly. The routine must be implemented in the user code, it is not generated by Processor Expert. Find external prototypes of the ISRs in the component module header file.
-
Initialization - Initialization options of the module.
-
Call Init method - The Init method of the component may be called after a power-on or reset (in initialization code) by PE.
yes - The Init method is called by PE
no - The Init method is not called by PE, it should be called in the user's code
-
Enable SPI system - The property enables SPI system.
This item modifies the SPE bit in the SPCR register.
|