Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

proble with altera uart ttyS0

Altera_Forum
Honored Contributor II
804 Views

hi all 

i have problem with altera uart0 

when i send char it's ok but µclunix stop run , my function  

int uart_altera_test() 

char* msg = "c"; 

int fp; 

char prompt = 0; 

fp = open ("/dev/ttyS0", O_RDWR | O_NONBLOCK); //Open file for reading and writing 

 

if (fp < 0) 

printf( "error open %.\n", fp); 

else 

{  

 

if( write(fp, msg ,sizeof(char)) < 0) 

printf("error write UART file.\n"); 

fclose (fp); 

printf("Closing the UART file.\n"); 

return 0 

}
0 Kudos
0 Replies
Reply