Skip to main content
antonius
Associate III
February 4, 2016
Question

Question about HAL_UART_Transmit?

  • February 4, 2016
  • 1 reply
  • 496 views
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
    This topic has been closed for replies.

    1 reply

    Nesrine M_O
    Associate
    February 5, 2016
    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-