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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

set UART speed

Altera_Forum
Honored Contributor II
1,077 Views

How could I set write UART speed? 

I'm opening /dev/uart1 device via fopen(). 

SOPC builder just do not have speed option. 

I'm using Nios IDE 9 and Quartus 9 and Nios II dev kit EP2S60 RoHS. 

Soemthing via IOCTL?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
373 Views

You have two possibilities to set the baudrate in UART. 

Either at system generation time and you cannot modify it after, or in SOPC Builder you check "Baud rate can be changed by software (Divisor register is writable)". And you can modify the baudrate in software by writing into the divisor register. 

The formula between this register and the baudrate is in Quartus Handbook Volume 5 page 6-4 (http://www.altera.com/literature/hb/nios2/n2cpu_nii51010.pdf).
0 Kudos
Reply