Question
stm32CubeMX stm32f407 discovery printf doesn't work
Posted on December 15, 2015 at 10:46
Hi all,
trying to retarget printf on stm32f407 discovery with cubemx generated code isn't working. Inside main.c i've put:/**
* @brief Retargets the C library printf function to the USART. * @param None * @retval None */ int fputc(int ch, FILE *f){ /* Place your implementation of fputc here */ /* e.g. write a character to the USART */ HAL_UART_Transmit(&huart6,(uint8_t*)&ch,1,1);// 1 tick waiting (1ms) enough for 87us/byte at 115200 return ch; }HAL_UART_Transmit
works without problem on it's own, printf doesn't output. Could anyone help please?