STM32 Resets the com port problem
Posted: Mon Apr 06, 2020 3:19 pm
While trying to port and run my old Maple program using Arduino IDE and STM32_Smart board, I noticed one significant difference between the Arduino Atmel (AVR) and the STM32 board: While on Arduino the reset command resets the program only, the STM32_Smart resets also the COM port.
This becomes an issue because the program resets and starts running long before the port resets, and in addition the port resets to close position.
Any serial port action in the Setup will be ignored, and the port has to be reopened manually.
Using a While to wait for the port is of no use: The port is closed, and the program can not open it.
I am not sure if this is due to the nature of the STM32 or the bootloader program or the specific board. I do not recall if I had the same problem with the Maple (STM32)
I find two crucial problems with this phenomenon:
1. I have some startup messages and commands to be sent to the host in the Setup in the case of a reset - they are not uploaded.
2. My program sends unattended continuous real-time data to a host. As the port resets to the close position, no data is being sent out after reset.
Does anyone know of a way to inhibit the com port from being reset?
Thx
This becomes an issue because the program resets and starts running long before the port resets, and in addition the port resets to close position.
Any serial port action in the Setup will be ignored, and the port has to be reopened manually.
Using a While to wait for the port is of no use: The port is closed, and the program can not open it.
I am not sure if this is due to the nature of the STM32 or the bootloader program or the specific board. I do not recall if I had the same problem with the Maple (STM32)
I find two crucial problems with this phenomenon:
1. I have some startup messages and commands to be sent to the host in the Setup in the case of a reset - they are not uploaded.
2. My program sends unattended continuous real-time data to a host. As the port resets to the close position, no data is being sent out after reset.
Does anyone know of a way to inhibit the com port from being reset?
Thx