cancel
Showing results for 
Search instead for 
Did you mean: 

Uart not working when Bootloader is present.

Maximilian Pohl
Associate II

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.

5 REPLIES 5

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Maximilian Pohl
Associate II

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. */

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

Dump the RCC and UART2 registers

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Maximilian Pohl
Associate II

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.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..