/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / ADC1 trigger by timer 4

Username:     
Password:     
             

Forum

# 1   2011-03-25 04:22:36 ADC1 trigger by timer 4

Alex1985
New member
Registered: 2011-03-25
Posts: 1

ADC1 trigger by timer 4

Hello!

I want start ADC conversion by timer4 CC_4 event and then read ADC data from ADC1->DR register.  My problem allready has been discussed here: ADC external trigger?

I do all according to the reccomendation, ADC conversion start after TIM4_CNT and TIM4_CCR4 coincidence. ADC conversion does not stop and data register constantly updated, but i need only one conversion.

How can I solve this problem?

http://img132.imageshack.us/img132/5417/25194983.png

Offline

 

# 2   2011-03-25 07:53:46 ADC1 trigger by timer 4

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: ADC1 trigger by timer 4

Hi Alex,

I don't know if the problem is there, but I think that DUALMOD has to be configured in "Independant mode", and DISCEN should be "Enable".
For my information, from which software did you get these screenshots ?

Yves

Offline

 

# 3   2011-03-25 09:30:38 ADC1 trigger by timer 4

pascal697
Member
Registered: 2011-03-23
Posts: 16

Re: ADC1 trigger by timer 4

Hello,
I had the same problem last week. In order to track the ADC sampling accurately, I wrote a kind of spying software that waits on ADC status register STRT (Regular channel Start flag), toggles a debug IO, waits for EOC (End of conversion flag) and toggles back the debug IO because I assumed that the ADC status register was still updated no matter what kind of mode it was running in. Can anyone confirm this fact ?

As some other contributors here, I could not find any combination of registers to perform this task (which is mandatory in the application I am working on).

As for now, I am tackling other issues but I will have to go back to this topic.

If you have any comment, please do.

Offline

 

Board footer