How Can I generate digital signal in program?

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

How Can I generate digital signal in program?

880 Views
miketorres
Contributor II

Could you help me with one function? I have nxp s32k144evb and I have to write function in design studio which generate digital signal about 1000hz (square signal). Do you have any tips or program which include similar function?

0 Kudos
3 Replies

863 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@miketorres

          FTM(PWM)  may meet you needs.

Senlent_6-1636340481038.png

 

          There is a route in S32 DS,ftm_pwm_s32k144,this example application showing the FTM's PWM functionality.

Usage or detail please refer to "ftm_pwm.dox" .

Senlent_0-1636339697440.png

 

How to change the project to generate 1000hz square signal.

STEP1:

Senlent_4-1636340128479.png

PTD15 is associated with FTM0 channel 0

Senlent_5-1636340191223.png

BR!

     Jim,

0 Kudos

827 Views
miketorres
Contributor II

Ok this method is good but in your example I generate 1000Hz digital signal (square signal) and I use FTM. How can I generate the same signal using only GPIO?

0 Kudos

815 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@miketorres

        please refer to "lpit_periodic_interrupt_s32k14x" ,this example meet your needs.

BR!

     Jim,

0 Kudos