Skip to main content
Visitor II
March 17, 2023
Question

Uart not working when Bootloader is present.

  • March 17, 2023
  • 3 replies
  • 1901 views

Hi,

i have a simple bootloader and a application on top. Both works fine so far. But after the implemented the bootloader my UART2 is not working anymore. so no output.

When i remove the bootloader (change linker file and system... file) UART function is back like nothing happens.

I tried to configure the uart channel in the bootloader as well, but that doesnt helpen.

any idea?

It is a STM32F103C8T6.

    This topic has been closed for replies.

    3 replies

    Graduate II
    March 17, 2023

    Very little to go on here.

    Make sure the Vector Table is set correctly for the new base address, typically SCB->VTOR in SystemInit()

    Make sure interrupts aren't disabled, or that transfer of control didn't occur in an interrupt or call-back.

    Visitor II
    March 17, 2023

    This is my lincer script for the applicaiton:

    /* Specify the memory areas */

    MEMORY

    {

    RAM (xrw)     : ORIGIN = 0x20000000, LENGTH = 20K

    FLASH (rx)     : ORIGIN = 0x8008000, LENGTH = 64K

    }

    I set the vector table offset to;

    #define VECT_TAB_OFFSET 0x00008000U /*!< Vector Table base offset field.

                                     This value must be a multiple of 0x200. */

    Graduate II
    March 17, 2023

    Ok, so what part are you using here, and how exactly are you using the UART2?

    Dump the RCC and UART2 registers

    Visitor II
    March 17, 2023

    i just want to use it for debug output. but i think i fixed it. i just configured the uart also in the bootloader. now everything seems working.

    Graduate II
    March 17, 2023

    Not that sort of how. ie what you're doing, not why you're doing it.

    Show configuration code, and code sending data to the UART.

    Show the control transfer between the boot loader and the application.

    Identify the model/family of STM32 being used.