-
Notifications
You must be signed in to change notification settings - Fork 1k
SoftwareSerial hardware timer interrupt not being called? #879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @Bambofy , |
@ABOSTM STM32 freezes at the code I have done some debugging and see that it does report the error "Incorrect Pin Value" but then when its configured to the right pins it just freezes up at the declaration of the software serial object. I think there is an issue with the hardware timer and the Rx and Tx pin configuration. |
@Bambofy Also you say 1st that STM32 freezes at print, but now it freezes at Also you say it reports "Incorrect Pin Value". Did you fix this issue ? how? |
Ah, the Uno is used as a debugging tool which re-prints the messages from the STM32 to my pc. Because i cannot connect the STM32 directly via serial port since its a custom pcb. Yes it freezes at definition in this test sketch, but also freezes at println() when used in my bigger program. The "incorrect pin value" message was given when i purposely tried the wrong pin numbers but with the correct values, it freezes? |
@Bambofy The same example running on another nucleo board and of course I connect both boards with crossing wires (TX connected to RX). It would be good that you also test each part of your setup solely:
|
Hey, thanks for looking into this @ABOSTM! Attach these pins (even though this configuration is incorrect):
Then software serial to use the connection: This is the same as your setup except the TX is connected to TX and the RX to RX. On my setup this halts the stm32. With my test setup i tried using a power supply and a 3.7V 10000mAH battery, i have tested the power system and the SIM800L works fine. I can jump the Tx and Rx pins of the sim800l out to my uno and its working correctly. |
@Bambofy, On both board I used Arduino example 'SoftwareSerialExample', but as you don't have serial on STM32, you need to adapt it. For example you can send constant string from STM32 and once received on Uno, display it on serial monitor. This will test STM32 TX. On Uno use:
On STM32L452RE use:
|
@Bambofy |
Hi, i've been really busy lately but i should have a good test bench setup soon, so i will provide any info i can :) |
@Bambofy |
Describe the bug
When using the SoftwareSerial library to communicate with SIM800L, the STM32 freezes at the print function.
To Reproduce
Arduino uno running this sketch:
Steps to reproduce the behavior:
Result:
Using SoftwareSerial GSMSerial(PC5, PC4); the code freezes.
Using SoftwareSerial GSMSerial(PC4, PC5); the code freezes.
Expected behavior
Uno to print data from the GSM to the PC.
Additional context
I investigated the SoftwareSerial() library and the HardwareTimer's InterruptHandler was not being called by TIM3. (i tried TIM16 but that did not fix the issue)
The text was updated successfully, but these errors were encountered: