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

How to execute code from RAM on stm32f4Discovery

Hello.
How to execute code from RAM in uVision V4.60?
I pulled BOOT0, BOOT1 to VDD.
I don't know what is the next step.

Parents
  • It's all about unfortunately in Polish. www.elektroda.pl/.../topic1541960.html
    Issues bad routing on the PCB. shielding, etc.
    Author sent a query to the ST and received a reply that the subject is known to them. FLASH is the culprit.
    A simple experiment:
    On the table next to stm32f4Discovery is FGPMMOPA6H with integrated GPS antenna. No way connected with the power turned off.
    Turn on the GPS. After a while. MiniGPS (GPS program) shows that gets fix. Number of satellites ~ 8
    Turn stm32f4Discovery drops to 4 satellites. Traci fix, power strips fall.
    If connecting systems together (only RX TX) and Stm32f4 only reads the frame. I have to wait very long to fix and although some satellites. The more am approaching it is worse
    The other processors do not have this problem. AVR can be placed on GPS and it does not matter.
    I sent a query to the ST and so far I'm waiting for an answer.
    For stm32f1 .... have been reported the same cases, even with GSM!

Reply
  • It's all about unfortunately in Polish. www.elektroda.pl/.../topic1541960.html
    Issues bad routing on the PCB. shielding, etc.
    Author sent a query to the ST and received a reply that the subject is known to them. FLASH is the culprit.
    A simple experiment:
    On the table next to stm32f4Discovery is FGPMMOPA6H with integrated GPS antenna. No way connected with the power turned off.
    Turn on the GPS. After a while. MiniGPS (GPS program) shows that gets fix. Number of satellites ~ 8
    Turn stm32f4Discovery drops to 4 satellites. Traci fix, power strips fall.
    If connecting systems together (only RX TX) and Stm32f4 only reads the frame. I have to wait very long to fix and although some satellites. The more am approaching it is worse
    The other processors do not have this problem. AVR can be placed on GPS and it does not matter.
    I sent a query to the ST and so far I'm waiting for an answer.
    For stm32f1 .... have been reported the same cases, even with GSM!

Children
  • Maybe I misunderstood the OP, but I think he is talking about scatter loading that places code in RAM. That is well documented in the linker documentation.

  • Sounds like amateur weekend then with that PCB :(

  • I don't understand this thread actually.
    But I found a link which may be helpful to the OP.
    The below link mentions some SW methods to reduce the electrical noises of STM32vldiscovery.

    www.bigmessowires.com/.../

    #include "stm32f10x.h"
    #include "STM32vldiscovery.h"
    
    GPIO_InitTypeDef GPIO_InitStructure;
    
    void Delay(__IO uint32_t nCount);
    
    int main(void)
    {
        /* Configure all unused GPIO port pins in Analog Input mode (floating input
          trigger OFF), this will reduce the power consumption and increase the device
          immunity against EMI/EMC *************************************************/
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
        RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |
        RCC_APB2Periph_GPIOE, ENABLE);
    
        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
        GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
        GPIO_Init(GPIOA, &GPIO_InitStructure);
        GPIO_Init(GPIOB, &GPIO_InitStructure);
        GPIO_Init(GPIOC, &GPIO_InitStructure);
        GPIO_Init(GPIOD, &GPIO_InitStructure);
        GPIO_Init(GPIOE, &GPIO_InitStructure);
    

    So STM32vldiscovery_LEDInit() enables the clock for port C, where the LEDs are connected, and then configures the correct pin in port C as an output. GPIO_Mode_Out_PP specifies a push-pull output, in other words a normal output that’s actively driven high and low. GPIO_Speed_50MHz controls the rise and fall times of the output signal. Selecting a faster speed will produce shorter rise and fall times, but will consume more current and generate more supply voltage swings and electrical noise.

  • I was able to run code from RAM. Everything works fine.
    Thank you all.