日本黄色一级经典视频|伊人久久精品视频|亚洲黄色色周成人视频九九九|av免费网址黄色小短片|黄色Av无码亚洲成年人|亚洲1区2区3区无码|真人黄片免费观看|无码一级小说欧美日免费三级|日韩中文字幕91在线看|精品久久久无码中文字幕边打电话

當(dāng)前位置:首頁 > 單片機 > 單片機
[導(dǎo)讀]一、怎么看Flash大小1.1 通過型號 型號會印在MCU表面,可以通過觀察獲得,我的是STM32F103RBT6(以下分析基于這個型號),對照下圖的STM32產(chǎn)品命名,可知STM32F103RBT6的Flash是128KB。()圖1 Ordering information sch

一、怎么看Flash大小

1.1 通過型號

型號會印在MCU表面,可以通過觀察獲得,我的是STM32F103RBT6(以下分析基于這個型號),對照下圖的STM32產(chǎn)品命名,可知STM32F103RBT6的Flash是128KB。

()

圖1 Ordering information scheme

1.2 通過數(shù)據(jù)手冊(內(nèi)存映射)

也可以通過數(shù)據(jù)手冊得到Flash大小,首先根據(jù)型號從官網(wǎng)下得對應(yīng)的數(shù)據(jù)手冊Datasheet(點這里,輸入MCU型號進行檢索。STM32F103RB相關(guān)的手冊都在這:http://www.st.com/internet/mcu/product/164487.jsp),打開找到Memory map這張圖,如圖2紅框所示(圖2紅框放大即為圖3),F(xiàn)lash在內(nèi)存的映射地址0x0800 0000 ~ 0x0801 FFFF,即大小為128KB。通過該方法也可以了解到片上Flash的內(nèi)存映射。

圖2 Memory map

圖3 Memory map中的SRAM和Flash

二、塊大小

對于系統(tǒng)而言,F(xiàn)lash分為片上Flash(Embedded Flash)和外置Flash。通常說,F(xiàn)lash先分塊再分頁,擦除是按塊進行,這樣的說法應(yīng)該只是對外置Flash而言,對于片上Flash即可以按頁擦除也可以整塊擦除,英文原文如下[2]:

The Flash memory erase operation can be performed at page level or on the whole Flash area (mass-erase). The mass-erase does not affect the information blocks.

三、頁面大小

按1.2的方法下得該MCU的參考手冊,STM32F103RBT6對應(yīng)的參考手冊為RM0008 Reference manual,定位到Embedded Flash memory章節(jié)(也可以通過搜索0x0800 0000來定位)。STM32有4種Flash module organization,分別是:low-density devices(32KB,1KB/page)、medium-density devices(128KB,1KB/page)、high-density devices(512KB,2KB/page)、connectivity line devices(256KB,2KB/page)、XL-density(devices(1M,2KB/page)。從上面分析可知,STM32F103RBT6的Flash是128KB,可見是medium-density devices,如下圖所示:

圖4 Flash module organization (medium-density devices)

四、Flash相關(guān)寄存器

Flash寄存器在內(nèi)存的映射如下[1]:

圖5 Memory map中的Flash Interface

Flash各寄存器具體地址如下[2]:

圖6 Flash memory interface registers of medium-density devices

具體到各寄存器功能,位含義,得參考[3],F(xiàn)lash寄存器映射如下:

圖7 Flash register map

五、Information block

Flash中Information block在內(nèi)存映射如下[1]:

圖8 Memory map中的System memory

具體的Flash的Information block地址如下:

圖9 Information block of medium-density devices

System memory包含一段引導(dǎo)程序(當(dāng)系統(tǒng)從片上Flash啟動會用到),F(xiàn)lash出廠后就不能修改,不曉得我理解得對不對,貼出原文如下[3]:

System memory is used to boot the device in System memory boot mode. The area is reserved for use by STMicroelectronics and contains the boot loader which is used to reprogram the Flash memory using the USART1 serial interface. It is programmed by ST when the device is manufactured, and protected against spurious write/erase operations. For further details please refer to AN2606.


本站聲明: 本文章由作者或相關(guān)機構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點,本站亦不保證或承諾內(nèi)容真實性等。需要轉(zhuǎn)載請聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請及時聯(lián)系本站刪除( 郵箱:macysun@21ic.com )。
換一批
延伸閱讀
關(guān)閉