UART on discovery cortex F3 to putty terminal -
/* user code begin 2 */ uint8_t a; /* user code end 2 */ /* user code begin 3 */ /* infinite loop */ while (1) { } hal_uart_receive(&huart2, &a, 1, 1); while (a== 'b') { hal_gpio_togglepin(gpioe, gpio_pin_8); hal_delay(100); } } /* user code end 3 */
used cubemx create project, changed in keil (it piece of that) code send discovery f3 cortex board.
transmitting worked function hal_uart_transmit can see on putty terminal data i've wrote (similar program).
receiving does'nt work... m trying send letter putty, nothing happens.
please help.
once received 'b' remain unchanged till character received. pin toggle every 100 ms. avoid this, before delay insert change a, a=0.
Comments
Post a Comment