Documentation ¶
Overview ¶
go generate GENERATED BY THE COMMAND ABOVE; DO NOT EDIT Generated at 2017-06-26 07:05:44.804214161 +0200 CEST using data from http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus.product-grid.html/SC1169.json
Index ¶
- Constants
- type ChipFamily
- type ChipFamilyGroup
- type CortexMPartNumber
- type Device
- func (d *Device) ChipID() (uint32, error)
- func (d *Device) ClockSpeed() (StlinkClockSpeed, error)
- func (d *Device) Close() error
- func (d *Device) CoreID() (uint32, error)
- func (d *Device) CoreResetHalt() error
- func (d *Device) CortexMPartNumber() (CortexMPartNumber, error)
- func (d *Device) CpuID() (uint32, error)
- func (d *Device) DevID() (ChipFamily, error)
- func (d *Device) EnterSWDMode() error
- func (d *Device) ExitDFUMode() error
- func (d *Device) FlashSize() (uint16, error)
- func (d *Device) ForceDebug() error
- func (d *Device) Halt() error
- func (d *Device) HardReset() error
- func (d *Device) Mode() (StlinkMode, error)
- func (d *Device) Name() (string, error)
- func (d *Device) Read16(addr uint32) (uint16, error)
- func (d *Device) Read32(addr uint32) (uint32, error)
- func (d *Device) Reset() error
- func (d *Device) Run() error
- func (d *Device) SetMode(mode StlinkMode) error
- func (d *Device) Status() (StlinkStatus, error)
- func (d *Device) Step() error
- func (d *Device) String() string
- func (d *Device) TargetVoltage() (float32, error)
- func (d *Device) Version() (string, error)
- func (d *Device) Write32(addr, w uint32) error
- type FlashLoader
- type Stlink
- type StlinkClockSpeed
- type StlinkMode
- type StlinkStatus
- type Target
Constants ¶
View Source
const ( StlinkClockSpeed4000 StlinkClockSpeed = 0 StlinkClockSpeed1800 = 1 StlinkClockSpeed1200 = 2 StlinkClockSpeed950 = 3 StlinkClockSpeed480 = 7 StlinkClockSpeed240 = 15 StlinkClockSpeed125 = 31 StlinkClockSpeed100 = 40 StlinkClockSpeed50 = 79 StlinkClockSpeed25 = 158 StlinkClockSpeed15 = 265 StlinkClockSpeed5 = 798 )
View Source
const ( AIRCRReg uint32 = 0xe000ed0c DHCSRReg uint32 = 0xe000edf0 DEMCRReg uint32 = 0xe000edfc AIRCRKey uint32 = 0x05fa0000 AIRCRSysResetReqBit uint32 = 0x00000004 AIRCRSysResetReq uint32 = AIRCRKey | AIRCRSysResetReqBit DHCSRKey uint32 = 0xa05f0000 DHCSRDebugEnBit uint32 = 0x00000001 DHCSRHaltBit uint32 = 0x00000002 DHCSRStepBit uint32 = 0x00000004 DHCSRStatusHaltBit uint32 = 0x00020000 DHCSRDebugDis uint32 = DHCSRKey DHCSRDebugEn uint32 = DHCSRKey | DHCSRDebugEnBit DHCSRHalt uint32 = DHCSRKey | DHCSRDebugEnBit | DHCSRHaltBit DHCSRStep uint32 = DHCSRKey | DHCSRDebugEnBit | DHCSRStepBit DEMCRRunAfterReset uint32 = 0x00000000 DEMCRHaltAfterReset uint32 = 0x00000001 )
View Source
const ( StlinkV2PID gousb.ID = 0x3748 StlinkV21PID gousb.ID = 0x374b )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChipFamily ¶
type ChipFamily uint16
const ( ChipFamilySTM32F0 ChipFamily = 0x440 ChipFamilySTM32F0Can ChipFamily = 0x448 ChipFamilySTM32F0Small ChipFamily = 0x444 ChipFamilySTM32F04 ChipFamily = 0x445 ChipFamilySTM32F09X ChipFamily = 0x442 ChipFamilySTM32F1Connectivity ChipFamily = 0x418 ChipFamilySTM32F1High ChipFamily = 0x414 ChipFamilySTM32F1Low ChipFamily = 0x412 ChipFamilySTM32F1Medium ChipFamily = 0x410 ChipFamilySTM32F1VLHigh ChipFamily = 0x428 ChipFamilySTM32F1VLMedium ChipFamily = 0x420 ChipFamilySTM32F1XL ChipFamily = 0x430 ChipFamilySTM32F2 ChipFamily = 0x411 ChipFamilySTM32F3 ChipFamily = 0x422 ChipFamilySTM32F3Small ChipFamily = 0x439 ChipFamilySTM32F303High ChipFamily = 0x446 ChipFamilySTM32F334 ChipFamily = 0x438 ChipFamilySTM32F37x ChipFamily = 0x432 ChipFamilySTM32F4 ChipFamily = 0x413 ChipFamilySTM32F4DE ChipFamily = 0x433 ChipFamilySTM32F4DSI ChipFamily = 0x434 ChipFamilySTM32F4HD ChipFamily = 0x419 ChipFamilySTM32F4LP ChipFamily = 0x423 ChipFamilySTM32F410 ChipFamily = 0x458 ChipFamilySTM32F411RE ChipFamily = 0x431 ChipFamilySTM32F412 ChipFamily = 0x441 ChipFamilySTM32F413 ChipFamily = 0x463 ChipFamilySTM32F446 ChipFamily = 0x421 ChipFamilySTM32F7 ChipFamily = 0x449 ChipFamilySTM32F7Advanced ChipFamily = 0x451 ChipFamilySTM32F7Foundation ChipFamily = 0x452 ChipFamilySTM32L0 ChipFamily = 0x417 ChipFamilySTM32L0Cat2 ChipFamily = 0x425 ChipFamilySTM32L0Cat5 ChipFamily = 0x447 ChipFamilySTM32L011 ChipFamily = 0x457 ChipFamilySTM32L1Cat2 ChipFamily = 0x429 ChipFamilySTM32L1High ChipFamily = 0x436 ChipFamilySTM32L1MediumLow ChipFamily = 0x416 ChipFamilySTM32L1MediumHigh ChipFamily = 0x427 ChipFamilySTM32L152RE ChipFamily = 0x437 ChipFamilySTM32L4 ChipFamily = 0x415 ChipFamilySTM32L434X ChipFamily = 0x435 ChipFamilySTM32L4X6 ChipFamily = 0x461 )
func (ChipFamily) Group ¶
func (cf ChipFamily) Group() ChipFamilyGroup
GroupName gets the chip family group name (e.g "stm32f0", "stm32l0" ...)
type ChipFamilyGroup ¶
type ChipFamilyGroup string
const ( ChipFamilyGroupSTM32L0 ChipFamilyGroup = "stm32l0" ChipFamilyGroupSTM32L1 ChipFamilyGroup = "stm32l1" ChipFamilyGroupSTM32L4 ChipFamilyGroup = "stm32l4" ChipFamilyGroupSTM32F0 ChipFamilyGroup = "stm32f0" ChipFamilyGroupSTM32F1 ChipFamilyGroup = "stm32f1" ChipFamilyGroupSTM32F2 ChipFamilyGroup = "stm32f2" ChipFamilyGroupSTM32F3 ChipFamilyGroup = "stm32f3" ChipFamilyGroupSTM32F4 ChipFamilyGroup = "stm32f4" ChipFamilyGroupSTM32F7 ChipFamilyGroup = "stm32f7" )
type CortexMPartNumber ¶
type CortexMPartNumber uint16
const ( CortexMPartNumberUnknown CortexMPartNumber = 0x000 CortexMPartNumberM0 CortexMPartNumber = 0xc20 CortexMPartNumberM0Plus CortexMPartNumber = 0xc60 CortexMPartNumberM1 CortexMPartNumber = 0xc21 CortexMPartNumberM3 CortexMPartNumber = 0xc23 CortexMPartNumberM4 CortexMPartNumber = 0xc24 CortexMPartNumberM7 CortexMPartNumber = 0xc27 )
func (CortexMPartNumber) String ¶
func (c CortexMPartNumber) String() string
type Device ¶
Device represents a ST-link device
func (*Device) ClockSpeed ¶
func (d *Device) ClockSpeed() (StlinkClockSpeed, error)
func (*Device) CoreResetHalt ¶
func (*Device) CortexMPartNumber ¶
func (d *Device) CortexMPartNumber() (CortexMPartNumber, error)
func (*Device) DevID ¶
func (d *Device) DevID() (ChipFamily, error)
func (*Device) EnterSWDMode ¶
func (*Device) ExitDFUMode ¶
func (*Device) ForceDebug ¶
func (*Device) Mode ¶
func (d *Device) Mode() (StlinkMode, error)
Mode reads the mode for an ST-link, see StlinkMode
func (*Device) SetMode ¶
func (d *Device) SetMode(mode StlinkMode) error
func (*Device) Status ¶
func (d *Device) Status() (StlinkStatus, error)
func (*Device) TargetVoltage ¶
type FlashLoader ¶
type Stlink ¶
type Stlink struct {
// contains filtered or unexported fields
}
Stlink context structure
func (*Stlink) OpenDevice ¶
OpenDevice opens a device by serial number. Giving serial as an empty string, OpenDevice takes the first ST-link it can find
type StlinkClockSpeed ¶
type StlinkClockSpeed uint16
type StlinkMode ¶
type StlinkMode uint8
const ( StlinkModeUnknown StlinkMode = 0xff StlinkModeDfu StlinkMode = 0x00 StlinkModeMass StlinkMode = 0x01 StlinkModeDebug StlinkMode = 0x02 )
func (StlinkMode) String ¶
func (s StlinkMode) String() string
type StlinkStatus ¶
type StlinkStatus uint8
const ( StlinkStatusUnknown StlinkStatus = 0xff StlinkStatusCoreRunning StlinkStatus = 0x80 StlinkStatusCoreHalted StlinkStatus = 0x81 )
func (StlinkStatus) String ¶
func (s StlinkStatus) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.