cancel
Showing results for 
Search instead for 
Did you mean: 

scanf trouble with cubemx

Sietse
Associate III
Posted on November 21, 2016 at 11:25

Hello,

trying to make scanf work on stm32f4-discovery with cubemx software and GCC.

I created the syscalls.c function _read using the HAL_UART_Receive_IT() function.

This works fine when used with the (unistd) read function, e.g. read(0, Buf, 4);

So I assume the _read function is working.

But when using scanf(''%d'', &i), or fscanf(0,''%d'',&i),  this function never returns.

I can see that the _read function is NOT called at all.

I don't see how scanf can work without calling _read at some point.

What am I doing wrong?

   Thanks in advance,

        Sietse

#stm32f4-discovery-scanf-syscalls
1 REPLY 1
slimen
Senior
Posted on December 01, 2016 at 11:43

Hi sietse,

Which version of CubeMx are you using ?

If you are using an old version, I recommend you to try the last version 4.18.0

Keep us informed about your issue.

Regards