cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to "Receive" data via UART on STM32f429-disco

sk12
Associate II

hello guys, 
i am using a FTDI FT232B17 for serial communicaiton with my stm32f429 board. i'm using keil uvision, and not using any libraries other than stm32f429xx.h to write the code. i am facing problems "receiving" data from the ftdi-ft232 to my STM32 board. i have successfully sent data from stm32f429 and am able to see it on tera-term/real-term etc, but i am not able to echo or receive data, any ideas where it could be wrong? i have double checked my hardware connections. while running the program when i click "send" from the Real-term, light blinks on the ft232 board but unfortunately nothing is received on stm32.

1 ACCEPTED SOLUTION

Accepted Solutions
sk12
Associate II

guys turns out, PA0 and PA1 didnt work because of being connected to the RAM and they were pulled low, i check with the oscilloscope if the signal was received on PA1, it was indeed but since it was pulled low, i used a different port, PC10 and PC11 which did work 

View solution in original post

5 REPLIES 5
AScha.3
Chief III

Hi,

>any ideas where it could be wrong?

in your program ...

or hardware: did you check with scope, data coming to F429 rx pin ?

+ Which uart ? Did you check, nothing connected on your board to the rx pin ?

If you feel a post has answered your question, please click "Accept as Solution".

i toggled the on-board LED on my code to find where i am wrong, it turns out 

unsigned char UART4_read(void) {
    // working led_tog();
/*problem*/ while (!(UART4->SR & USART_SR_RXNE)) {
//here LED toggling continuously in loop led_tog();
    //not togling led_tog();
return UART4->DR; 
}

it turns out it is stuck in 'while (!(UART4->SR & USART_SR_RXNE))' loop and not accepting any data even after me sending it through the real-term application, setting the SAME baud rate and all other parameters like stop bits etc. 
the issue got to be with the TX pin(PA0) on-board connected to RX of the ft232, either the TX Pin on ft232 is damaged or could be the wire.. are the most visible problems to me when i think about it.. what could it be?
 

Make sure to clear any pending errors on the UART, so noise, framing type errors.

The STM32F429I-DISCO likely to have very few unconflicted pins.

Provide a wiring diagram and initialization code for clocks, pins and peripheral. 

char InChar(void)
{
  while((USART_RS232->SR & USART_SR_RXNE) == 0) // Wait for Char
  {
    if (USART_RS232->SR & (USART_SR_PE | USART_SR_FE | USART_SR_NE | USART_SR_ORE)) // Check/Clear Errors
      USART_RS232->DR;
  }
  return((char)USART_RS232->DR); // Read Char
}
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

not working, the RXNE bit is the problem and i don't know why its not getting low and the while loop isn't moving forward. everything else works,as i said, i am able to send the data from the microcontroller with the same setup but not receive.

sk12
Associate II

guys turns out, PA0 and PA1 didnt work because of being connected to the RAM and they were pulled low, i check with the oscilloscope if the signal was received on PA1, it was indeed but since it was pulled low, i used a different port, PC10 and PC11 which did work