Could be this check failing in the code to jump to application /* Test if user code is programmed starting from APP_ADD address */ if(((*(__IO uint32_t*)APP_ADD) & 0x2FFE0000 ) == 0x20000000)RAM setting is 128KB (0x20000), so sp = 0x2002000...
Check if you are using HAL_UART_Transmit() in polling and HAL_UART_Receive_IT() in inteerupt mode. Use bot Tx and Rx in Interrupt mode. Older ST Driver has shared variables between Tx and Rx.