TMC9660 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Attributes | List of all members
tmc9660::Config Struct 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.
 

Detailed Description

Configuration of the driver. The defaults are the chip's.

Member Data Documentation

◆ boot_timeout_ms

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).

◆ faultn_is_reset

bool tmc9660::Config::faultn_is_reset
Initial value:
{
false}

Service() treats FAULTN low outside the bootloader as a reset (A18).

◆ hardware_reset

bool tmc9660::Config::hardware_reset {false}

EnsureInitialized() pulses RSTN (needs the GpioSet hook) instead of adopting the chip.

◆ spi_reply_retries

uint8_t tmc9660::Config::spi_reply_retries
Initial value:
{
5}

Repeats of the reply-request on NOT_READY or CHECKSUM_ERROR (A5).

◆ uart_resync_us

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.


The documentation for this struct was generated from the following file: