Is there an API documentation for custom code for STM32 Nucleo Simulink project?

9 Ansichten (letzte 30 Tage)
Hello,
I'm working on a Simulink project using the "Simulink Coder Support Package for STMicroelectronics Nucleo Boards". I want to insert a custom initialization code for a timer. I found that I can insert C code using an S-function block. But I struggle finding some API explaining which functions I can use to manipulate the hardware. (e.g. "use function digitalWrite(pin_name, value) to set the value on the pin...")
I found out that the basic register manipulation (e.g. GPIOE->ODR |= 0x000F;) is acceptable by the compiler. But is there anything more user friendly?
Which libraries does the "Simulink Coder Support Package for STMicroelectronics Nucleo Boards" use? Is there some document explaining the API which can be used?

Antworten (1)

Tushar
Tushar am 15 Mai 2023
Hi,
You can find out the documentation of "Simulink Coder Support Package for STMicroelectronics Nucleo Boards" in the below links:
Please find the attached pdf, which could help you further to get more information.
Hope it helps!!
  1 Kommentar
Ondrej
Ondrej am 16 Mai 2023
Thank you very much for your answer. Yes, it helped me. Especially the examples of using Matlab System block to create a custom driver for functions not supported currently by the Nucleo Simulink library. These examples are referenced in the linked User Guide pdf. (https://www.mathworks.com/help/supportpkg/armcortexa/device-driver-blocks.html)
I also found a reference from the User Guide pdf to the following GitHub repository: https://github.com/ARMmbed/mbed-os/tree/mbed-os-5.14.1/targets/TARGET_STM Can you please confirm my understanding that these header and source files are available in the Nucleo Simulink library?

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by