Increase and decrease frequency by using button sw2 and sw3 in s32k144evb

cancel
Showing results for 
Search instead for 
Did you mean: 

Increase and decrease frequency by using button sw2 and sw3 in s32k144evb

Jump to solution
663 Views
miketorres
Contributor II

Hi, 

I try write a program in design studio which generate digital signal about 1000HZ frequency (square signal) using pin with function gpio. Next I have to read this signal by using ftm. And finally I have to enable change frequency by using sw2 and sw3 buttons by 100HZ ( for example: If I once pushed sw2 button frequency should be 1100 HZ and so on. This button should enable increase and decrease frequency.) Could you help and correct my mistake? I don't know what is wrong with this code. I will be very grateful.

Regards 

0 Kudos
1 Solution
637 Views
Senlent
NXP Employee
NXP Employee

Hi@miketorres

Sorry for the late reply.       

I wrote a example code for you, and it works fine on my side.  

Your code will never jump into "for(;;)" loop, cause "while()" loop never end, that's the problem.

BR!

      Jim,

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

1 Reply
638 Views
Senlent
NXP Employee
NXP Employee

Hi@miketorres

Sorry for the late reply.       

I wrote a example code for you, and it works fine on my side.  

Your code will never jump into "for(;;)" loop, cause "while()" loop never end, that's the problem.

BR!

      Jim,

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------