cancel
Showing results for 
Search instead for 
Did you mean: 

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

sanjeevkumar TM
Associate II
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
1 ACCEPTED SOLUTION

Accepted Solutions
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,

View solution in original post

1 REPLY 1
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,