HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
bootloader_config.hpp File Reference

TMC9660 bootloader configuration structures and enumerations. More...

#include <cstdint>
Include dependency graph for bootloader_config.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tmc9660::LDOConfig
 Configuration structure for on-chip LDO regulators. More...
 
struct  tmc9660::BootConfig
 Bootloader behavior configuration structure. More...
 
struct  tmc9660::UARTConfig
 UART communication configuration structure. More...
 
struct  tmc9660::RS485Config
 RS485 transceiver configuration structure. More...
 
struct  tmc9660::SPIBootConfig
 SPI interface configuration for bootloader commands. More...
 
struct  tmc9660::SPIFlashConfig
 External SPI flash memory configuration structure. More...
 
struct  tmc9660::I2CConfig
 External I2C EEPROM configuration structure. More...
 
struct  tmc9660::ClockConfig
 System clock configuration structure. More...
 
struct  tmc9660::GPIOConfig
 GPIO configuration structure for bootloader operation. More...
 
struct  tmc9660::HallConfig
 Hall encoder configuration for BLDC motor feedback. More...
 
struct  tmc9660::ABN1Config
 ABN encoder 1 configuration for incremental encoder feedback. More...
 
struct  tmc9660::ABN2Config
 ABN encoder 2 configuration for second incremental encoder. More...
 
struct  tmc9660::RefConfig
 Reference switches configuration for limit detection and homing. More...
 
struct  tmc9660::StepDirConfig
 Step/Direction interface configuration for stepper motor control. More...
 
struct  tmc9660::SPIEncConfig
 SPI encoder configuration for SPI-based position sensors. More...
 
struct  tmc9660::MechBrakeConfig
 Mechanical brake configuration for holding motor position. More...
 
struct  tmc9660::BrakeChopperConfig
 Brake chopper configuration for dynamic braking. More...
 
struct  tmc9660::MemStorageConfig
 External memory storage configuration for TMCL scripts and parameters. More...
 
struct  tmc9660::BootloaderConfig
 Complete bootloader configuration structure. More...
 

Namespaces

namespace  tmc9660
 
namespace  tmc9660::bootcfg
 Bootloader configuration namespace containing all configuration structures and enums.
 
namespace  tmc9660::bootaddr
 Bootloader configuration register addresses.
 

Enumerations

enum class  tmc9660::bootcfg::LDOVoltage : uint8_t { tmc9660::bootcfg::Disabled = 0 , tmc9660::bootcfg::V2_5 = 1 , tmc9660::bootcfg::V3_3 = 2 , tmc9660::bootcfg::V5_0 = 3 }
 Enumerations describing bootloader configuration options. More...
 
enum class  tmc9660::bootcfg::LDOSlope : uint8_t { tmc9660::bootcfg::Slope3ms = 0 , tmc9660::bootcfg::Slope1_5ms = 1 , tmc9660::bootcfg::Slope0_75ms = 2 , tmc9660::bootcfg::Slope0_37ms = 3 }
 LDO output slope control for power-up characteristics. More...
 
enum class  tmc9660::bootcfg::BootMode : uint8_t { tmc9660::bootcfg::Register = 1 , tmc9660::bootcfg::Parameter = 2 }
 Boot mode selection for motor control system startup. More...
 
enum class  tmc9660::bootcfg::UartRxPin : uint8_t { tmc9660::bootcfg::GPIO7 = 0 , tmc9660::bootcfg::GPIO1 = 1 }
 UART receive pin selection for bootloader communication. More...
 
enum class  tmc9660::bootcfg::UartTxPin : uint8_t { tmc9660::bootcfg::GPIO6 = 0 , tmc9660::bootcfg::GPIO0 = 1 }
 UART transmit pin selection for bootloader communication. More...
 
enum class  tmc9660::bootcfg::BaudRate : uint8_t {
  tmc9660::bootcfg::BR9600 = 0 , tmc9660::bootcfg::BR19200 , tmc9660::bootcfg::BR38400 , tmc9660::bootcfg::BR57600 ,
  tmc9660::bootcfg::BR115200 , tmc9660::bootcfg::BR1000000 , tmc9660::bootcfg::Auto8x , tmc9660::bootcfg::Auto16x
}
 UART baud rate configuration for bootloader communication. More...
 
enum class  tmc9660::bootcfg::RS485TxEnPin : uint8_t { tmc9660::bootcfg::None = 0 , tmc9660::bootcfg::GPIO8 = 1 , tmc9660::bootcfg::GPIO2 = 2 }
 RS485 transmit enable pin selection for half-duplex communication. More...
 
enum class  tmc9660::bootcfg::SPIInterface : uint8_t { tmc9660::bootcfg::SPI0 = 0 , tmc9660::bootcfg::SPI1 = 1 }
 SPI interface selection for bootloader and flash communication. More...
 
