2025-05-28 3:18 AM - edited 2025-05-28 7:17 AM
Hi all.
I am using printf() in my USB-CDC VCP based stm32cubeide project, for printing the messages via USB to the serial terminal. But it prints only once in CDC_ReceiveCallBack () function and then i do not see other messages printed. In fact in while loop (in main function), i get all printf function results (all messages getting printed on serial terminal).
Moreover, I tried to use flush function - fflush(stdout) after printf() function, but the result is the same..May be i did not use it properly.?
Can anyone please help me out for this. ?
Many thanks in advance,
2025-05-30 12:44 AM - edited 2025-05-30 12:45 AM
Hi @AScha.3, thanks.
but i already said in one of my previous answer that i am getting all these printed messages from different printf() statements, only in while loop. that i do not want to print continuously. so my attempt was to do it once during the callback function execution.