MCAL SPI
R2026bLibraries:
Embedded Coder Support Package for Renesas RH850
Microcontrollers /
Microcontroller Abstraction Layer (MCAL) Blocks
Description
Use the MCAL SPI block to write data to, read data from, or exchange data with an SPI peripheral device using the AUTOSAR MCAL SPI block. An SPI sequence is an ordered collection of jobs that the block triggers as a single transmission unit.
The block supports three transfer modes: Transmit,
Receive, and Transmit and Receive. In all
modes, the block triggers SPI communication at the Sequence level using
Spi_SyncTransmit. When the transfer mode includes a receive
operation, the block output per channel is a 1-by-N row vector, where N is the buffer size
configured for that channel.
The SPI channel source can be configured in two ways: by selecting a predefined sequence from the Configuration Definition File (CDF), or by specifying channels manually.
Sequence from CDF — Click Get SPI sequences to choose a sequence from the CDF. The Channels table is automatically populated with the channel name, type, data width, and buffer size defined in the CDF, and becomes read-only.
Manually specified sequence — Enter the sequence name directly in the SPI Sequence field, then use the Add Channel and Delete Channel buttons to define the channels in the Channels table.
Note
For Manually specified sequence, the sequence name and channel configuration in the block must match the sequence and channels defined in the Configuration Description File (CDF). If the specified sequence is not present in the CDF, the block supports code generation only.
The following features are not supported:
Asynchronous SPI transmission (
Spi_AsyncTransmit)Interrupt-driven mode
Polling mode (
Spi_MainFunction_Handling)EB (External Buffer) channel type
SPI slave mode
Before using this block, configure SPI sequences, jobs, channels, and external devices in the AUTOSAR MCAL configuration, select the Configuration Description File (CDF) in the Simulink model configuration, and then integrate the block into your target-specific model for code generation and deployment. For information on configuring the AUTOSAR MCAL SPI module hierarchy using Vector DaVinci Configurator, see Configure MCAL SPI in DaVinci Configurator.
Examples
Ports
Input
Output
Parameters
Version History
Introduced in R2026b


