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:
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
已解决! 转到解答。
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
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?
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
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