Forum Discussion
Altera_Forum
Honored Contributor
20 years agosharing uart by two processor cores
Hi all,
can two nios II processors share one uart terminal i am using NDB stratix II device. i have connected two nios processors to one uart. also i have attached one mutex in sopc builder. but when i run(mutually exclusive) in each processor it is saying can't open the uart permission denied. please help me out this regards prasad5 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by prasad_forums@Oct 14 2005, 10:24 PM i have connected two nios processors to one uart.also i have attached one mutex in sopc builder.
but when i run(mutually exclusive) in each processor
it is saying can't open the uart permission denied. --- Quote End --- Usually, connecting two processors to the same peripheral is a bad thing, since they can get into a fight. However, it is theoretically possible, if you use a mutex, and write your own device driver. If you're using the HAL drivers, I'm pretty sure it won't work; you'll have to give each CPU its own UART.
- Altera_Forum
Honored Contributor
Hi Mike,
thanks for the response, i am having multiporcessor environment in the fpga i have connected all the processor to flash and sdram and also sram can i manage all these things with a single mutex or should i need to have separate mutex for each and every resource shared between the processors regards prasad - Altera_Forum
Honored Contributor
Did you try to have two nios2-terminal connect? You might have conflict at the nios2-terminal because of the single com port that is connected, but not the NIOS II because the SOPC Builder will take care of the switching between multiple master to a single slave.
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by nobodii@Oct 19 2005, 05:20 AM did you try to have two nios2-terminal connect? you might have conflict at the nios2-terminal because of the single com port that is connected, but not the nios ii because the sopc builder will take care of the switching between multiple master to a single slave.<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10446)
--- quote end ---
--- Quote End --- Hi niosdii, what is this "Did you try to have two nios2-terminal connect? You might have conflict at the nios2-terminal" i could not understand what is that nios2-terminal connection!!!! exactly i am getting the same problem. also now one more thing.even if i try to have only one processor and only one connection to uart even then it is saying permission denied for accessing the uart as stdin/stdout/stderr.even single processor is unable to get uart control finally now. i am unable to get the things clearly.can u please help me in this thanks and regards prasad
- Altera_Forum
Honored Contributor
BTW, see your another post in http://www.niosforum.com/forum/index.php?showtopic=2701 (http://www.niosforum.com/forum/index.php?showtopic=2701), is it related?