Support IrDA in SDK API for RT1011/RT1015 MCUs

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

Support IrDA in SDK API for RT1011/RT1015 MCUs

1,959 Views
anton_glukhov
Contributor III

Hi,

I've noticed that IrDA as part of LPUART module is not supported in SDK API(version 2.7) and there is no examples or explanation. Could you please clarify if there is a plan to add this to SDK?

I took lpuart_interrupt example for rt1015evk board, changed uart module to lpuart3, and briefly tried to connect simple Ir receiver (from arduino kit - CHQ1838) to J30 RX pin. I set IREN bit manually, but unfortunately, I can receive only 0xff bytes. It looks like a problem with baud rate and I changed the baud rate from 115200 to 38000(also tested with 38400), but the same result.

According to "Version ID Register" the MCU supports hardware IrDA decoding. So, I expect that it should work.

Please, take a look at the timing diagram from the Ir receiver. It would be good if you provide some reference examples.

Thanks!

Screenshot 2020-05-05 at 00.04.43.png

Labels (1)
0 Kudos
Reply
9 Replies

1,732 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Anton,

Hope you are doing well.

The information currently available regarding this module is described in Chapter 39 of the RT1015 RM and Chapter 40 of the RT1010 RM. This module covers data rates only between 2.4 kbits/s and 115.2 kbits/s, so there should not be a problem working with 38kbit/s as per the CHQ1838. I recommend to review these sections of the chapter for any other considerations to be made when decoding IrDA. Unfortunately, I am not familiar with the CHQ1838 device and do not know if there needs data transmitted before it is received. There are not examples of this in the SDK as generally examples are based on sensors that the evaluation board will include. At the moment there are not plans to include IR sensors to the evaluation board. 

In addition you may consider using the following application note as a reference:

Emulating IRDA with the FlexIO on RT1010 

It uses the examples form the SDK and how to modify it appropriately.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

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

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos
Reply

1,733 Views
anton_glukhov
Contributor III

Hello nxf51209,

Thank you for the response!

I have read these chapters and tried to enable IREN bit based on it. The device CHQ1838 is a simple IR receiver and it doesn't matter if I use this device or another one. They all convert NEC 38kHz protocol to TTL level. The timing diagram I attached shows the signal after this receiver. So, it's not necessary to be familiar with exactly this device, they all the same.

Based on chapters 39 and 40 I understand the IR demodulator "stretched" short pulse to some value and If I can guess (there is no example or timing diagram) it converts to certain baud rate, which I have to configure. The timing diagram shows these short/long pulses and I don't know how it converts with the demodulator. Could you please clarify it? The information in datasheets is very short and poor. To summarise it, I need to know which baud rate will be after IR demodulator? Unfortunately, there is no clear information about this in the datasheet.

Also, could you advise how can I debug it properly, more than just read from the data RX register?

Thank you for your support!

Best regards,

Anton

0 Kudos
Reply

1,733 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Anton,

Hope you are doing well.

I apologize for the delayed response. I am working with our team to confirm and clarify this aspect. I will let you know as soon as I have information. 

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

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

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos
Reply

1,733 Views
anton_glukhov
Contributor III

Hello nxf51209

Thank you! I'm looking forward to your response. This issue is still relevant.

Best regards,

Anton

0 Kudos
Reply

1,733 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Anton,

Hope you are doing well.

I've created an internal case for you and have responded through there. We can continue the support through that medium.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

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

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos
Reply

1,733 Views
anton_glukhov
Contributor III

Hello nxf51209

Thank you that you open internal case, but unfortunately the problem is still there. I explained what I changed in my code in this ticket, but after some time it was closed without any answer. Can we reopen it, because there is still an issue with IrDA? The case number: 00281242.

Please notice that I changed baud rate to the exact value that was suggested in the example. Also I set according bit (RXINV = 1) and (IREN = 1). The clock for LPUART is 80MHz. And still get corrupted data.

Best regards,

Anton

0 Kudos
Reply

1,733 Views
anton_glukhov
Contributor III

Hi nxf51209‌,

I responded to in the ticket but the status of the ticket now is "Pending Customer Reply". Is it the correct one? Can you see my reply there? The brief retelling: I would like to suggest a "remote debugging session" if it's help. I have all the necessary setup and I think it would be really quick. The main problem, as far as I understand it, it's proper clock and baud rate configuration which is not clear for the IrDA module.

Best regards,

Anton

0 Kudos
Reply

1,733 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Anton,

Yes I have received your response. I am waiting for our application team's feedback as mentioned. I will let you know through this community post and your internal case, to make sure that the information is sent properly.

Best Regards,

Sabina

0 Kudos
Reply

1,733 Views
anton_glukhov
Contributor III

Hi nxf51209‌,

I've just sent the response with many screenshots and a detailed explanation of what I did and what was my concerns. Unfortunately, this example provided from the support team didn't help because it's synthetic tests with uart loopback, I guess that the main issue is about baud rate of IR NEC format. The receiver that I use sends data in IR  NEC format and it seems that baud rate is about ~885b/s, but I'm not sure. I can expect some issues because it's not standard value for UART receiver.

Once again, if support teams need any testing with the real setup I can provide them remote debug sessions. Maybe it will move this issue a bit further and save their and my time.

Thank you for your support!

Best regards,

Anton

0 Kudos
Reply