2023-03-17 06:28 AM
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.
2023-03-17 06:34 AM
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.
2023-03-17 06:39 AM
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. */
2023-03-17 07:15 AM
Ok, so what part are you using here, and how exactly are you using the UART2?
Dump the RCC and UART2 registers
2023-03-17 07:24 AM
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.
2023-03-17 07:46 AM
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.