4 years, 11 months ago.  This question has been closed. Reason: Off Topic

Need Help With STM32F7 Discovery Board!

Hello everyone, I am new to the use of controllers. I am setting up a STM32F769 Controller(Using Mbed online compiler), my target is to get a PWM output which changes its frequency according to an analog input. I did some basic coding but there is a problem. When i check the output on oscilloscope with analog input 1Hz frequency, its working perfectly, but when i check it with 100Hz analog input there is delay in the output, and i get wrong values. I do not understand why, because this board is faster(216 MHZ) and i should not face such issue. (If someone could also explain, is it possible to use the board at 216MHz or other max frequency? and how?)

while(1) { meas_r=0; for(int i=1;i<=1024;i++) { meas_r = meas_r+analog_value.read(); } meas_r=meas_r/1024; meas_v = meas_r * 3300; out_freq=50000+(meas_v*50); pulse.period( 1.0 / out_freq); } } It should be working on 100Hz analog input as it works on 1 Hz.