Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
894 Views

Unrecognizable characters received via NIOS II UART

Hi all, 

 

I am configuring my DE0-Nano SOC kit for NIOS based UART communication (RS232). Everything is done as per the available literature. Connections are also done as: 

GPIO[1] as Rx connected to Tx pin (pin 3) of 9 pin D connector 

GPIO[2] as Tx connected to Rx pin (pin 2) of 9 pin D connector 

GND is connected to pin 5 of 9 pin D connector 

Baud rate is 9600 

I am using USB-RS232 converter and Intel Quartus v16.1. [located here: https://drive.google.com/open?id=0b9jlla6qcyb2c01lne9yqnlreda

[Because of size limitation.] 

 

Now, the problem is that whether I use Putty, Teraterm or even serial programming (C or python) on receiving end, I am getting unreadable characters only. Nothing that makes any sense is readable. I tried changing baud rate but to no effect. 

Can anyone please point out where I am mistaking? 

 

Thanks
Tags (1)
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
86 Views

Your Baud rate is clearly not what you expect it to be. 

 

In order for your FPGA to generate the correct baud rate you not only need to tell it the baud rate but the system clock frequency too. Are you setting this up 'as per the available literature'? 

 

Are you able to measure - e.g. with an oscilloscope - the resulting baud rate you have? This might give you a pointer as to what order of magnitude out you are. 

 

Cheers, 

Alex
Altera_Forum
Honored Contributor I
86 Views

 

--- Quote Start ---  

Your Baud rate is clearly not what you expect it to be.In order for your FPGA to generate the correct baud rate you not only need to tell it the baud rate but the system clock frequency too. Are you setting this up 'as per the available literature'? 

--- Quote End ---  

Thanks for your response Alex.Since I am using standard UART library of QSYS which is sync'ed to my 50 MHz on board clock, so I think that baud rate issue should not be there.(Here is my source: https://www.youtube.com/watch?v=yetvltb4hm4

--- Quote Start ---  

Are you able to measure - e.g. with an oscilloscope - the resulting baud rate you have? This might give you a pointer as to what order of magnitude out you are.Cheers,Alex 

--- Quote End ---  

Moreover, I have grabbed a part of the serial bit stream on my scope and it can be seen that a pulse duration is 8.6 us which gives me ~115200 as baud rate for which my system is presently configured (i.e. both transmitter and receiver). Please locate the screen dump of scope here: https://drive.google.com/file/d/0b9jlla6qcyb2ug5tbknjm3bxdlu/view?usp=sharing However, it can also be seen that Voltage of the transferred pulses is very small ~30mV peak-to-peak. Do you think this might be the issue in the decoding of erroneous data? Can you please suggest something else?Thanks
Altera_Forum
Honored Contributor I
86 Views

 

--- Quote Start ---  

~30mV peak-to-peak. Do you think this might be the issue in the decoding of erroneous data? Can you please suggest something else?Thanks 

--- Quote End ---  

 

 

This was because my DSO probe was faulty. 

 

Now, I am able to receive the intended data after I replaced an old level translator IC (Max232 chip). 

So, this thread is [CLOSED] from my side. 

 

Thanks.
Reply