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

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

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

跳至解决方案
1,638 次查看
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 项奖励
1 解答
1,612 次查看
Senlent
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------

在原帖中查看解决方案

1 回复
1,613 次查看
Senlent
NXP TechSupport
NXP TechSupport

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.
-------------------------------------------------------------------------------