STM32 handshake with MATLAB&Simulink

The issue I am facing when using the STM32U585 microcontroller in the MATLAB and Simulink (M&S) Environment.
1. The controller is the STM32U585Allx. Discovery kit.
2. We are working on a project in Simulink (Model-Based Design). As a first stage, we are sensing three-phase AC currents and a PWM generator as a part of our project. For this project the hardware is provided by STM32 U585-based Discovery kit. All hardware support packages have been installed in the M&S environment. We are setting up the hardware in STM32CubeMX, configuring ADC1 and Timer1. All the desired parameters are set and we are generating the code.ioc file. The ADC is set for injected signal inputs. TRG0 provides the trigger for the ADC1. The ADC1 block in Simulink is not getting linked with .ioc file generated in SubeMX. The error is: Index exceeds the number of array elements. So we cannot proceed further. We would like to get your advice and suggestions.

Réponses (1)

Saurav Shandilya
Saurav Shandilya il y a environ 4 heures

0 votes

In order to investiagte the source of error, please reach out to Technical Support for further assistance: https://in.mathworks.com/support/contact_us.html .
Ensure that the Simulink model as well as the STM32CubeMX IOC file are attached and mention the version of MATLAB you are using.

Produits

Version

R2023b

Tags

Question posée :

le 5 Mai 2026 à 8:43

Réponse apportée :

il y a environ 15 heures

Community Treasure Hunt

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

Start Hunting!

Translated by