2024-09-10 02:12 AM
Hi, I have built an RC5 IR remote transmitter that almost works on a NUCLEO-L412RB-P, with modifications to the files found in x-cube-irremote. This unfortunately does not have an STM32L4 example.
The bit I am having trouble with is the output polarity on the IR_OUT Pin, PB9. When there is no code transmission the pin is constantly high and gets pulled down to send the code. This results in the LED being on when it should be off. The code sent looks OK on a scope (except for the high idle level) and the test receiver I have decodes it correctly, but the current draw be unnecessarily high.
What sets the polarity of the output? I have experimented with CH Polarity in CUBEMX and sConfigOC.OCPolarity and sConfigOC.OCNPolarity in rc5_encode.c with no luck.
CUBEMX sets PB9 as IR_OUT when IRTIM is configured. In GPIO Settings the GPIO output level is set at n/a is that normal?
Can I pointed to some more in depth documentation on the IRTIM than: AN3174, AN4834, DM00271524. These don't mention it and if it's in the device datasheet or RM0394 Reference Manual I've missed it.
Thanks in advance, Lance.