Skip to main content
sanjeevkumar TM
Associate II
January 24, 2018
Solved

Facing problem during reading ADC value in external mode in MATLAB simulink

  • January 24, 2018
  • 1 reply
  • 982 views
Posted on January 24, 2018 at 16:00

Am not able to read the ADC value externally in simulink scope any one please help me regarding this. Am able to connect successfully externally but am not able to monitor the ADC values in scope.

Am using STM32F407VG discovery board. Other than PWM and  GPIO is working fine in external mode

Please any one help me regarding this. What configuration I have to do to read the ADC value in simulink.

Any configuration (CubeMX and Simulink block) or examples are there is more helpful, 

Here i attached the simulink and cubeMx file

Thank you

#simulink #stm32-mat/target-matlab
This topic has been closed for replies.
Best answer by Aimagin Co., Ltd.
Posted on February 08, 2018 at 11:27

Hello, Sajeevkumar

I found the ADC1 configuration in your .ioc file is PA5 pin so maybe this is cause your problem.

Because this pin is SCL/SPC pin for LIS302DL or LIS3DSH as the below picture.

 0690X00000609LTQAY.png

My recommendation is change to another pin such as ADC1_IN1(PA1 pin) and use default configuration in ADC_Regular_ConversionMode.

0690X00000609eEQAQ.png

Best regards,

1 reply

Visitor II
February 8, 2018
Posted on February 08, 2018 at 11:27

Hello, Sajeevkumar

I found the ADC1 configuration in your .ioc file is PA5 pin so maybe this is cause your problem.

Because this pin is SCL/SPC pin for LIS302DL or LIS3DSH as the below picture.

 0690X00000609LTQAY.png

My recommendation is change to another pin such as ADC1_IN1(PA1 pin) and use default configuration in ADC_Regular_ConversionMode.

0690X00000609eEQAQ.png

Best regards,