Altera_Forum
Honored Contributor
8 years agoUART with NIOS II on DE0 Nano
Hi, I'm having trouble establishing communication between my DE0 Nano and my computer. I'm trying to do this using an FTDI usb to TTL chip (FT232R) and using the Platform Designer to create a UART IP which talks to a NIOS2 processor.
I've attached a screen shot of my Platform Designer configuration. I basically followed the steps in the tutorial Introduction to the QSys Tool, but instead of using a JTAG UART, I'm using a RS 232 UART. I have also attached my C code for running on the NIOS processor (this is slightly adapted from another Altera tutorial). I have verified that I'm connected to the correct GPIO pins for RX and TX and I have the same baud settings, stop bits, parity, flow control. The code compiles and runs fine but nothing is ever transmitted or received over the UART. When I step through the code, I see that the control register of the UART is always zeros. So my code thinks there is zero space remaining in the write buffer and therefore never sends any characters. This makes me think that it somehow is using the wrong base address in memory, but I changed the base address to match that in the Platform designer. I'm really not sure what the best way to debug this is. Any help would be greatly appreciated. Thanks, Carson