enum class  tmc9660::bootcfg::SPI0SckPin : uint8_t { tmc9660::bootcfg::GPIO6 = 0 , tmc9660::bootcfg::GPIO11 = 1 }
 SPI0 clock pin selection for bootloader communication. More...
 
enum class  tmc9660::bootcfg::SPIFlashFreq : uint8_t { tmc9660::bootcfg::Div1 = 0 , tmc9660::bootcfg::Div2 = 1 , tmc9660::bootcfg::Div4 = 3 }
 SPI flash frequency divider configuration. More...
 
enum class  tmc9660::bootcfg::I2CSdaPin : uint8_t { tmc9660::bootcfg::GPIO5 = 0 , tmc9660::bootcfg::GPIO11 = 1 , tmc9660::bootcfg::GPIO14 = 2 }
 I2C data pin selection for external EEPROM communication. More...
 
enum class  tmc9660::bootcfg::I2CSclPin : uint8_t { tmc9660::bootcfg::GPIO4 = 0 , tmc9660::bootcfg::GPIO12 = 1 , tmc9660::bootcfg::GPIO13 = 2 }
 I2C clock pin selection for external EEPROM communication. More...
 
enum class  tmc9660::bootcfg::I2CFreq : uint8_t { tmc9660::bootcfg::Freq100k = 0 , tmc9660::bootcfg::Freq200k , tmc9660::bootcfg::Freq400k , tmc9660::bootcfg::Freq800k }
 I2C communication frequency configuration. More...
 
enum class  tmc9660::bootcfg::ClockSource : uint8_t { tmc9660::bootcfg::Internal = 0 , tmc9660::bootcfg::External = 1 }
 System clock source selection. More...
 
enum class  tmc9660::bootcfg::ExtSourceType : uint8_t { tmc9660::bootcfg::Oscillator = 0 , tmc9660::bootcfg::Clock = 1 }
 External clock source type configuration. More...
 
enum class  tmc9660::bootcfg::XtalDrive : uint8_t { tmc9660::bootcfg::Freq8MHz = 1 , tmc9660::bootcfg::Freq16MHz = 3 , tmc9660::bootcfg::Freq24MHz = 5 , tmc9660::bootcfg::Freq32MHz = 6 }
 Crystal drive strength configuration for external oscillators. More...
 
enum class  tmc9660::bootcfg::SysClkSource : uint8_t { tmc9660::bootcfg::IntOsc = 0 , tmc9660::bootcfg::PLL = 1 }
 System clock source selection after initial oscillator. More...
 
enum class  tmc9660::bootcfg::SysClkDiv : uint8_t { tmc9660::bootcfg::Div1 = 0 , tmc9660::bootcfg::Div15MHz = 3 }
 System clock divider configuration. More...
 
enum class  tmc9660::bootcfg::HallUPin : uint8_t { tmc9660::bootcfg::GPIO2 = 0 , tmc9660::bootcfg::GPIO7 = 1 , tmc9660::bootcfg::GPIO9 = 2 }
 Hall encoder U-phase pin selection for BLDC motor feedback. More...
 
enum class  tmc9660::bootcfg::HallVPin : uint8_t { tmc9660::bootcfg::GPIO3 = 0 , tmc9660::bootcfg::GPIO15 = 1 }
 Hall encoder V-phase pin selection for BLDC motor feedback. More...
 
enum class  tmc9660::bootcfg::HallWPin : uint8_t { tmc9660::bootcfg::GPIO4 = 0 , tmc9660::bootcfg::GPIO8 = 1 , tmc9660::bootcfg::GPIO10 = 2 }
 Hall encoder W-phase pin selection for BLDC motor feedback. More...
 
enum class  tmc9660::bootcfg::ABN1APin : uint8_t { tmc9660::bootcfg::GPIO5 = 0 , tmc9660::bootcfg::GPIO8 = 1 , tmc9660::bootcfg::GPIO17 = 2 }
 ABN encoder 1 A-phase pin selection for incremental encoder feedback. More...
 
enum class  tmc9660::bootcfg::ABN1BPin : uint8_t { tmc9660::bootcfg::GPIO1 = 0 , tmc9660::bootcfg::GPIO13 = 1 , tmc9660::bootcfg::GPIO18 = 2 }
 ABN encoder 1 B-phase pin selection for incremental encoder feedback. More...
 
enum class  tmc9660::bootcfg::ABN1NPin : uint8_t { tmc9660::bootcfg::Disabled = 0 , tmc9660::bootcfg::GPIO14 = 1 , tmc9660::bootcfg::GPIO16 = 2 }
 ABN encoder 1 index pin selection for incremental encoder feedback. More...
 
