This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How exactly does the printf to UART work?

Hello, I migrated codes that I believed to be relevant to the UART output to a new project, namely the uart_init function and others, and it worked in main.c, which is where I put the "uart_init" function.

However, it does not work elsewhere i.e. if I use the printf function, the whole program goes into hard fault handler. Also, when I try to "go to definition" printf, I get nothing.

Why is that?

Thank you for looking into the problem.

The code: http://textuploader.com/5nqxs

The problem is that I can get correct results as long as I use printf in the main.c not anywhere else, even by reference.

Parents Reply Children
No Data
Related