Skip to main content
Sprak.11
Associate II
May 30, 2020
Question

how to use Scanf in Keil uVision5 for STM32F103C8T6

  • May 30, 2020
  • 1 reply
  • 938 views

I want to use scanf function for usart with dma please help me for that.

I need to receive a string through scanf but the string size will differ each time .

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
May 30, 2020

You'd need to implement retargeting routines to perform the getch() type functionality.

You'd still have to do all the buffering and ownership of the USART+DMA, and it might be more efficient for you to parse the stream and use sscanf(), strtok(), atoi(), atod(), etc.

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