EmbDev.net

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


Author: hochsitzcola (Guest)
Posted on:

Rate this post
0 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

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.