|
TMC9660 Driver 0.1.0
API reference
|
Configuration of the driver. The defaults are the chip's. More...
#include <tmc9660_types.hpp>
Public Attributes | |
| Mode | mode {Mode::Parameter} |
The protocol the chip is in at EnsureInitialized(). | |
| uint8_t | device_address {1} |
| UART device address (odd: its upper 7 bits are the TMCL address). | |
| uint8_t | host_address {255} |
| Host address in bootloader UART replies. | |
| uint8_t | tmcl_host_address {2} |
| Host address in TMCL and register-mode UART replies. | |
| uint32_t | reply_timeout_us {50'000} |
How long the UART port waits for a reply. Leave PWM active in System off; without it SetParam(IDLE_MOTOR_PWM_BEHAVIOR, 0) is Refused. The stop of a port with no DRV_EN hook sets the parameter to 1 whatever this says. | |
| bool | allow_pwm_in_system_off {false} |
| See the lines above. | |
| uint32_t | uart_resync_us {150'000} |
| uint32_t | boot_timeout_ms {500} |
| uint32_t | settle_us {20'000} |
| Wait after a write that reconfigures the chip (A13). | |
| uint32_t | spi_gap_us {1'000} |
| Gap between the command and the reply-request on SPI. | |
| uint8_t | spi_reply_retries |
| Repeats of the reply-request on NOT_READY or CHECKSUM_ERROR (A5). | |
| bool | uart_canary {true} |
| Parameter mode over UART: detect an unseen reset (A7). | |
| uint8_t | canary_variable {15} |
| User variable that holds the canary. | |
| int32_t | canary_value {0x5AC3A55A} |
| The canary. | |
| bool | hardware_reset {false} |
| bool | faultn_is_reset |
Service() treats FAULTN low outside the bootloader as a reset (A18). | |
| Quirks | quirks {} |
| Readings of ambiguous documentation. | |
Configuration of the driver. The defaults are the chip's.
| uint32_t tmc9660::Config::boot_timeout_ms {500} |
Bound of every identity wait (start-up with hardware_reset, a start, Boot): each failed poll is charged 10 ms and, on UART, its reply wait, resync gap and drains (A9).
| bool tmc9660::Config::faultn_is_reset |
Service() treats FAULTN low outside the bootloader as a reset (A18).
| bool tmc9660::Config::hardware_reset {false} |
EnsureInitialized() pulses RSTN (needs the GpioSet hook) instead of adopting the chip.
| uint8_t tmc9660::Config::spi_reply_retries |
Repeats of the reply-request on NOT_READY or CHECKSUM_ERROR (A5).
| uint32_t tmc9660::Config::uart_resync_us {150'000} |
Quiet time after a failed UART exchange, before the receive bytes are drained: the chip's discard gap of about 100 ms (A6) with a 50 % margin.