3 wire fan speed control

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

3 wire fan speed control

Jump to solution
1,452 Views
DavidChang0
Contributor I

I have a +12V DC Fan and want to control speed. I can capture tacho signal form the fan only once and can also generate pwm to drive the Fan and also update the duty cycle of pwm hence the fan speed chganed. This is with the example code from sdk qtmr_inputcapture_outputpwm_dma of evbkimxrt1050.

But i want monitor the tacho signal always not once. When my pwm duty cycle updated the tacho signal period also chnages. i need updated period of tacho signal after updated pwm duty cycle.

How can i do this? Please help.

 

0 Kudos
1 Solution
1,436 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @DavidChang0 ,

The example only shows how the capture mode work. When get a value, it stop DMA and do not read new value anymore. If you want to use it to capture continuously, you should always clear and checek the SCTRL[IEF] flag. When it is set, read out the capture value and minus previous value. The result is current period.

 

Regards,

Jing

View solution in original post

0 Kudos
3 Replies
1,437 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @DavidChang0 ,

The example only shows how the capture mode work. When get a value, it stop DMA and do not read new value anymore. If you want to use it to capture continuously, you should always clear and checek the SCTRL[IEF] flag. When it is set, read out the capture value and minus previous value. The result is current period.

 

Regards,

Jing

0 Kudos
1,387 Views
DavidChang0
Contributor I

Hello Jing,

Could you please help by providing the code? I have tried , but i was not successful. Please help me.

Thanks in advance.

Regard's

David

0 Kudos
1,420 Views
DavidChang0
Contributor I

Hello Jing,

Thank you so much for your nice description. As i am new to this board and coding, could you please help me with coding what you have said. I have tried in different ways, but i was not successful. Could you please upload the coding portion what you described. 

I will be greatful to you. Thanks in advance.

Regard's

David

0 Kudos