2015-10-26 08:18 AM
ST Community -
An application has the current design parameters for the STM32F030:
CLK: 20MHz external xtal on (PF0 & PF1) internal PLL to 40MHz. Complete.
MCO: 40MHz CLK/2 = 20MHz out on PA8 (MCO alternate function) to clock external device. Complete.
Now the major internal timer(s) / ADC preferred methodology...
Can PA2 be used in input capture compare mode to capture a rising external pulse to trigger TIM15 CH1 to count for 30uSec (needed delay), then trigger TIM3 CH? to start an 12Bit ADC conversion approximately every 2uSec for 8 samples? I plan to move ADC results into RAM without the use of the DMA. I'm not asking for the code but the feasibility to use 2 internal timers for a delay and to start an ADC conversion for a period of time.
I'm going to post this in the ARM community as well.
Thanks for anyone's input, expertise or other possible approach(s).
2015-10-26 09:11 AM
Fixed length burst of pulses, something you'd typically do with one of the Advanced Timers (TIM1/TIM8 ?), using One-Shot and Repetition Count.
Sonar / Ultrasound ?2015-10-26 11:17 AM
Same concept as sonar or ultrasound. In the application under design an echo or ring from a pulsed frequency transmission is available for a short period of time to be sampled and averaged. TIM1 is the only advanced timer available and CH1 is used in MCO mode for this device.
2015-10-26 11:49 AM
I fail to see that PA8 (MCO) precludes the use of TIM1 to internally trigger the ADC 8 times...
2015-10-26 12:27 PM
Can TIM1 Ch1 Trigger the ADC internally when PA8 is used for RCC MCO out?
2015-10-26 01:36 PM
The conflict I'm having with TIM1 CH1 is I need to use it as input capture mode, this can only be done only on PA8 which is MCO out...
2015-10-26 03:21 PM
I'm going to use TIM1 CH2 as the Input Capture Compare on PA9.
2015-10-26 03:43 PM
The RM says I can trigger the ADC with TIM1_CH4, or TIM1_TRIG (ie whatever I decide that TIM_TRGO is)
If you are using PA8 with the MCO AF configuration, I'm hard pressed to see that as being usable for TIM1_CH1 in Input Capture, as that's a different AF routing. You're direct experience with the AF Mux might be better than mine, but I don't see this working. Let's try a different tack. What are you using TIM1 for now? Does that work? My best stab at this is that you could Slave TIM1 to something that causes the 30us delay, and the TIM1 fires an 8x One-Shot pulse sequence with the desired periodicity. Not personally using Cortex-M0 (F0) parts for anything.2015-10-26 03:47 PM
I'm going to post this in the ARM community as well.
If you're cross-posting, please link to the other discussion(s)