cancel
Showing results for 
Search instead for 
Did you mean: 

f373 SDADC one input is pulling down.

kbuyukcelen
Associate II

Hello, I have a custom designed board with 7 analog inputs on sigma delta ADC's.

6 of my inputs are working properly.

I have a software issue.

When I erase the flash or de-solder the mcu I can measure the correct voltage from my test points.

But when I upload the stmcubeide generated empty project, only 1 input goes low. Other 6 inputs are ok.

Where to check? What to check?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello, I solved the problem.

The project was not empty but I read everywhere line by line.

Today, I made a new project, and started moving everything line by line.

Everything was perfect till I move my lcd controller.

My SDADC pins are PB 0, 1,2 8, 9, 14, 15 and PD8

found that

GPIO_InitStruct.Pin = LCD_DB4_Pin|LCD_DB5_Pin|LCD_DB6_Pin|LCD_DB7_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

these lines lock PB2. Reconfigured through CubeMX and everything is fine.

Thanks TDK.

View solution in original post

4 REPLIES 4
TDK
Guru

> When I erase the flash or de-solder the mcu I can measure the correct voltage from my test points.

> I have a software issue.

Makes sense.

What pin? It's probably initialized as something else by default.

> But when I upload the stmcubeide generated empty project, only 1 input goes low.

Why does it matter what an empty project does? Shouldn't you be initializing the pins how you want?

If you feel a post has answered your question, please click "Accept as Solution".

Hello,

PB2 as SDADC1_AIN4P

None of GPIO's are modified.

I've initialized all sdadc inputs the same way. I'm missing something.

TDK
Guru

> None of GPIO's are modified.

> I've initialized all sdadc inputs the same way.

I'm still not understanding if your project is empty or if you're initializing ADC pins as analog.

Regardless, checking GPIO registers would verify if pins are set to analog state.

Stepping through the code to determine where the pin gets pulled down would also likely identify the problem.

If you feel a post has answered your question, please click "Accept as Solution".

Hello, I solved the problem.

The project was not empty but I read everywhere line by line.

Today, I made a new project, and started moving everything line by line.

Everything was perfect till I move my lcd controller.

My SDADC pins are PB 0, 1,2 8, 9, 14, 15 and PD8

found that

GPIO_InitStruct.Pin = LCD_DB4_Pin|LCD_DB5_Pin|LCD_DB6_Pin|LCD_DB7_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

these lines lock PB2. Reconfigured through CubeMX and everything is fine.

Thanks TDK.