EmbDev.net

Forum: µC & Digital Electronics STM32F1xx: Injected simultanous ADC doesn't work


von hochsitzcola (Guest)


Rate this post
useful
not useful
I want to read in two phase currents of a BLDC motor, simultanous with 
injected ADC1 and ADC2 triggered by Timer1 Capture Compare Channel 4. 
See chapter 5.1 of the STM manual UM1052:
https://www.st.com/content/ccc/resource/technical/document/user_manual/5e/5e/d2/cb/07/35/45/a6/CD00298474.pdf/files/CD00298474.pdf/jcr:content/translations/en.CD00298474.pdf

The interrupt of Timer1 Capture Compare Channel 4 works properly, but no 
injected ADC conversion is started :-(

If I start the conversion by software in the Timer1 Capture Compare 
Channel 4 callback, it works.

here are two screenshots of the relevant registers at runtime.
http://www.stm32duino.com/download/file.php?id=3190&sid=68aec5aeb5f8c2092a3f0dfd85a63b81

http://www.stm32duino.com/download/file.php?id=3190&sid=68aec5aeb5f8c2092a3f0dfd85a63b81

Any idea what's going wrong?

you can find the project at github.
https://github.com/stancecoke/LishuiFOC
(earlier commit, the recent commit is with the workaround via Tim1CC4 
interrupt.
we can discuss the problem on register level....


I've asked this question at several forums already, but no help so 
far...

regards
hochsitzcola

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.