Main Content

基于 STM32L5xx 的板

配置和使用 ADC、比较器、DAC、FDCAN、编码器、I2C、计时器、UART 等外设

使用对基于 STM32L5xx 处理器的板可用的 ADC、CAN、DAC、编码器、I2C、I2S、计时器、UART 等外设创建 Simulink® 模型。您可以为基于 STM32L5xx 处理器的板准备模型,以将 STM32CubeMX 工程与 Simulink 结合使用来生成代码并将代码部署到硬件。使用模型配置参数配置 Simulink 模型以与支持的目标硬件对接。

模块

全部展开

Analog to Digital ConverterConvert analog signal on ADC input pin to digital signal (自 R2021b 起)
ComparatorCompare two analog inputs on peripheral and provide results (自 R2023b 起)
Digital to Analog ConverterConfigures the DAC to generate an analog voltage on the specified DAC channel (自 R2023a 起)
CAN ReadRead message from CAN network (自 R2023a 起)
CAN WriteWrite data to the CAN Bus (自 R2023a 起)
I2C Controller ReadRead data from I2C peripheral device or I2C peripheral device register
I2C Controller WriteWrite data to I2C peripheral device or I2C peripheral device register
SPI ReceiveReceive data through Serial Peripheral Interface (SPI) on target (自 R2023a 起)
SPI TransmitTransmit data through Serial Peripheral Interface (SPI) on target (自 R2023a 起)
SPI Controller TransferWrite data to and read data from SPI peripheral device (自 R2023a 起)
UART/USART ReadRead data from the Universal Asynchronous Receiver Transmitter (UART/USART) port (自 R2022a 起)
UART/USART WriteWrite serial data from the Universal Asynchronous Receiver Transmitter (UART/USART) port (自 R2022a 起)
Digital Port ReadRead GPIO pin status (自 R2021b 起)
Digital Port Write设置 GPIO 引脚状态 (自 R2021b 起)
Hardware InterruptTrigger downstream function-call subsystems from interrupt service routine (自 R2021b 起)
EncoderMeasure rotation of encoder in counts (自 R2022b 起)
PWM OutputGenerate square waveform on enabled channels using timer module (自 R2021b 起)
TimerStarts timer counter and provides current counter value (自 R2022b 起)
Timer CaptureOutput the capture compare register value (自 R2022b 起)
Byte Pack将输入信号转换为 uint8 向量
Byte Unpackuint8 向量转换为输入信号
Byte Reversal反转输入字中的字节顺序
Memory CopyCopy data from and to memory section
Idle TaskCreate free-running task (自 R2024a 起)
Protocol EncoderEncode input data into a uint8 byte stream by specifying the packet structure (自 R2023a 起)
Protocol DecoderDecode a uint8 byte stream by specifying the packet structure (自 R2023a 起)

主题