2024-12-15 01:27 PM - edited 2024-12-15 01:29 PM
Hi all, my first post here, being new to STM32..
I have an STM32F439ZI Nucleo for which I have ADC1 nicely capturing data with TIM2 defining the sample rate and circular DMA.
This was working well until I regenerated the code using the option to initialize peripherals using separate file pairs for each peripheral. I realise that switching to that option doesn't handle migration of all User code as it should, that's OK, I could easily copy over the relevant code.
However, the new version is still broken: the ADC conversion complete callback it firing at the expected rate, but all ADC data are zero. When I switch back to code generation not using separate initialization files, the everything starts working again.
My application is also using DMA to drive an LCD, which is working OK, so DMA clearly isn't fundamentally broken.
I've carefully checked each of the init functions that are moved into the newly created files (dma.c/h, adc.c/h, tim.c/h etc), and I can't see anything that's changed, nor can I see an obvious change in the order in which the various initializations are done.
I must have overlooked something, but wonder whether anyone can suggest a more subtle root cause?
Searching these forums I saw that several people have reported similar issues on various other platforms in recent years, but none of those seem to match the issue I'm seeing.
Thanks in advance for any suggestions.