Configuring UART in STM32F429I DISC1 board

Hello,

   I recently started learning ARM programming and currently taking a course on Udemy.

It covers GPIO, SPI, I2C and and UART register level programming. So far I have only been able to make GPIO code work. For communication protocols like SPI & I2c it uses two development board. The course is done on STM32F407 DISCovery board.

I am using a different board than the one used in the course, STM32F429ZI DISC1

 

Both controller have same Reference manual. Only difference i could find is pins, and RCC control register. So code developed for STM32F407 should work in STM32F429ZI controller with little difference. But I couldn't make SPI code work in my board. So i decided to write UART code , so that I can use it on SPI code for debugging. But UART code is also not working.

 

Google drive contains all the documents and code that I developed for SPI and UART. Once I could figure out why UART is not working I think I could use that in SPI code to figure out the issue.

 

I also tried following code that I found online, it also use STM32F4xx series controller but not the same as mine. It is not working too.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* p4_5.c C library Console I/O using USART2 at 9600 Baud
*
* This program demonstrates the use of C library console I/O.
* The functions fputc() and fgetc() are implemented using
* USART2_write() and USART2_read() for character I/O.
* In the fgetc(), the received character is echoed and if a '\r'
* is received, a pair of '\r', '\n' is echoed.
* In fputc() and fgetc(), the file descripter is not checked. All
* file I/O's are directed to the console.
*
* By default, the clock is running at 16 MHz.
* The USART is configured for 9600 Baud.
* PA2 - USART2 TX (AF7)
* PA3 - USART2 RX (AF7)
* Use Tera Term on the host PC to send keystrokes and observe the display
* of the characters echoed.
*
* This program was tested with Keil uVision v5.24a with DFP v2.11.0
*/
#include "stm32F4xx.h"
#include <stdio.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

I am using this USB TTL to connect b/m board and PC and mobaXterm as terminal

these are the terminal settings. I use 

 IDE: Keil uVision 5.27

I am really stuck

Thanks

0