STM32F1xx: Injected simultanous ADC doesn't work

Guest #5703439
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

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.