Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

UART encoding issues

Altera_Forum
Honored Contributor II
1,173 Views

Hi, I am using the Cyclone V SoC UART0 and I can transmit to my PC and read strings just fine. However when I am reading the UART in my baremetal application, the received characters don't match ASCII encoding. So far it looks like this: 

 

I send from Realterm: What I read in UART register: 

'A' ------------------------0x01 0x1D 

'B' ------------------------0x02 0x1D 

'C' ------------------------0x03 0x1D 

.  

'Z' ------------------------0x1A 0x1D 

 

I have no clue what kind f encoding this is and I can't map the bits in any way to actual ASCII values. 

 

Any help appreciated!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
403 Views

SOLVED! 

 

OK, Altera's SoCFPGA-hardwareLib-FPGA-CV-ARMCC reference design which I was using had left the UART to use FIVE BITS PER SERIAL WORD. As I was getting all the initialization messages from the UART to the terminal just fine I assumed the source had initialized the UART all fine. But now I have set LCR[1:0] to use eight bits per word and its fine!
0 Kudos
Reply