KV11z- DAC with LPTMR

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

KV11z- DAC with LPTMR

跳至解决方案
1,423 次查看
CMooN
Contributor I

Hi,

I am trying to built a interrupt timer for dac_basic.c . For this purpose, I want to use the logic of lptmr.c and  control voltage produced by DAC. Can someone help me for this ? 

0 项奖励
回复
1 解答
1,396 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @CMooN,

If your goal is to increase the DAC value in each interrupt, inside the handler you will need to implement a function or flag to check so you increase the value each time an interrupt is taken place.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,410 次查看
CMooN
Contributor I

Hi @Julián_AragónM ,

Thanks for your answer. I have merged lptmr and dac functionalities together. My purpose is to increase dacValue from 0 to 4095 in 3 seconds. What should I do in the function called 'LPTMR_LED_HANDLER' ?

0 项奖励
回复
1,397 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @CMooN,

If your goal is to increase the DAC value in each interrupt, inside the handler you will need to implement a function or flag to check so you increase the value each time an interrupt is taken place.

0 项奖励
回复
1,381 次查看
CMooN
Contributor I

Hi,

Can you please help me about how to init GPIO and to toggle it?

I want to init PTE16 and toggle it i LPTMR.

标记 (1)
0 项奖励
回复
1,377 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @CMooN,

In the SDK examples, you can find a project with GPIO initialization and toggle function under "driver_examples" -> "gpio" -> "gpio_input_interrupt".

I hope you find this useful!

Best regards, Julián

0 项奖励
回复
1,416 次查看
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @CMooN,

The timer handler is used in the SDK example you mention, which will prove useful for your application. You will need to merge these projects to use lptmr and dac functionalities together.

I hope you find this useful! Best regards, Julian

0 项奖励
回复