cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX ADC sampling time

smhhadima
Associate II
Posted on August 12, 2015 at 19:30

I use CubeMX to generate code.

How can ADC Sampling Time?

CubeMX does not give option for that and always generate:

SamplingTime = ADC_SAMPLETIME_3CYCLES;

My problem is if I changed it manually (to for example 28 cycles) and few month later changed something else via CubMx,I will totally forget about it
3 REPLIES 3
Posted on August 12, 2015 at 21:28

CubeMX is designed to output a rough framing of your project, once, and then you fill in the details and specifics, not that you hit the button over and over as you change the design and your mind.

If you have to keep modifying it at the CubeMX level have it build it into a new project/directory, and merge back your specifics.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
raptorhal2
Lead
Posted on August 13, 2015 at 03:45

In the Parameter Settings menu, expand the rank for each channel by clicking the ''+'' button. Then set the desired sample time.

Regards, Hal

markb
Associate II
Posted on August 13, 2015 at 09:56

Just use git and then when the cube regenerates the code, you can easily replace any changes you have made.