2015-06-12 12:59 PM
The STM32F429 has three ADCs: ADC1, ADC2, and ADC3. They all have a status register, which has an EOC bit to indicate conversion complete.
There's also a common status register (ADC_CSR) shared by all three ADCs that contains copies of the status bits of all three ADCs.When I start an ADC conversion on ADC1, it completes, and I see the EOC bit set in ADC1_SR, but EOC1 does not get set in ADC_CSR.Since all three ADCs share a common interrupt, I'm using the common status register to determine which ADC caused the interrupt by checking which EOCx bit is set, but it's not working because the EOCx bits are not getting set when their corresponding EOC bit is set in the ADCx_SR registers.I checked the STM32F429 errata, but see no mention of this. Is there something I need to do to get the EOCx bits to accurately reflect the state of the EOC bits in ADCx_SR?2015-06-12 01:19 PM
How do you read it, in a debugger?
What about the other bits, e.g. STRT? JW2015-06-12 02:33 PM
2015-06-12 02:37 PM
Are you using the ADCs in multi-ADC mode, or running them independently? I believe the CSR is active only in multi mode.
Cheers, Hal2015-06-12 02:54 PM
I'm running them independently.
I read the manual petty thoroughly and didn't see anything that implied that the ADC_CSR is valid only in one of the multi modes, but then again, the documentation isn't always clear or complete.2015-06-12 05:08 PM
Look at the Single ADC and Multi ADC block diagrams in the Reference Manual. The CSR shows up only in the Multi ADC diagram. And only the multi ADC description paragraphs mention it.
CSR register description words like ''This bit is a copy of the EOC bit in the ADC3_SR register.'' strongly suggest that I am wrong. If it is set only in multi-mode, this would be a good place to say so. If ST doesn't pop in here to clarify, send them a request for a definitive explanation. Cheers, Hal2015-06-15 10:31 AM
I can see that the EOCx bits may only be active in multi-mode, but the documentation does not say that anywhere, and the STRTx bits do get set in ADC_CSR even when not in multi-mode.
2015-06-15 10:55 AM
If ST doesn't pop in here to clarify, send them a request for a definitive explanation.
I'll kick it to moderation.