This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uVision 4 External RAM Configuration Problem STM32f10x

I am using a STM3210E-EVAL baord with uVision4 as my development tools.

There are project configuration Options for the Target where "Read/Write Memory Areas" can be defined. For the STM3210E-EVAL there is external RAM starting at 0x68000000. There is 512KbitX16, which is about a 1 megabyte (0x100000).

After enabling this external memory area the processor will not jump to main. Why would this not work? The "NoInit" check box is not set.

  • Hi,

    did you make sure that it not jumps to an abort?
    If peripherals are not (properly) enabled, the processor could jump to an abort handler.

    See startup.s file in project.

    .
    BR,
    /th.

  • The processor jumps to the HardFault_Handler routine. However, this is after going into "__main". I'm not exactly sure what is inside of "__main". There is a startup file in 'C:\Keil' that shows the following:

    ; Dummy SystemInit_ExtMemCtl function
    SystemInit_ExtMemCtl     PROC
                    EXPORT  SystemInit_ExtMemCtl      [WEAK]
                    BX      LR
                    ENDP
    
    ; Reset handler routine
    Reset_Handler   PROC
                    EXPORT  Reset_Handler             [WEAK]
                    IMPORT  __main
    
                    LDR     R0, = SystemInit_ExtMemCtl ; initialize external memory controller
                    BLX     R0
    
                    LDR     R1, = __initial_sp        ; restore original stack pointer
                    MSR     MSP, R1
    
                    LDR     R0, =__main
                    BX      R0
                    ENDP
    

    What is suppose to go into 'SystemInit_ExtMemCtl' assembler routine? I have a fsmc_sram.c file that performs this intialization.

    What happens inside of '__main' when you specify off-chip memory?

    Where could I find this information?