About Signal Measurement Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About Signal Measurement Mode

Jump to solution
1,472 Views
sanbrother
Contributor I

Hi, Dear

I need some help about Signal Measurement Mode, a lot of thanks in advance.

I have a 3-wire fan, so far as I know, I should be able to read speed signal from the 3rd line.

And, the FTM input capture seems just meet my need, and I manged to get stable speed by running example project named 'ftm_signal_measurement_s32k144'.

But, when I choose another channel, some error hint pops up, just as marked in the image below. (It says, only even channels can be configured in Signal Measurement Mode)

According to circuit diagram design, I must use PIN29 (PTC_15)

So

1. Did I choose a wrong approach? (Should't I choose input capture?)

2. How can I solve this problem?

3. And, why there is such restriction?

A lot lot lot thanks

Catch(01-15-09-08-08).jpg

Labels (1)
0 Kudos
1 Solution
1,233 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi David,

If you select Measure input signal, the FTM is then configured for Dual Edge Capture Mode.

pastedImage_1.png

And as can see below, this mode allows to capture two edges on the (n) input using the (n) and (n+1) registers but the (n+1) input is inactive.

pastedImage_2.png

If you select Detect edge signal, you can use odd channels.

pastedImage_3.png

Regards,

Daniel

View solution in original post

3 Replies
1,234 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi David,

If you select Measure input signal, the FTM is then configured for Dual Edge Capture Mode.

pastedImage_1.png

And as can see below, this mode allows to capture two edges on the (n) input using the (n) and (n+1) registers but the (n+1) input is inactive.

pastedImage_2.png

If you select Detect edge signal, you can use odd channels.

pastedImage_3.png

Regards,

Daniel

1,233 Views
sanbrother
Contributor I

Thanks a million for fast reply and detailed explanation. I'm totally clear why there is such a 'restriction', now. Great !!!

But for my specific application, PIN29 (FTM1_CH3, odd channel) has been chosen for fan speed feedback input, I can't change circuit diagram design. For me, 'Measure input signal' mode is the most convenient way, which outputs stable frequency.

If changed to 'Detect edge signal', the output has dramatic change. I don't know why.

So, I did another try, I add a callback to keep feedback signal count, and I can get stable frequency.

static volatile uint32_t s_tachSignalCounter = 0;

void fanSpeedFeedback(void *userData)
{
        ++s_tachSignalCounter;
}

Questions:

1. Is this an orthodox approach to use 'Detect edge signal' mode?

2. Is there any simpler examples using 'Detect edge signal' mode? 

Capture_0002.jpg

0 Kudos
1,233 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi David,

I'm not sure if I understand this  "If changed to 'Detect edge signal', the output has dramatic change. I don't know why.". Could you provide some details about the behavior of your application?

I suppose that when you switch to edge detection mode you don't get the exact period of the signal. This is normal because in edge detect mode you just get the timestamp of the moment when edge was detected. To covert this into period measurement you have to subtract in callback previous timestamp from current timestamp (don't miss the case when FTM counter overflows).

We don't have other examples than the examples provided in SDK.

Best regards,

Razvan

0 Kudos