<!--
Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use the Marlin Firmware forum at http://forums.reprap.org/list.php?415 or the Marlin Facebook Group https://www.facebook.com/groups/1049718498464482/.
Before filing an issue be sure to test the 1.1 and/or 2.0 "bugfix" branches to see whether the issue is already addressed.
-->
TMC UART seems to be broken with 2.0.X bugfix build pulled today from Marlin official repository, at least on BIGTREE_SKR_MINI env. The build compiles all right, but there is now "TMC CONNECTION ERROR" displayed on info screen once this FW image is flashed onto the board. Adittionally, M122 issues "Bad response" for all TMC drivers: Driver registers: X 0x00:00:00:00 Bad response! Y 0x00:00:00:00 Bad response! Z 0x00:00:00:00 Bad response! E 0x00:00:00:00 Bad response! Testing X connection... Error: All LOW Testing Y connection... Error: All LOW Testing Z connection... Error: All LOW Testing E connection... Error: All LOW
Same configuration, is working with image build some two weeks ago.
Download current build, replace platformio.ini, configuration.h and configuration_adv.h with those attached. Build and flash image on Bigtreetech Mini DIP board, with 4x TMC2209 in UART mode.
Expected behavior: No rerror message on screen, normal response from M122
Actual behavior: as above
platformio.zip Configuration.zip
The TMCStepper library from BTT implements the software serial library methods. This is required to comunicate with the TMC uart drivers I their boards. The HAL STM32F1 in Marlin firmware implements dummy methods for this library.
Adding -DHAVE_SW_SERIAL to build flags as stated earlier in this issue ignores the Dummy software serial library from Marlin so the build works and the TMC Connection error goes away.
Should Marlin implement the real software serial library for STM32F1 ?
PS: my test case is running SKR E3 DIP with tmc2208s