Data Logging on external SD Card with STM32F767ZI

Hey,
I am using a STM32F767ZI nucleo board. Since it should be used as a controller on an electric scooter, I want to log data on a SD-Card during testing.
Is there a way on Simulink to log data with a STM32 on a SD-Card using for example SPI?
I would be glad if somebody could give me advice with this problem.
Also if somebody has another idea to get this done I would be greatful!

 Respuesta aceptada

Abhishek
Abhishek el 12 de Abr. de 2023
Hi Lorenz,
I understand that you have a requirement to log signal data into the SD card mounted on your target hardware. Considering your setup, I suggest using Embedded Coder Support Package for STMicroelectronics STM32 Processors. You can use various output blocks in Simulink like To Workspace, Scope, and Outport to save the signal as data points in Structure, Structure with time, or Array format. This will create a MAT-file with timestamp information.
To enable this, you will have to select the MAT-file Logging option in the Configuration Parameters dialog box and specify several block parameter values in the output blocks. Once you deploy the code, you can log the signals onto the SD card and later import them into MATLAB for further analysis like fault analysis, searching for transient behavior, or analyzing sensor data.
For detailed information, I recommend referring to Chapter 4 of the documentation: Embedded Coder Support Package for STMicroelectronics STM32 Processors User's Guide (mathworks.com)

4 comentarios

Are there similar User's guides for different Hardware support Packages too? Where can I find them?
Abhishek
Abhishek el 14 de Abr. de 2023
In MATLAB application, in Home -> Add Ons -> Get Hardware Support Packages. It'll open a Add-On Explorer window where you can search hardware support packages of choice. You can click-open one to access all related documentation, features, examples etc.
Francesco Bellucci
Francesco Bellucci el 9 de En. de 2024
Editada: Francesco Bellucci el 9 de En. de 2024
Hello everyone,
To use the approach mentioned by Abhishek, Do we have to integrate the SD adapter with the board via SPI or SDIO?
Hi,
which block of "Embedded Coder Support Package for STMicroelectronics STM32 Processors" package is necessary to use for this case of logging in SD card?
Does anyone have an functioning hardware configuration (.ioc file) to share? since in any guide is not specified the configurations to do STM side. I tried the default ones but do not work to me.
Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2021b

Preguntada:

el 1 de Abr. de 2023

Comentada:

el 17 de En. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by