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

Helper for configuring the TMC9660 bootloader registers. More...

#include "TMC9660CommInterface.hpp"
#include <cstddef>
#include <cstdint>
Include dependency graph for TMC9660Bootloader.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 of the on-chip LDO regulators. More...
 
struct  tmc9660::BootConfig
 Bootloader behaviour configuration. More...
 
struct  tmc9660::UARTConfig
 UART communication settings for the bootloader. More...
 
struct  tmc9660::RS485Config
 Optional RS485 transceiver control via the UART_TXEN pin. More...
 
struct  tmc9660::SPIBootConfig
 SPI interface used for bootloader commands. More...
 
struct  tmc9660::SPIFlashConfig
 External SPI flash configuration. More...
 
struct  tmc9660::I2CConfig
 External I2C EEPROM configuration. More...
 
struct  tmc9660::ClockConfig
 System clock selection parameters. More...
 
struct  tmc9660::GPIOConfig
 Initial state of the general purpose pins during boot. More...
 
struct  tmc9660::BootloaderConfig
 Aggregated bootloader configuration written by ::TMC9660Bootloader. More...
 
class  tmc9660::TMC9660Bootloader
 Convenience wrapper around the bootloader TMCL commands. More...
 

Namespaces

namespace  tmc9660
 
namespace  tmc9660::bootcfg
 
namespace  tmc9660::bootaddr
 

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 }
 
enum class  tmc9660::bootcfg::BootMode : uint8_t { tmc9660::bootcfg::Register = 1 , tmc9660::bootcfg::Parameter = 2 }
 
enum class  tmc9660::bootcfg::UartRxPin : uint8_t { tmc9660::bootcfg::GPIO7 = 0 , tmc9660::bootcfg::GPIO1 = 1 }
 
enum class  tmc9660::bootcfg::UartTxPin : uint8_t { tmc9660::bootcfg::GPIO6 = 0 , tmc9660::bootcfg::GPIO0 = 1 }
 
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
}
 
enum class  tmc9660::bootcfg::RS485TxEnPin : uint8_t { tmc9660::bootcfg::None = 0 , tmc9660::bootcfg::GPIO8 = 1 , tmc9660::bootcfg::GPIO2 = 2 }
 
enum class  tmc9660::bootcfg::SPIInterface : uint8_t { tmc9660::bootcfg::IFACE0 = 0 , tmc9660::bootcfg::IFACE1 = 1 }
 
enum class  tmc9660::bootcfg::SPI0SckPin : uint8_t { tmc9660::bootcfg::GPIO6 = 0 , tmc9660::bootcfg::GPIO11 = 1 }
 
enum class  tmc9660::bootcfg::SPIFlashFreq : uint8_t { tmc9660::bootcfg::Div1 = 0 , tmc9660::bootcfg::Div2 = 1 , tmc9660::bootcfg::Div4 = 3 }
 
enum class  tmc9660::bootcfg::I2CSdaPin : uint8_t { tmc9660::bootcfg::GPIO5 = 0 , tmc9660::bootcfg::GPIO11 = 1 , tmc9660::bootcfg::GPIO14 = 2 }
 
enum class  tmc9660::bootcfg::I2CSclPin : uint8_t { tmc9660::bootcfg::GPIO4 = 0 , tmc9660::bootcfg::GPIO12 = 1 , tmc9660::bootcfg::GPIO13 = 2 }
 
enum class  tmc9660::bootcfg::I2CFreq : uint8_t { tmc9660::bootcfg::Freq100k = 0 , tmc9660::bootcfg::Freq200k , tmc9660::bootcfg::Freq400k , tmc9660::bootcfg::Freq800k }
 
enum class  tmc9660::bootcfg::ClockSource : uint8_t { tmc9660::bootcfg::Internal = 0 , tmc9660::bootcfg::External = 1 }
 
enum class  tmc9660::bootcfg::ExtSourceType : uint8_t { tmc9660::bootcfg::Oscillator = 0 , tmc9660::bootcfg::Clock = 1 }
 
enum class  tmc9660::bootcfg::XtalDrive : uint8_t { tmc9660::bootcfg::Freq8MHz = 1 , tmc9660::bootcfg::Freq16MHz = 3 , tmc9660::bootcfg::Freq24MHz = 5 , tmc9660::bootcfg::Freq32MHz = 6 }
 
enum class  tmc9660::bootcfg::SysClkSource : uint8_t { tmc9660::bootcfg::IntOsc = 0 , tmc9660::bootcfg::PLL = 1 }
 
enum class  tmc9660::bootcfg::SysClkDiv : uint8_t { tmc9660::bootcfg::Div1 = 0 , tmc9660::bootcfg::Div15MHz = 3 }
 

Variables

constexpr uint32_t tmc9660::bootaddr::BASE = 0x00020000
 Base offset of the configuration registers inside bank 5.
 
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.
 
constexpr uint32_t tmc9660::bootaddr::COMM_CONFIG = BASE + 0x06
 Communication selection (UART/SPI/RS485).
 
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 register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_PD = BASE + 0x14
 GPIO pull-down register.
 
constexpr uint32_t tmc9660::bootaddr::GPIO_ANALOG = BASE + 0x16
 GPIO analog enable register.
 
constexpr uint32_t tmc9660::bootaddr::CLOCK_CONFIG = BASE + 0x18
 Clock configuration register.
 

Detailed Description

Helper for configuring the TMC9660 bootloader registers.