stm learning record

^^^^MCU basic^^^^^^

    ____memory

STM memory is quite eccentic, compared to renesas.(take STM8S105K6 for example.)

RAM:     0X0000 - 0X07FF(2k byte)

EEPROM:   0x4000 - 0x43FF (1k btye// 1024)

register:    0x5000 - 0x5800

ROM: 

32 interrupt vectors:      0X8000 - 0X807F(128/4)  

flash program memory:   0x8080 - 0XFFFF

//RAM ,start from 0x0000,and register address is placed at 0x5000

//interrupt vector start at the beginning of ROM 0x8000, which is also the start address of ROM in renesas, but different interrupt vectors position. 

//STM8S105K6  is a simple/small mcu, so only 1k bytes is involved as EEPROM.

    ______clock.

stm8s involve 4 types of clock, HSI(high speed internal 16M), lSI(38K ), HSE(0-16MHz) , LSI(32768 ).HSI is the default one at power on.  two ways to convert the clock way from HSI to HSE,automatic way and manual way.  __ no PPL倍频器,__employ reducing consuming through stop external clock.__clock can be output through configure register CCO.

    ______I/O port

__&!!!output must be configure as Push-pull mode.

    ______timer.

__&!!!! certain 16bits  Register specified to be handled in the way that,

high byte is written first, after that, deal with the low byte;

but for reading, 16bits can be read together in 2 bytes way.

 

^^^^STVD application^^^^^

1.Stm build workspace , it can not include the mcu file itself,though the mcu is selected during the building process.Add it manually.

    _____debug

1.can not watch variables real-time.//trace function can not be used(the tool version too simple to include that?)

2,add variables into watch through 2 ways: ~drag directly ;~edit->quick watch

 

 

 

原文地址:https://www.cnblogs.com/aprilapril/p/2368992.html