Replies: 2 comments
-
I am not sure if you can use one uart for multiple purpose. Have you ever tried logging through RTT or SWO? |
Beta Was this translation helpful? Give feedback.
-
Hi thanks for the response. I did not try to use RTT or SWO. I was afraid that took more energy when measuring the energyconsumption in lowpowermodes. Also in the PCB I am using, the SWO-pin is also used for other signals, so I expect some problems there. For now I am using two different configurations for debugging. One non lowpower-version with logging via serial over USB |
Beta Was this translation helpful? Give feedback.
-
I have a lowpower application with an stm32wb microcontroller that has 2 uarts. One is used to communicate via modbus. The other uart is used to communicate with an modem.
I don't have a spare uart. Therefore I would like to to use the uart that communicates via modbus also for the logging (console). The modbuscommunication and logging can be on different IO-pins, so the data does not get mingled.
The modbuscommunication is only active for a short period of time, during which the logging could be deactivated. So most of the time the uart could be available for the logging. But I don't find any examples of how to do this.
Is this possible, and are there examples of how to do this? Is it possible to configure something like this in the devicetree (with extra pinctrl-options)? Can there be different baudrates for the same uart via the devicetree, or should that be set via the program?
Beta Was this translation helpful? Give feedback.
All reactions