Carrier modulator transmitter on K60

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

Carrier modulator transmitter on K60

935 Views
kenrenjen
Contributor III

Hi

I seek a document or example of how to use CMT on TWRK60F120 board. I'm using uTasker as OS.

My thought about this is that it could be much more efficient to use that technology for recording and transmitting IR signals on an input pin.

I implemented a solution using flextimer, but I ran into problems again and again when recording high frequensy pulses. I thought that this would be a much more safe solution and resource-saving instead using the flextimer.

Can someone help me out how to set up the CMT?

Thanks in advance.

Kenneth 

Labels (1)
Tags (4)
0 Kudos
3 Replies

459 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Kenneth,

if I correct understand you want to use CMT as demodulator of the IR ?

This peripheral cannot be use for recording of the IR signals, because the peripheral is targeted only as output modulator.

Best regards,

Pavel

459 Views
kenrenjen
Contributor III

Hi Pavel

Thank you for the reply. You understood me correctly, i'm looking for a method for demodulating IR code.

If I go back to my solution using flextimers, I have an issue whenever input signals are more than 450 kHz and my system has an requirement of handling frequency up to 500kHz .

It uses a lot of resources with high frequency inputs, as the ISR is called very often and I'm not able to control if the interrupt is disabled, meanwhile it should have triggered a pulse. Interrupts could be disabled by another task in the system or when I change the state of my task to run. I tried to avoid that by changing the priority of the interrupt, but it doesn't seems to make any difference.


Do you have any ideas how to solve this problem in an efficient way?


Thanks again.


Kenneth

0 Kudos

459 Views
pavel_krenek
NXP Employee
NXP Employee

Hi Kenneth,

I understand your issue. My idea about the solving the issue should be: try to focus on using of DMA (direct memory access) on some peripherals for possible resources and that way eliminate number of interrupts. Try to process all possible task on the background via DMA. Also you should use the flextimer with input capture mode together with DMA and eliminate MCU time in interrupt.

That should be the possible ways.

Regards,

Pavel