Skip to main content
cbenussits
Visitor II
October 23, 2015
Question

Stm32f4 fprintf

  • October 23, 2015
  • 2 replies
  • 817 views
Posted on October 23, 2015 at 18:03

Hello, I am using STM32F407 Discovery, and would like to send data to the computer without the USART cable (I am only using USB-MiniB cable).

So to view the voltage read by the ADC (of STM32F4) I use printf function, as follows:

int fputc(int c, FILE *stream)

{ return(ITM_SendChar(c));

}

printf(...)

Since I need to read then the voltage values on the computer (by matlab), how can I access the debug serial viewer? Or how can I retarget the printf function to write data in a txt file?

I tried also to use fopen,fprintf but it is not working.

#fprintf-printf-putc-file
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    October 23, 2015
    Posted on October 23, 2015 at 18:19

    how can I access the debug serial viewer?

    Copy-n-Paste?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..