Skip to main content
Benjamin Brammer
Senior II
January 8, 2019
Solved

Data gets not written in SFR on STM32F429ZIT6

  • January 8, 2019
  • 4 replies
  • 1019 views

Hey Guys,

I hope someone can help me:

I testet my software with a STM32F429IDISCOVERY board which works fine. I now designed a custom board and migrated the software. Same peripherals, same pins etc. For a reason I don't understand the ADCs seem not to work. I want to use ADC3 and ADC1 and have already tested and used them correctly with the DISCOVERY board. What I find quite strange is that I only see zeros in the ADC SFR view. As if the peripheral is not being set up allthough the routines are executed when I step through them with the debugger The DAC -which I also use - seems to work except for a 3mV error which is tolerable I think.

I set up everything with STM32CubeMX and debug with true studio. All latest versions including the latest HAL and firmware package.

Does anybody know what is wrong here?

best regards

Benjamin

This topic has been closed for replies.
Best answer by waclawek.jan

Is the ADC clock enabled in RCC?

JW

4 replies

waclawek.jan
waclawek.janBest answer
Super User
January 8, 2019

Is the ADC clock enabled in RCC?

JW

Benjamin Brammer
Senior II
January 8, 2019

Hey Jan,

thanks for your fast reply!

Yes you are right! The ADC3EN bit in the RCC_APB2ENR is not set. But I truely don't understand this. I did the same initialization routine and settings I have with the former DISCOVERY board... except that I have two different CubeMX project files. One with the DISCOVERY board and one default with only the processor. Do you know where I can set this in CubeMX? I thught this was done automatically as I activated the pripheral in the analog tab.

Benjamin

Benjamin Brammer
Senior II
January 8, 2019

Well there is one difference from my RCC clock source: the DISCOVERY board uses a ceramic crystal and I use an oscilator. so I set HSE to BYPASS Clock source. Could this be a problem?

Benjamin Brammer
Senior II
January 8, 2019

Ok..I think there is some problem inside my routines...I don't get it at the moment. But the ADC3 Clock is enabled in the HAL routines and it gets enabled, but is later disabled as I start TIM7 as a free running timer...I will have to look deeper into this.

But thanks for your fast answer and the help! :)

Benjamin Brammer
Senior II
January 8, 2019

found the problem: I have an EXTI that gets triggered which deactivates the peripheral. I know why this is. So basically the hardware and software does what it should. It's just me being the problem :D