S32K142 FTM PWM generation - GPIO use

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K142 FTM PWM generation - GPIO use

ソリューションへジャンプ
1,847件の閲覧回数
andyknitt
Contributor II

I am using the FTM PWM block to generate a complementary PWM signal on pins PTC6 and PTC7 with an S32K142.  This is working.  However, I'm seeing the same complementary PWM signal on other pins that I don't want to use for PWM (PTD3/PTD2 and PTE6/PTE2).  I want to use these other pins as normal GPIO.  What am I doing incorrectly in my FTM/PWM configuration that is allowing the PWM signals to show up on these other pins?

andyknitt_0-1645462737756.png

andyknitt_1-1645462760493.png   andyknitt_2-1645462775820.png

 

 

 

0 件の賞賛
1 解決策
1,785件の閲覧回数
adriantudor
NXP Employee
NXP Employee

Hello @andyknitt ,

I tested your model example with those two pins modified (PTB10 and PTB11) as I told you because I use an EVB. I didn't see any PWM signal on PTD3/PTD2 and PTE6/PTE2 (I used an oscilloscope to get the PWM).

adriantudor_1-1645548763634.png

 

If the MCU package used in your custom board is 64lqfp, then, as you can see in this picture the PTC6/PTC7 are near PTE2/PTE6 and not so far from PTD2/PTD3.

It is possible that you have some hardware issues (electrical coupled signals). In this case, the parasitic signal should be smaller than the original one and maybe rounded on the edges (it depends on the signal frequency and the type of the coupled type, and the impedances of the lines). 

As a solution, if the parasitic signal is appeared due to a coupled electrical effect, you can try to connect a resistor on each pin that has a PWM signal that shouldn't be there(you can try with 10Kohm between GPIO pin and GND). This resistor should be enough to "consume" the parasitic signal. If this resistor affects the signal that you connect to the same GPIO pin, then you can try to adjust it. Anyway, try to not reduce the value of the resistor too much. If you increase the value of the resistor (higher than 10Kohm is not a problem as long as the parasitic signal has disappeared).

If that solves your problem, then a redesign of the PCB layout and maybe a schematic can fix the "ghost" PWM signal without using any additional resistors.

Please let me know if that works for you.

 

Best regards,
Adrian

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
1,801件の閲覧回数
andyknitt
Contributor II

Thanks Adrian.  This is not with the EVB.  The design uses these pins purely as outputs, and those outputs seem to be working correctly.  What I'm not understanding is why I appear to be seeing the same PWM signal(s) on other pins.  Do you have any other suggestions?

Andy

0 件の賞賛
1,786件の閲覧回数
adriantudor
NXP Employee
NXP Employee

Hello @andyknitt ,

I tested your model example with those two pins modified (PTB10 and PTB11) as I told you because I use an EVB. I didn't see any PWM signal on PTD3/PTD2 and PTE6/PTE2 (I used an oscilloscope to get the PWM).

adriantudor_1-1645548763634.png

 

If the MCU package used in your custom board is 64lqfp, then, as you can see in this picture the PTC6/PTC7 are near PTE2/PTE6 and not so far from PTD2/PTD3.

It is possible that you have some hardware issues (electrical coupled signals). In this case, the parasitic signal should be smaller than the original one and maybe rounded on the edges (it depends on the signal frequency and the type of the coupled type, and the impedances of the lines). 

As a solution, if the parasitic signal is appeared due to a coupled electrical effect, you can try to connect a resistor on each pin that has a PWM signal that shouldn't be there(you can try with 10Kohm between GPIO pin and GND). This resistor should be enough to "consume" the parasitic signal. If this resistor affects the signal that you connect to the same GPIO pin, then you can try to adjust it. Anyway, try to not reduce the value of the resistor too much. If you increase the value of the resistor (higher than 10Kohm is not a problem as long as the parasitic signal has disappeared).

If that solves your problem, then a redesign of the PCB layout and maybe a schematic can fix the "ghost" PWM signal without using any additional resistors.

Please let me know if that works for you.

 

Best regards,
Adrian

0 件の賞賛
1,767件の閲覧回数
andyknitt
Contributor II

Thank you Adrian.  It turns out it was a signal coupling issue, though actually downstream a bit further in the circuitry than at the micro I/O.  Your confirmation that the software was correctly configured was extremely helpful.

Thanks again,

 

Andy

0 件の賞賛
1,816件の閲覧回数
adriantudor
NXP Employee
NXP Employee

Hello @andyknitt

If you are using the S32K142EVB, those two pins (PTC6 and PTC7) are used by OpenSDA thru UART to communicate with the S32K142. Because of that, it is possible that if you use those pins as outputs, to encounter some issues. Can you use PTB10 and PTB11 instead of PTC6 and PTC7? If you must use those two pins that are already used by OpenSDA UART, then please remove R161 and R162 resistors (if you do that, the UART1 will not work anymore with OpenSDA). 

Let me know if the problem still persists.

 

Best regards,

Adrian

 

0 件の賞賛