aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/tmc_uart.py
Commit message (Collapse)AuthorAgeFilesLines
* tmc: SET_TMC_FIELD VELOCITYAlex Voinea2023-03-201-1/+4
| | | | | Ability to specify `VELOCITY` as a parameter for SET_TMC_FIELD. Useful for configuring at runtime the TSTEP based fields of the driver. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
* tmc_uart: Use config.getlist() for select_pins config optionKevin O'Connor2021-08-211-6/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Increase default UART rate to 40000 on 32bit MCUsKevin O'Connor2021-07-231-2/+7
| | | | | | | | A higher UART baud rate will allow for faster transfers and may result in more stable operation in general. Increase the baud to 40000 on 32bit MCUs and leave the baud at 9000 baud for 8bit AVR MCUs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Limit to only one active uart at a time on an mcuKevin O'Connor2021-03-121-1/+18
| | | | | | | | | | | | | | The tmcuart_send command increases cpu usage on the micro-controller. Should multiple tmcuart_send commands be issued at the same time to a single AVR micro-controller, it could increase the load to the point that it introduces a failure. It could also lead to tmcuart_send transmission errors, which would cause retransmission requests, which further increase the load. Track and share mutexes so that only one tmcuart_send command can be active on a single mcu at a time. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Minor change - make the baud rate setting more clearKevin O'Connor2021-02-271-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Avoid using "async" for variables as it conflicts with Python3Kevin O'Connor2020-06-151-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Use nominal mcu frequency in baud calculationKevin O'Connor2020-03-061-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Introduce new lookup_query_command() command wrapperKevin O'Connor2020-02-201-7/+6
| | | | | | | Use new mcu.lookup_query_command() for all commands that query information from the micro-controller. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Convert queries to use new notify message ack systemKevin O'Connor2020-02-201-2/+2
| | | | | | | | | | | Convert standard queries to use the acknowledgments of the sent command to determine if the response was received or not. This also controls command retransmissions (should the response have been lost). The tmc_uart.py will continue to use the old mechanism as the tmcuart responses are not sent synchronously with the query command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Don't try to configure analog pins to -1 valueKevin O'Connor2019-10-261-3/+3
| | | | | | Commit 6f5f2a3b incorrectly altered the analog mux pin config. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Make sure to set analog mux pins after a restartKevin O'Connor2019-10-241-1/+1
| | | | | | Don't assume the analog mux pins are in a low state at startup. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Make sure address is at least 0Kevin O'Connor2019-07-311-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Add support for configuring the uart address on tmc2209 chipsKevin O'Connor2019-07-311-12/+14
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Remove references to the TMC2208 in the generic UART codeKevin O'Connor2019-07-211-6/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Hold a mutex during MCU_TMC_uart get/set_register()Kevin O'Connor2019-06-281-10/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Use print_time=None as default (not print_time=0)Kevin O'Connor2019-06-251-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc: It's not valid to schedule messages with print_time=0Kevin O'Connor2019-06-251-2/+4
| | | | | | | | A print_time of zero may translate to a negative clock on a secondary micro-controller, which would cause an internal error. Change the code to pass a real print_time or None if it is not needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Support print_time in set_register()Kevin O'Connor2019-06-211-3/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tmc_uart: Move UART code from tmc2208.py to new file tmc_uart.pyKevin O'Connor2019-06-181-0/+216
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>