cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent help. Need to remap signal from TIMx_CH3 to TIMx_CH1

sima2
Associate III
Posted on June 14, 2013 at 16:10

to be migrated, sourceId: 31551:697285D7-A9CA-445D-B16C-F23BF0E3B1A3

10 REPLIES 10
jj2
Associate II
Posted on June 14, 2013 at 17:40

Might ''Sir'' and ''Urgent'' together - negatively impact your quest?

Posted on June 14, 2013 at 17:53

Saying something is

http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency

to you is viewed poorly by the

http://www.catb.org/esr/faqs/smart-questions.html#urgent

.

Yes you could use the XOR, no I don't think setting them a Low GPIOs will work you'll need to bond the pins to ground.

Are you trying to route TI1F_ED, T1FP1, T1FP2? Be more specific about the problem to be solved.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sima2
Associate III
Posted on June 14, 2013 at 22:59

Hello

We are not hackers, we are professionals 🙂

I must configure timer 3 to PWM input mode to be able to calculate the PWM frequency and duty cycle of an PWM input signal. But the PCB designer routed the PWM input signal to the TIM3_CH3 pin. I think it must be routed to TIM3_CH1 or TIM3_CH2 to work. Acording to the reference manual the counter can only be synchronized by Filtered Timer Input 1 (TI1FP1) or Filtered Timer Input 2 (TI2FP2).

Posted on June 14, 2013 at 23:17

But those answering the questions are.

Yeah, I can see the sync would be an issue, but  CH1 pairs with CH2 in so much as CCR2 holds the snap shot for the opposite edge than CCR1. They are latching elements, not counters. The same thing works with the CH3/CH4 pairing with CCR3, and CCR4. I'm pretty sure CH3 could be used to measure period and duty.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sima2
Associate III
Posted on June 14, 2013 at 23:25

I found also this in the reference manual.

The PWM input mode can be used only with the TIMx_CH1/TIMx_CH2 signals due to the fact that only

 

TI1FP1 and TI2FP2 are connected to the slave mode controller.

I will try the XOR gate tomorrow. :\

Posted on June 14, 2013 at 23:34

If you can wire the pins to ground, you could jumper CH3 to CH1 too.

An BGA part would admittedly be a bit of a bugger.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sima2
Associate III
Posted on June 15, 2013 at 00:39

I digged into the reference manual again. Found this:

0690X00000604q4QAA.png

It looks like it is possible to drive the TIM3_CH1 and TIM3_CH2 pins low from within the MCU. Then I don't need to rewire all boards 🙂

Posted on June 15, 2013 at 02:13

That would work for an F1, the F2/3/4 less so, you'd didn't state which part you were using.

Input Capture is not incumbered by the issues you mentioned for the PWM Input mode.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sima2
Associate III
Posted on June 15, 2013 at 13:34

I use a STM32F103.

Now I have tested the XOR solution. It works 🙂

I set TIM3_CH1 and TIM3_CH2 low (GPIO_Mode_Out_PP).

I also tested to set TIM3_CH1high to confirm that the XOR really uses the set levels. And the duty cycla was inverted (as it should).