2024-02-14 01:01 PM - edited 2024-02-14 01:26 PM
Hello All,
I am working on a custom desing board having STM32L053C8T6. It uses IrDA setup for the communication. I have setup the MCU at 131KHz as System clock to achieve Low power consumption (currently 65uA). Now i need to communicate with the PC using IrDA setup.
I have tested the irDA setup with 2/4/16/32 MHz with baud rate 115200. its working fine. but when i select the baud rate 2400, 4800 or 9600 it does not work. As MCU running on 131Khz, so i cant achieve 115200 baud rate or i dont know.
That would be great if someone can suggest me the solution how i can :
achieve 115200 baud rate at 131KHz or use irDA at 2400 baud rate.
Thanks :)
2024-02-14 01:55 PM
> when i select the baud rate 2400, 4800 or 9600 it does not work
What have you looked at to try and debug?
Verify signal on TX pin looks good on a scope or logic analyzer. If it looks good, problem is not with the STM32.
If it doesn't look good, print out contents of USART2 registers after trying to transmit. Verify BRR register is appropriate for desired baud rate.
2024-02-15 12:32 AM
Wau, you try to achieve low power by slowing down the MCU so much? (a bit strange approach to me).
Does it work with "nominal" MCU core clock?
Is your SYSCLK also so slow and you select it for IrDA? (I would not wonder if SYSCLK is few KHz that IrDA device does not work anymore).
For low power, usually "we" use this approach:
This has the benefit, that you run the MCU in full power just for a short period of time. It can more efficient compared to run just a slower clock for MCU (see the results when you average/integrate over a longer period of time: the MCU is shorter active and long gaps of inactive compared to "a lower performance but forever").
Try make it working with "nominal" speed settings first. Afterwards think about, what to do with MCU when idle:
scale clock and voltage down when idle, have a "wakeup", scale up, rush to do the stuff to do in order to go to sleep asap. Dynamic scaling, not slowing down (all) permanently by lowering the core clocks. Dynamic power scaling is effort, tricky, but I think it can be more efficient (and reliable) compared to slow down just (all) the clocks.