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++
公告
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.
12748 讨论

It is possible to run altera_avalon_uart at 921600 bps?

Altera_Forum
名誉分销商 II
2,168 次查看

It is possible to run altera_avalon_uart at 921600 bps instead of 115200? 

QSys GUI have only 115200 but with some code there is possibility? 

 

Thanks
0 项奖励
6 回复数
Altera_Forum
名誉分销商 II
1,436 次查看

The limitation comes from the baud ALLOWED_RANGE property in the _hw.tcl of that module, and I believe it is only restricting you when creating a component with fixed baud rate. 

There are many ways to work around it: don't use fixed baud rate, clone and modify the Altera supplied copy of the module, or don't do any of the above and just supply it with 8x the clock you told it you would give it.
0 项奖励
Altera_Forum
名誉分销商 II
1,436 次查看

Tomorrow I will try.. 

Thanks
0 项奖励
Altera_Forum
名誉分销商 II
1,436 次查看

 

--- Quote Start ---  

The limitation comes from the baud ALLOWED_RANGE property in the _hw.tcl of that module, and I believe it is only restricting you when creating a component with fixed baud rate. 

There are many ways to work around it: don't use fixed baud rate, clone and modify the Altera supplied copy of the module, or don't do any of the above and just supply it with 8x the clock you told it you would give it. 

--- Quote End ---  

 

This work around looks cool, it this still maintain the driver stability during transfer?
0 项奖励
Altera_Forum
名誉分销商 II
1,436 次查看

Modifying 'altera_avalon_uart_hw.tcl' is a very clean way of doing it. However, this script does perform a number of checks on your chosen values and won't simply accept anything you throw at it. I've successfully added 250kbaud before. However, adding 921600 didn't work - the script's checks threw it out. This was (most likely to be) due to it not complying with a valid baudrate error the script allows. This is clearly dependent on your source clock frequency. You may find some settings that allow it to work. However, you may have to modify the script further so that the checks allow it to use your chosen baudrate and source clock frequency. 

 

If it were me, I'd be coding my own, custom UART. 

 

Cheers, 

Alex
0 项奖励
Altera_Forum
名誉分销商 II
1,436 次查看

Yes I have my custom UART but not with avalon interface and I have no time to add and test all.. 

Anyway 250k is better... thank you
0 项奖励
Altera_Forum
名誉分销商 II
1,436 次查看

For what it's worth, 921600 with a 25MHz or 50MHz clkin commonly used on the eval boards has zero error and no warning from the script.  

 

Should you care for an even more odd-ball baud rate, the only thing you should need to have to do is e.g. use a PLL to supply a clkin as an integral multiple of the baud rate.
0 项奖励
回复