<p><br>
On Jan 18, 2013 9:19 AM, "Dr. H. Nikolaus Schaller" <<a href="mailto:hns@goldelico.com">hns@goldelico.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> Am 10.01.2013 um 09:04 schrieb Dr. H. Nikolaus Schaller:<br>
><br>
> ><br>
> > Am 10.01.2013 um 00:36 schrieb Butrus Damaskus:<br>
> >>><br>
> >>> Though I wonder a bit about IrDA - does anyone actually care about that? I<br>
> >>> would imagine that most situations that would once have used IrDA would not<br>
> >>> be using bluetooth.<br>
> >><br>
> >> I think IrDA maybe easier to use with MCU's (and doesn't interfere<br>
> >> with WiFi in 2.4GHz)...<br>
> >><br>
> >>> The OMAP3 is capable of generating CIR (Consumer IR) signals which most<br>
> >>> consumer electronics remote controls use. That might be more useful, however<br>
> >>> it needs to be wired differently.<br>
> ><br>
> > Oh, I didn't know. Figure 17-3 / 17-4 in the TRM.<br>
> ><br>
> >><br>
> >> In order to generate CIR a simple GPIO with PWM connected to a cheap<br>
> >> IR LED might<br>
> >> be sufficient...<br>
> ><br>
> > Well, it is easily possible to configure the UART3-TX line as GPIO166 and to drive<br>
> > the IrDA LED directly.<br>
><br>
> Just a better idea: what if we simply set the UART3 to 8 bit, 1 stop bit, 380 kHz clock?<br>
><br>
> Then, writing 0x00 makes a long impulse while writing 0xf0 makes a short impulse<br>
> (LSB is sent first, after a 0 start bit). I.e. 0x00 makes 9 time slots 0 and 0xf0 makes<br>
> 5 time slots 0.<br>
><br>
> Writing a sequence of bytes should then generate a 38 kHz signal.<br>
><br>
> The only issue may be the polarity which is "1" to make the LED flash but I think it<br>
> can be solved by clever chaining several bytes sent to the UART to generate almost<br>
> any pulse pattern we need.</p>
<p>I don't understand this? I though the polarity could be changed by using a pull-up.</p>
<p>Anyway, your idea sounds very interesting... but I don't know enough to comment it.<br>
> ><br>
> >><br>
> >>> The CIR signal goes out on the uart3_cts_rctx pin, where as IrDA goes out on<br>
> >>> uart3_tx_irtx - So I don't think they can use the same IrLED (???).<br>
> ><br>
> > Ok, we do not have the builtin logic for CIR on the uart3_cts_rctx. As far as I have seen<br>
> > it works by writing a byte to the UART that is shifted and generates appropriate PWM/burst<br>
> > signals. That should not be impossible to emulate in software by directly controlling a GPIO.<br>
> ><br>
> > And since RC-5 frames are neither complex nor fast (bit rate in 1 kHz range) it could work well.<br>
> ><br>
> > What I don't know immediately is if our IrDA transmitter is capable enough. It has an<br>
> > automatic pulse duration limitation to protect the LED. And, if the kernel is able to<br>
> > do the 40kHz on/off burst modulation as required (<a href="http://en.wikipedia.org/wiki/RC-5">http://en.wikipedia.org/wiki/RC-5</a>)<br>
> > without consuming too much time and blocking important interrupts.<br>
> ><br>
> > For IrDA mode the UART3 provides automatic framing, bit stuffing, CRC etc. which<br>
> > removes a lot of hassle from the driver. And it provides up to 4 MBit/s (FIR) which can't<br>
> > be achieved in GPIO mode.<br>
> ><br>
> > But it *might* be possible to use the IrDA or normal UART mode to generate 40kHz bursts<br>
> > by clever configuration...<br>
> ><br>
> > So if someone wants to experiment, please let us know.<br>
> ><br>
> > There is a test command in u-boot (systest irda) with some primitive sample code<br>
> > starting at line ~500<br>
> ><br>
> > <a href="http://projects.goldelico.com/p/gta04-uboot/source/tree/gta04/u-boot/board/goldelico/gta04/systest.c">http://projects.goldelico.com/p/gta04-uboot/source/tree/gta04/u-boot/board/goldelico/gta04/systest.c</a><br>
> ><br>
> > Finally it should also be possible to do some experimentation from user space<br>
> > (access the GPIO pinmux register and then the GPIO166 data). A digital camera<br>
> > should be able to visualize if the LED is flickering at all.<br>
><br>
><br>
> Did anyone experiment with this?<br>
><br>
> Nikolaus<br>
</p>