フィルターのクリア

Send data via UART from STM32 board under Embedded Coder

56 ビュー (過去 30 日間)
Zoltan Nagy
Zoltan Nagy 2023 年 8 月 2 日
コメント済み: Zoltan NAGY 2024 年 2 月 8 日
Is there an example that shows that how to send data via UART from STM32 board under Embedded Coder?
I connected a uint8 constant, which supposed to be a valid input and the build failed with 'The parameter USART is not defined for selected hardware board'.
The UART block is not from the Nucleo library, but from the STM32 support package.
Does it mean that, ther are no UART communication blocks for Nucleo boards?
But oddly, even if I select an SMT32 H7, which has a library and I use the UART from that library (ioc file is also correct), I have the same error.
  2 件のコメント
Noman Nosher
Noman Nosher 2024 年 1 月 23 日
To use USART, you should run the simulink model on Embedded Coder Support Package of your relavent processor series. This will also required to configure IOC file first.
Further, you can create host and target configurations to send and receive data to and from the simulink model.
Zoltan NAGY
Zoltan NAGY 2024 年 2 月 8 日
Unfortunately, Embedded Coder is quite inconsistent, hence confusing first.
It seems, if you use a defined board, like Nucleo boards, the IOC is specified automatically and you cannot modify it, which is understandable.
Embedded Coder Support Package was added to MATLAB, as well as Nucleo support package.
The error was generated by that, I used STM32H7xx library, as my board had STM32H7xx chip, but for Nucleo boards, there is a separate library, in which the UART is SCI.

サインインしてコメントする。

採用された回答

Vikky Patil
Vikky Patil 2023 年 8 月 3 日
For the set hardware board you need to use the SCI Write block from Simulink Coder Support Package for STMicroelectronics Nucleo Board -> Common
  1 件のコメント
Zoltan Nagy
Zoltan Nagy 2023 年 8 月 3 日
Thanks, your answer pointed me to the right direction.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by