enum class  tmc9660::bootcfg::ABN2APin : uint8_t { tmc9660::bootcfg::GPIO6 = 0 , tmc9660::bootcfg::GPIO15 = 1 }
 ABN encoder 2 A-phase pin selection for second incremental encoder. More...
 
enum class  tmc9660::bootcfg::ABN2BPin : uint8_t { tmc9660::bootcfg::GPIO7 = 0 , tmc9660::bootcfg::GPIO11 = 1 , tmc9660::bootcfg::GPIO16 = 2 }
 ABN encoder 2 B-phase pin selection for second incremental encoder. More...
 
enum class  tmc9660::bootcfg::RefLPin : uint8_t { tmc9660::bootcfg::Disabled = 0 , tmc9660::bootcfg::GPIO2 = 1 , tmc9660::bootcfg::GPIO12 = 2 , tmc9660::bootcfg::GPIO16 = 3 }
 Reference switch left pin selection for limit switch detection. More...
 
enum class  tmc9660::bootcfg::RefRPin : uint8_t { tmc9660::bootcfg::Disabled = 0 , tmc9660::bootcfg::GPIO3 = 1 , tmc9660::bootcfg::GPIO18 = 2 }
 Reference switch right pin selection for limit switch detection. More...
 
enum class  tmc9660::bootcfg::RefHPin : uint8_t {
  tmc9660::bootcfg::Disabled = 0 , tmc9660::bootcfg::GPIO4 = 1 , tmc9660::bootcfg::GPIO7 = 2 , tmc9660::bootcfg::GPIO15 = 3 ,
  tmc9660::bootcfg::GPIO17 = 4
}
 Reference switch home pin selection for home position detection. More...
 
enum class  tmc9660::bootcfg::StepPin : uint8_t { tmc9660::bootcfg::GPIO7 = 0 , tmc9660::bootcfg::GPIO11 = 1 , tmc9660::bootcfg::GPIO16 = 2 }
 Step pin selection for step/direction interface. More...
 
enum class  tmc9660::bootcfg::DirPin : uint8_t { tmc9660::bootcfg::GPIO6 = 0 , tmc9660::bootcfg::GPIO15 = 1 }
 Direction pin selection for step/direction interface. More...
 
enum class  tmc9660::bootcfg::SPIEncBlock : uint8_t { tmc9660::bootcfg::SPI0 = 0 , tmc9660::bootcfg::SPI1 = 1 }
 SPI encoder interface block selection. More...
 
enum class  tmc9660::bootcfg::SPIEncMode : uint8_t { tmc9660::bootcfg::Mode0 = 0 , tmc9660::bootcfg::Mode1 = 1 , tmc9660::bootcfg::Mode2 = 2 , tmc9660::bootcfg::Mode3 = 3 }
 SPI encoder communication mode configuration. More...
 
enum class  tmc9660::bootcfg::SPIEncFreq : uint8_t {
  tmc9660::bootcfg::Div4 = 0 , tmc9660::bootcfg::Div5 = 1 , tmc9660::bootcfg::Div6 = 2 , tmc9660::bootcfg::Div7 = 3 ,
  tmc9660::bootcfg::Div8 = 4 , tmc9660::bootcfg::Div9 = 5 , tmc9660::bootcfg::Div10 = 6 , tmc9660::bootcfg::Div11 = 7 ,
  tmc9660::bootcfg::Div12 = 8 , tmc9660::bootcfg::Div13 = 9 , tmc9660::bootcfg::Div14 = 10 , tmc9660::bootcfg::Div15 = 11 ,
  tmc9660::bootcfg::Div16 = 12 , tmc9660::bootcfg::Div17 = 13 , tmc9660::bootcfg::Div18 = 14 , tmc9660::bootcfg::Div19 = 15
}
 SPI encoder clock frequency divider configuration. More...
 
enum class  tmc9660::bootcfg::SPIEncCSPin : uint8_t {
  tmc9660::bootcfg::GPIO8 = 0 , tmc9660::bootcfg::GPIO12 = 1 , tmc9660::bootcfg::GPIO13 = 2 , tmc9660::bootcfg::GPIO16 = 3 ,
  tmc9660::bootcfg::GPIO15_SPI1 = 0
}
 SPI encoder chip select pin selection. More...
 
enum class  tmc9660::bootcfg::SPIEncCSPol : uint8_t { tmc9660::bootcfg::ActiveHigh = 0 , tmc9660::bootcfg::ActiveLow = 1 }
 SPI encoder chip select polarity configuration. More...
 
enum class  tmc9660::bootcfg::MechBrakeOutput : uint8_t { tmc9660::bootcfg::GPIO8 = 0 , tmc9660::bootcfg::GPIO10 = 1 , tmc9660::bootcfg::GPIO18 = 2 , tmc9660::bootcfg::Y2_LS = 3 }
 Mechanical brake output pin selection. More...
 
