cancel
Showing results for 
Search instead for 
Did you mean: 

Question about HAL_UART_Transmit?

antonius
Senior
Posted on February 04, 2016 at 14:56

Guys,

How can I print fr to UART ?

 fr = f_open(&MyFile, ''STM32.TXT'', FA_CREATE_ALWAYS | FA_WRITE);

HAL_UART_Transmit(&huart1, fr, 32, 1); // Debug

I got this error :

..\Src\main.c(85): error:  #167: argument of type ''FRESULT'' is incompatible with parameter of type ''uint8_t *

Thanks
1 REPLY 1
Nesrine M_O
Lead II
Posted on February 05, 2016 at 09:20

Hi h.rick,

I'd highly recommend you to take a look to the UART project under STM32Cube F4 package for example: 

STM32Cube_FW_F4_V1.10.0\Projects\STM324x9I_EVAL\Examples\UART\UART_Printf 

This example shows how to reroute the C library printf function to the UART.

-Syrine-