[cortexm0--stm32f0308] System framework

Source: Internet
Author: User

Directory

      • Directory
      • Problem description
      • System Framework Overview
        • Masters
        • Slaves
        • Frame diagram
      • Memory overview
        • Sram
        • Flash
        • Boot configuration
          • How to configure
          • Boot category

Problem description

stm32f0308 is a CortexM0 architecture, and the System Framework section will be briefly described in detail in arm's CortexM0 related documentation.

System Framework Overview

The stm32f0308 IC internal system framework can be easily divided into 2 master and 4 slave systems. The master and slave concepts here are relative to the Busmatrix:

Masters
    • CORTEX-M0 Core AHB Bus
    • Gp-dma
Slaves
    • Internal SRAM
    • Internal Flash
    • Ahb2apb
    • AHB to Gpio ports
Frame diagram


For AHB2APB Bridge, if you want to use the peripherals that the APB bus connects to, you must call a register such as RCC_AHBENR first to enable the peripheral clock.

Memory overview

Programs, data, registers, IO ports, etc. are all uniformly mapped in the 4G address space (32bit machines generally do this, just slightly different). STM32F0308 's memory map in detail, need to look at its datasheet, the above detailed introduction.

Sram

For stm32f0308 SRAM, there are 8 K byte size, can be accessed in byte, Word, Half-word, this part of the function is to store the code after compiling the link. Data,. BSS, and the stack in the program's run will also be in this area, When the program runs, the data is continuously read or written to this SRAM.

Flash

stm32f0308 general use of its internal flash is enough, because its IC positioning is so, choose the right resources, do the right thing. 64K of user flash space.
Flash in the IC, will be called internal Flash, and sometimes ROM (ROM and flash the difference, should be in the power consumption is lower, but the function is the same as flash, power-down to save data).
STM32F0308 's internal flash is also divided into two categories, one is that 64K, used to download the user compiled links generated by the. Bin Code. Another kind is info Flash, this part actually divided two kinds, one is the option byte, this option byte is simple, is can write the data, to the IC certain function configures, here first not detailed. Info Flash is called the system memory in the stm32f0308, you can imagine, this is the memory of the IC system, put a piece of the IC in the flow of the cured code, this code is certainly not open source, can only guess the practice. For the system memory function, is as an embedded bootloader, in fact, General debug will not be used. The general usage is, with a debugger through the SWD interface to connect to the IC, and then code download debugging is easy to do, but, for the product, it is likely that the SWD interface will not be brought out, at this time only through the use of some of the serial interface, through the IC internal system The memory of the bootloader will have been debugged to complete the product. The bin code is downloaded to user flash and runs, which is the approximate process for the current more popular firmware update. For the system memory Bootloader,stm will definitely give the interface and use of demo, you can find a lot of relevant documentation, is to explain how to use its internal bootloader.

Boot configuration

What is said before through SWD Debug, called in the system programming way, and using bootloader load and start the program, should belong to the category of application programming. For boot, different scenarios may have different requirements, so the STM has 3 configurable boot modes.

How to configure

First there is a boot pin, see how the external circuit design, connect the boot pin to high level, or grounding, the IC just up will judge the boot pin level situation, thereby switching to the corresponding boot mode. In addition, there is a nBOOT1 in option byte, which can be configured with the corresponding boot mode.

Boot category

3, from the user flash boot, this should be the most common, compile links finished, download, and then reset, ran their own flash code, is this. In addition, the system memory boot, which is said above with the IC internal bootloader to boot. SRAM BOOT.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

[cortexm0--stm32f0308] System framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.