I do not see at first glance something wrong in your code... Are you sure about your connection (physical connection to connect Tx to RX (Pin 3 CN9 D2 connected to D8 pin 1 CN5) ? If yes, if you put a breakpoint into the RX callback and TX callback, ...
It looks like the link to the reception in not good. are you well handling the pin affectation for RX and TX into the stm32f4xx_hal_msp.c files as well as the correct alternate function number set ?
Hello,did you check with an oscilloscope that what you got on TX pins you have it on RX Pins on the corresponding GPIO ? Which product is targeted (package as well) and which tutorial are you running ?Best regards,Christophe
HelloIn order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'Thank you and best regards,Christophe