Bank mechanism for the external program SPI Flash scheme

Source: Internet
Author: User

Because there is not enough flash space inside the master to store the code. Therefore, it is necessary to use the SPI bus to plug Flash as a code storage area.

This requires a bank mechanism. Bank processing of the code, stored separately.

The closely related function code is placed in the same bank area.

The code for the entire bank is copied to the master internal RAM when the program is run, and the cache runs.

Because such a complex mechanism exists, so the code does not do a good job of bank processing, in the future program operation, often leads to a lot of strange phenomena exist.

Common commonly used public functions, to be placed in the common area, as a permanent storage.

Other functions are modular programming, when the code is connected, the bank is connected.

Each function to reduce the function to be stored in the same bank area, otherwise it will cause, in the same function, frequently switch the bank, light program inefficient, heavy program paralysis.

The size of each bank area, to the main control of the internal RAM space corresponding, remember not to exceed the size of RAM.

If the function is to use a large file, you need to be aware of where this file is stored, because it is possible to read this file in the process of generating the behavior of the bank, because DMA exists.


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.