Skip to main content
gsung
Associate
August 7, 2018
Question

How to show characters on a teraterm using STM32373C-EVAL board?

  • August 7, 2018
  • 3 replies
  • 997 views

I'm stuck with the problem that any words are not printed in the teraterm.

I'm using STM32373C-EVAL board and trying to print words using serial port(CN12 connector).

I added function below to use printf function,

int __io_putchar(int ch) {
	uint8_t c[1];
	c[0] = ch & 0x00FF;
	HAL_UART_Transmit(&huart2, &*c, 1, 10);
 
	return ch;
}
 
int _write(int file, char *ptr, int len) {
	int DataIdx;
	for (DataIdx = 0; DataIdx < len; DataIdx++) {
		__io_putchar(*ptr++);
	}
	return len;
}

and then I checked serial port number and baud rate etc.

But it still doesn't work.

Can you give me some advice to fix this problem? Did I miss some setting of UART or other point?

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    August 7, 2018

    int __io_putchar(int ch) {

    HAL_UART_Transmit(&huart2, (void *)&ch, 1, 10);

    return ch;

    }

    Check state of JP6

    Make sure you have the GPIO D and USART2 clocks enabled, and that PD5 and PD6 is properly configured, with the right AF selection.

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

    Yes, I already checked everything like below.

    0690X000006BrwsQAC.jpg

    0690X000006BrwxQAC.jpg

    0690X000006Brx2QAC.jpg

    Do you have any recommendation to fix this problem?

    Tesla DeLorean
    Guru
    August 9, 2018

    I'd inspect the registers in the debugger, and signals with a scope

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