2012-12-24 03:41 AM
Can I sample dedicate 1 channel without the need to put it in the scan list as the first and write Number of ch to scan 1?
As I see it it is impossible.Regardsbar. #stm32f207-adc-1-ch-sample2012-12-24 08:51 AM
Tough to answer without knowing what state the ADC peripheral registers are in before the sample. For the reset state, see 10.13.2 and 10.13.3 of the F2 Reference manual, then change what you need for the sample.
Cheers, Hal2012-12-25 05:02 AM
Thanks Cheers.
The state before was scan at regular mode 8 ch. Then I need to sample a new channel (which wasn't at the scan) 1 time. As I see it now I need to write this new channel as the first one in the sequence reg. and write sample 1 ch. only. After that I need to set back the sequence reg for the previews condition (in scan mode )and write back the number of channels to scan. This is look a little bit over head. I look for a command that let me sample 1 ch. written imminently. Is there any setup for that?RegardsBar.2012-12-25 06:51 AM
Can you use injected channel?
2012-12-25 11:47 PM
But even so . Some of the features are common to both (regulare and inject). Like Scan , Continues. SO even if I use teh inject channel I have so set the scan, cont and set back at the end.
Is there anther method just to make 1 setting for regulate with scan enable and 1 for inject no scan and each one trigger at its time without need to change setting every time I move between them?Bar.2012-12-26 02:51 AM
I thought it works like you need but I haven't used it yet so I'm not sure.
Quote from ref. manual:Triggered injection
To use triggered injection, the JAUTO bit must be cleared in the ADC_CR1 register.1. Start the conversion of a group of regular channels either by external trigger or by setting the SWSTART bit in the ADC_CR2 register.2. If an external injected trigger occurs or if the JSWSTART bit is set during the conversion of a regular group of channels, the current conversion is reset and the injected channel sequence switches to Scan-once mode.3. Then, the regular conversion of the regular group of channels is resumed from the last interrupted regular conversion. If a regular event occurs during an injected conversion, the injected conversion is not