IRlib on STM32?

Can someone help me port this library?
victor_pv
Posts: 945
Joined: Mon Apr 27, 2015 12:12 pm

Re: IRlib on STM32?

Postby victor_pv » Wed Jan 18, 2017 12:05 am

I was looking at that last year, and have intention to continue when i have time to dig the files and then continue with it.

I was using the ST application note linked by Andy in the previous post. That AN is for F0 and F3 chips that include an internal circuit to connect 2 timer outputs, in a way that they will provide an output with the 56Khz, 48Khz, or whatever needed for the IR receiver used in the application.
The F1 lacks that internal circuit, but nothing prevents you from using 2 timer outputs and implementing the circuit on the PCB with a couple of transistors and little more. That was my approach.

I had the code half way translated from the STM std peripheral library to mostly libmaple, but like I said that was last year and I had to put it aside for a long time, so I don't remember how close I was to getting it to work. I remember I had to order IR leds and put it aside and started working on a wav player using a timer to generate a PCM output. I got that working, and I didn't feel the IR stuff was much more complex, but then didn't have time to back to it.
It can definitely use DMA, and I planned to turn to DMA as soon as I had it working, to reduce the CPU load.

I do not think it's complicated. Anyone with a bit of experience in C and the STM32F1 timers should be able to complete it faster than me.

User avatar
GrumpyOldPizza
Posts: 166
Joined: Fri Apr 15, 2016 4:15 pm
Location: Denver, CO

Re: IRlib on STM32?

Postby GrumpyOldPizza » Wed Jan 18, 2017 10:27 pm

victor_pv wrote:I was looking at that last year, and have intention to continue when i have time to dig the files and then continue with it.

I was using the ST application note linked by Andy in the previous post. That AN is for F0 and F3 chips that include an internal circuit to connect 2 timer outputs, in a way that they will provide an output with the 56Khz, 48Khz, or whatever needed for the IR receiver used in the application.
The F1 lacks that internal circuit, but nothing prevents you from using 2 timer outputs and implementing the circuit on the PCB with a couple of transistors and little more. That was my approach.

I had the code half way translated from the STM std peripheral library to mostly libmaple, but like I said that was last year and I had to put it aside for a long time, so I don't remember how close I was to getting it to work. I remember I had to order IR leds and put it aside and started working on a wav player using a timer to generate a PCM output. I got that working, and I didn't feel the IR stuff was much more complex, but then didn't have time to back to it.
It can definitely use DMA, and I planned to turn to DMA as soon as I had it working, to reduce the CPU load.

I do not think it's complicated. Anyone with a bit of experience in C and the STM32F1 timers should be able to complete it faster than me.



Interesting note. Would one want a generic library, or something that can emit RC5 directly ?

victor_pv
Posts: 945
Joined: Mon Apr 27, 2015 12:12 pm

Re: IRlib on STM32?

Postby victor_pv » Thu Jan 19, 2017 12:11 am

GrumpyOldPizza wrote:

Interesting note. Would one want a generic library, or something that can emit RC5 directly ?


The one I was trying to adapt, base on an application note from STM, can send RC5 and SIRC. I think I was working on the SIRC version, but both were very similar as far as most functions, only a different packet length and structure.
They both used a similar function to capture and send the individual bits, but different functions to format them.

User avatar
KaraWin
Posts: 1
Joined: Sun Mar 19, 2017 9:06 pm

Re: IRlib on STM32?

Postby KaraWin » Sun Mar 19, 2017 9:09 pm

Hi
I made an adaptation for irmp reception for stm32duino.

at https://github.com/karawin/irmp-master

Tested with the blue card.


Return to “Libary request”

Who is online

Users browsing this forum: No registered users and 1 guest