enum class  tmc9660::bootcfg::BrakeChopperOutput : uint8_t {
  tmc9660::bootcfg::GPIO0 = 0 , tmc9660::bootcfg::GPIO1 = 1 , tmc9660::bootcfg::GPIO2 = 2 , tmc9660::bootcfg::GPIO3 = 3 ,
  tmc9660::bootcfg::GPIO4 = 4 , tmc9660::bootcfg::GPIO5 = 5 , tmc9660::bootcfg::GPIO6 = 6 , tmc9660::bootcfg::GPIO7 = 7 ,
  tmc9660::bootcfg::GPIO8 = 8 , tmc9660::bootcfg::GPIO9 = 9 , tmc9660::bootcfg::GPIO10 = 10 , tmc9660::bootcfg::GPIO11 = 11 ,
  tmc9660::bootcfg::GPIO12 = 12 , tmc9660::bootcfg::GPIO13 = 13 , tmc9660::bootcfg::GPIO14 = 14 , tmc9660::bootcfg::GPIO15 = 15 ,
  tmc9660::bootcfg::GPIO16 = 16 , tmc9660::bootcfg::GPIO17 = 17 , tmc9660::bootcfg::GPIO18 = 18 , tmc9660::bootcfg::Y2_HS = 19
}
 Brake chopper output pin selection for dynamic braking. More...
 
enum class  tmc9660::bootcfg::MemStorage : uint8_t { tmc9660::bootcfg::Disabled = 0 , tmc9660::bootcfg::SPIFlash = 1 , tmc9660::bootcfg::I2CEEPROM = 2 }
 External memory storage type selection. More...
 

Variables

constexpr uint32_t tmc9660::bootaddr::BASE = 0x00020000
 Base offset of the configuration registers inside bank 5.
 
constexpr uint32_t tmc9660::bootaddr::LDO_CONFIG = BASE + 0x00
 LDO configuration register address.
 
constexpr uint32_t tmc9660::bootaddr::UART_ADDR = BASE + 0x02
 UART device/host address register.
 
constexpr uint32_t tmc9660::bootaddr::RS485_DELAY = BASE + 0x04
 RS485 TXEN delay configuration register.
 
constexpr uint32_t tmc9660::bootaddr::COMM_CONFIG = BASE + 0x06
 Communication interface selection register.
 
constexpr uint32_t tmc9660::bootaddr::BOOT_CONFIG = BASE + 0x08
 Boot configuration register.
 
constexpr uint32_t tmc9660::bootaddr::SPI_FLASH = BASE + 0x0A
 SPI flash configuration register.
 
constexpr uint32_t tmc9660::bootaddr::I2C_CONFIG = BASE + 0x0C
 I2C EEPROM configuration register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_OUT = BASE + 0x0E
 GPIO output level register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_DIR = BASE + 0x10
 GPIO direction register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_PU = BASE + 0x12
 GPIO pull-up enable register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_PD = BASE + 0x14
 GPIO pull-down enable register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_EXT = BASE + 0x16
 GPIO extended configuration register.
 
constexpr uint32_t tmc9660::bootaddr::CLOCK_CONFIG = BASE + 0x18
 Clock configuration register.
 
constexpr uint32_t tmc9660::bootaddr::HALL_CONFIG = BASE + 0x20
 Hall encoder configuration register.
 
constexpr uint32_t tmc9660::bootaddr::ABN1_CONFIG = BASE + 0x20
 ABN encoder 1 configuration register.
 
constexpr uint32_t tmc9660::bootaddr::ABN2_CONFIG = BASE + 0x22
 ABN encoder 2 configuration register.
 
constexpr uint32_t tmc9660::bootaddr::REF_CONFIG = BASE + 0x22
 Reference switches configuration register.
 
constexpr uint32_t tmc9660::bootaddr::STEPDIR_CONFIG = BASE + 0x22
 Step/Direction interface configuration register.
 
constexpr uint32_t tmc9660::bootaddr::SPI_ENC_CONFIG = BASE + 0x26
 SPI encoder configuration register.
 
constexpr uint32_t tmc9660::bootaddr::MECH_BRAKE_CONFIG = BASE + 0x24
 Mechanical brake configuration register.
 
constexpr uint32_t tmc9660::bootaddr::BRAKECHOPPER_CONFIG = BASE + 0x24
 Brake chopper configuration register.
 
constexpr uint32_t tmc9660::bootaddr::MEM_STORAGE_CONFIG = BASE + 0x28
 External memory storage selection register.
 

Detailed Description

TMC9660 bootloader configuration structures and enumerations.