Blame | Last modification | View Log | Download | RSS feed
ifndef __stm8sclkinc ; avoid multiple inclusion__stm8sclkinc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - File CLK.INC *;* *;* contains SFR and Bit Definitions for STM8S CLK Controller *;* *;****************************************************************************__defclk macro BaseCLK_ICKR label Base+$00 ; Internal clock control registerREGAH bit CLK_ICKR,5 ; Regulator power off in Active-halt modeLSIRDY bit CLK_ICKR,4 ; Low speed internal oscillator readyLSIEN bit CLK_ICKR,3 ; Low speed internal RC oscillator enableFHW bit CLK_ICKR,2 ; Fast wakeup from Halt/Active-halt modesHSIRDY bit CLK_ICKR,1 ; High speed internal oscillator readyHSIEN bit CLK_ICKR,0 ; High speed internal RC oscillator enableCLK_ECKR label Base+$01 ; External clock control registerHSERDY bit CLK_ECKR,1 ; High speed external crystal oscillator readyHSEEN bit CLK_ECKR,0 ; High speed external crystal oscillator enableCLK_CMSR label Base+$03 ; Clock master status registerCKM bfield CLK_CMSR,0,8 ; Clock master status bitsCLK_SWR label Base+$04 ; Clock master switch registerSWI bfield CLK_SWR,0,8 ; Clock master selection bitsCLK_SWCR label Base+$05 ; Clock switch control registerSWIF bit CLK_SWCR,3 ; Clock switch interrupt flagSWIEN bit CLK_SWCR,2 ; Clock switch interrupt enableSWEN bit CLK_SWCR,1 ; Switch start/stopSWBSY bit CLK_SWCR,0 ; Switch busyCLK_CKDIVR label Base+$06 ; Clock divider registerHSIDIV bfield CLK_CKDIVR,3,2 ; High speed internal clock prescalerCPUDIV bfield CLK_CKDIVR,0,3 ; CPU clock prescalerCLK_PCKENR1 label Base+$07 ; Peripheral clock gating register 1PCKEN bfield CLK_PCKENR1,0,8 ; Peripheral clock enableCLK_CSSR label Base+$08 ; Clock security system registerCSSD bit CLK_CSSR,3 ; Clock security system detectionCSSDIE bit CLK_CSSR,2 ; Clock security system detection interrupt enableAUX bit CLK_CSSR,1 ; Auxiliary oscillator connected to master clockCSSEN bit CLK_CSSR,0 ; Clock security system enableCLK_CCOR label Base+$09 ; Configurable clock control registerCCOBSY bit CLK_CCOR,6 ; Configurable clock output busyCCORDY bit CLK_CCOR,5 ; Configurable clock output readyCCOSEL bfield CLK_CCOR,1,4 ; Configurable clock output selectionCCOEN bit CLK_CCOR,0 ; Configurable clock output enableCLK_PCKENR2 label Base+$0a ; Peripheral clock gating register 2PCKEN2 bfield CLK_PCKENR2,0,8 ; Peripheral clock enableCLK_HSITRIMR label Base+$0c ; HSI clock calibration trimming registerHSITRIM bfield CLK_HSITRIMR,0,4; HSI trimming valueCLK_SWIMCCR label Base+$0d ; SWIM clock control registerCLK_SWIMCLK bit CLK_SWIMCCR,0 ; SWIM clock dividerendmrestoreendif ; __stm8sclkinc