Stm32F746 to MATLAB/SIMULINK
15 views (last 30 days)
Show older comments
Hello,
I have modelled an algorithm on SIMULINK. And I am using stm32 f746zg LQFP144 microcontroller. I want input (which is coming from photodetector of my modulator) at ADC pin of my microcontroller. I have installed Matlab support package for nucleo and using the analog input block. As I am new in this area, So I am confused either to use this analog input block directly without any extra configuration block or should I somehow first configure this ADC block? I have also read MAT-STM32 TARGET which says stm32f746zg should not be supported by this.Furthermore I have also checked Waijung library but I think my microcontroller is also not supported by that as well. So please someone guide me in this regard how to use the ADC block of Microcontroller in normal mode of simulation or how should be the configuration of the pins of ADC should be done? (I have configured the pins of microcontroller using STM32 CubeMX, So if there is any way to link the CubeMX file for my model please also let me know).
Thanks in Advance.
0 Comments
Answers (1)
Raghavendra Kandur
on 29 Sep 2020
Support for STM32F7G-Discovery board support is based on arm mbed (https://os.mbed.com/code/) platform. The driver blocks, like ADC Read, PWM Output blocks, etc use mbed drivers in code generation to get/set to peripherals on-chip.
mbed driver provides pre-configured drivers code to acces peripherals. The driver configurations are specific to corresponding mbed based boards. The Embedded Coder Support Package for STMicroelectronics Discovery Boards is not offering any configuration changes for peripherals instead the support package driver blocks are pre-configured mbed drivers.
You can create your own block for driver configuration generated from STMCubeMX with following links:
You need to create some wrapper functions to read or write to peripheral registers.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!