The. Net Micro Framework Portingkit

Source: Internet
Author: User

In the previous article "STM3210E platform construction", we have built a STM3210 basic platform, and has been compiled, so our next step is to consider using MDK for download debugging.

Because we used the chip out of the SRAM, so we have to write a MDK script to achieve three functions, one is SRAM initialization, the second is to download the image file, the third is to set up the PC pointer.

em-stm3210e Random Disc has some Development Board test engineering, so we do not need to look at the manual, we first in the code to see if there is no harvest in the test project startup code Stm32f10x_ In the VECTOR.S, we can find the outer-chip SRAM initialization code, the details are as follows:

; FSMC Bank1 nor/sram3 is used for the stm3210e-eval, if another Bank is


; Required, then adjust the Register Addresses





; Enable FSMC Clock


LDR r0,= 0x00000114


LDR r1,= 0x40021014


STR R0,[R1]





; Enable Gpiod, Gpioe, gpiof and Gpiog clocks


LDR r0,= 0x000001e0


LDR r1,= 0x40021018


STR R0,[R1]





; SRAM Data lines, NOE and nwe configuration


; SRAM Address lines Configuration


; NOE and NWE configuration


; NE3 Configuration


; NBL0, NBL1 configuration





LDR r0,= 0x44bb44bb


LDR r1,= 0x40011400


STR R0,[R1]





LDR r0,= 0xBBBBBBBB


LDR r1,= 0x40011404


STR R0,[R1]





LDR r0,= 0xb44444bb


LDR r1,= 0x40011800


STR R0,[R1]





LDR r0,= 0xBBBBBBBB


LDR r1,= 0x40011804


STR R0,[R1]





LDR r0,= 0x44bbbbbb


LDR r1,= 0x40011c00


STR R0,[R1]





LDR r0,= 0xbbbb4444


LDR r1,= 0X40011C04


STR R0,[R1]





LDR r0,= 0x44bbbbbb


LDR r1,= 0x40012000


STR R0,[R1]





LDR r0,= 0x44444b44


LDR r1,= 0x40012004


STR R0,[R1]





; FSMC Configuration


; Enable FSMC Bank1_sram Bank





                                            ; LDR r0,= 0x00001011


                                            ; LDR r1,= 0xa0000010


                                            ; STR R0,[R1]





                                            ; LDR r0,= 0x00000200


                                            ; LDR r1,= 0xa0000014


                                            ; STR R0,[R1]





LDR r0,= 0x00001000


LDR r1,= 0xa0000010


STR R0,[R1]





LDR r0,= 0x00000200


LDR r1,= 0xa0000014


STR R0,[R1]





LDR r0,= 0x0fffffff


LDR r1,= 0xa0000114


STR R0,[R1]





LDR r0,= 0x00001001


LDR r1,= 0xa0000010


STR R0,[R1]

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.