AnsweredAssumed Answered

Float value print using printf using stcubeMx generated code

Question asked by HARI krishna on Jun 1, 2017
Latest reply on Jun 1, 2017 by Clive One

Hi all,

I am using stm32f030RC controller,for my application need to print the float values on the hyperterminal.Printf is working fine for text,charters & interger values.i am using stm32cubemx generated code & atollic true studio .

Here is code what i done for printf:

 

int _write(int32_t file, uint8_t *ptr, int32_t len)
{
int n;
for(n=0;n<len;n++)
HAL_UART_Transmit(&huart2,(uint8_t*)(ptr++),1,1000);
/* Implement your write code here, this is used by puts and printf for example */
return len;

}

 

after googling tried to change the build settings but it was not worked for me.

Outcomes