UART printf encoding error
I recently had a problem I can't explain.
I'm working on a PIC18F27Q43, and for debug purposes I need to use UART1 and printf.
I first created a project and used MCC, did the UART setup and redirected STDIO to UART1. It works like a charm with printf that sends data to my serial terminal on the PC.
Then, I copied the MCC generated UART to use it in another project (same PIC device) that doesn't uses MCC. And surprinsingly, when I use printf like in the previous project, I receive bad encoded characters on the serial terminal. I don't know how to solve this issue, as long as the UART code and configuration is the same in both projects.
Do some of you already had the trick ?
Thank you !