cancel
Showing results for 
Search instead for 
Did you mean: 

ADC affecting pins not in its sequencer

Jon3
Associate II

Hello,

In some weird way, the ADC is affecting a certain pin (PA7) even though I did set that pin as one of the channels to be sampled. I trigger the ADC every 100ms, single conversion multichannel (only 4 channels) with DMA. When ADC is triggering every 100ms, pin PA7 eventually outputs voltage even though I set it to a regular GPIO output and pulldown to ground when setting it to 0. Nothing in the code is setting this pin to high, it is always low. When ADC is not enabled, this doesn't happen.

I'm using a Nucleo Board with STMG071RB. My ADC clock is 2MHz and sampling rate set to 160.5 cycles.

Any ideas? I'm kind of stuck already.

Thanks in advance!

2 REPLIES 2

Is this a "known good" board like Nucleo/Disco, or your own? How and where do you measure the PA7 voltage?

Read out and check/post GPIO registers content.

JW

Jon3
Associate II

Yes, I'm using a legitimate Nucleo DevKit, not my own created board.

PA7 is supposedly connected to a stepper driver (to a 'STEP' pin) in my testing setup. But then I noticed that the stepper motor suddenly just activates after some time. I did not set PA7 as PWM since I do not need to - I just toggle it on and off with a certain delay in between. I disconnected the driver from PA7 and measured the output with my multimeter (I do not have an oscilloscope unfortunately) and found that it is giving out ~100mV though I forced set it to 0 just to be sure it's not a bug in my code. That 100mV can be "floating" or a pulsed signal which I can't really verify without an oscilloscope.

I'm no longer sure where to look. I'll try your suggestion, though.

Thanks,

Jon