Second FTM Dual Edge Capture --> Error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Second FTM Dual Edge Capture --> Error

跳至解决方案
1,654 次查看
felix_boeckmann
Contributor II

Hello,

i want to read two PWM Signals with known frequency. So I use 2 "FTM Dual Edge Capture" Blocks, with following parameters:

Capture mode:       continuous

Measurement:       positive Pulse (rising-falling)

prescale factor:      32

first Block:

Module:            0

Channel pair:    2-3

FTM input pin: PTC2

second block:

Module:            1

Channel pair:    2-3

FTM input pin:   PTA15

When I want to compile it, I get an error: 

pastedImage_1.png

When I comment one out, it works, for both. But when I want to use both together I get that Error.

Can help anyone to find the problem?

Thank you.

Felix

1 解答
1,445 次查看
mariuslucianand
NXP Employee
NXP Employee

Hi felix.boeckmann@zf.com‌,

I think it was "Really great" if I was careful enough to provide the full patch. Sorry, my bad! :smileygrin:

Anyway, please also update at the same location "src\mbdtbx_s32k\blocks\ftm" the attached file ftm_s32k_common_input.tlc.

It was not working now because the clock for the FTM module 1 was not initialized, the generated code now was only initializing the clock for the FTM0 module used. 

I tested the fix using the attached example, but I did not change the description, so you need to connect the PWM2 outputs PTD10 and PTD11 to PTC2 and PTA15.

Hope this helps,

Marius

在原帖中查看解决方案

0 项奖励
4 回复数
1,443 次查看
felix_boeckmann
Contributor II

Hi Marius-Iucian Andrei,

Thank you for your fast help. Really great.

I tried it out, now he generate. But the application on the board doesn't start. I have a blinky LED to see if its running, but now its just on. When i comment one FTM block out, the board works (and my LED blinks). 

Do you have any further idea?

0 项奖励
1,446 次查看
mariuslucianand
NXP Employee
NXP Employee

Hi felix.boeckmann@zf.com‌,

I think it was "Really great" if I was careful enough to provide the full patch. Sorry, my bad! :smileygrin:

Anyway, please also update at the same location "src\mbdtbx_s32k\blocks\ftm" the attached file ftm_s32k_common_input.tlc.

It was not working now because the clock for the FTM module 1 was not initialized, the generated code now was only initializing the clock for the FTM0 module used. 

I tested the fix using the attached example, but I did not change the description, so you need to connect the PWM2 outputs PTD10 and PTD11 to PTC2 and PTA15.

Hope this helps,

Marius

0 项奖励
1,444 次查看
felix_boeckmann
Contributor II

Hi Marius-Iucian Andrei,

You are right, now it works. And now its in fact "really great" :smileyhappy:

Thank you!

Felix

1,445 次查看
mariuslucianand
NXP Employee
NXP Employee

Hi felix.boeckmann@zf.com‌,

Thank you for reporting this issue on our MBDT Community! 

I was able to replicate your error: indeed, when the code was generated, two sections were generated twice. I attached two files that must be replaced under src\mbdtbx_s32k\blocks\ftm folder path. Before that, please backup your existing files.

Please test them and confirm if this solved your problem.

Hope this helps,

Marius

0 项奖励