Altera_Forum
Honored Contributor
14 years agoProblem with transfering Data with UART
Hi all,
First of all: I am newbie in programming FPGAs I am using a ALtera Cyclone 3 on a self made Board. For communication with a PC I use the avalon UART. It works fine while working with the debugging Interface of JTAG UART. My problem is: Removing the JTAG UART Connection, my Programm on the FPGA is not able to send me data via UART. To receive and send data with UART, I dont use any Interrupts directly, I read the status of the UART (Status: TRDY, RRDY) and also a Control bit(Control: RRDY). I do this without any kind of handshake, so I am just using Ground, TxD and RxD of my RS232. It works realy fine, but my compiled program wont transmit data via UART without the JTAG UART connection. Any idea? Maybe I missed something while making my hex File/compiling? I deactivated the stdout, stderr and stdin in my BSP for the compile, cause I read it will make trouble otherwise I am sure my Hardware is sending something, cause when I send something, I will send 9 Bytes. So i wait after every Byte for my Status TRDY(ready to transmit) to be one, before I send the next Byte like this: while(((IORD_ALTERA_AVALON_UART_STATUS(UART_BASE) & ALTERA_AVALON_UART_STATUS_TRDY_MSK) >> ALTERA_AVALON_UART_STATUS_TRDY_OFST)!=1){} IOWR_ALTERA_AVALON_UART_TXDATA(...); I hope you get a idea of my problem.