Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ALang6
Beginner
963 Views

uart with MIDI baudrate ?

Jump to solution

Hello,

is it possible to use the Midi Baudrate 31250 on the uart-1 ?

I tried using the ermaa library and an additional iocl call (see below) to

change the baud rate to the not defined 31250. This works on other linux systems.

However I do get an error: uart-1: set baudrate: invalid baudrate 15.

Any idea how to solve?

Thank you

Andreas

code:

int ir=ioctl(mraactx->fd, TCGETS2, &tio);

if (ir != 0) printf("Error in ioctl(mraactx->fd, TCGETS2, &tio)");

tio.c_cflag &= ~CBAUD;

tio.c_cflag |= BOTHER;

tio.c_ispeed = 31250;

tio.c_ospeed = 31250;

/* do other miscellaneous setup options with the flags here */

ir=ioctl(mraactx->fd, TCSETS2, &tio);

0 Kudos
1 Solution
idata
Community Manager
93 Views

Hi Andreas,

 

 

Thank you for contacting us.

 

 

I was checking the http://www.intel.com/content/www/us/en/support/boards-and-kits/000005808.html Hardware Guide for the Intel® Edison Compute Module (Section 4.4), and unfortunately the baud rate 31250 is not supported, you can use 38400 or 19200.

 

 

I already tested these values using the command: root@Leonardo:~# stty -F /dev/ttyMFD1 38400.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.

View solution in original post

2 Replies
idata
Community Manager
94 Views

Hi Andreas,

 

 

Thank you for contacting us.

 

 

I was checking the http://www.intel.com/content/www/us/en/support/boards-and-kits/000005808.html Hardware Guide for the Intel® Edison Compute Module (Section 4.4), and unfortunately the baud rate 31250 is not supported, you can use 38400 or 19200.

 

 

I already tested these values using the command: root@Leonardo:~# stty -F /dev/ttyMFD1 38400.

 

 

Have a nice day.

 

 

Regards,

 

Leonardo R.

View solution in original post

KMill10
Valued Contributor II
93 Views

Although the Edison UART doesn't officially support 31250, the data sheet that Leonardo refers to also claims that it is register compatible with a 16550.

Therefore, if you can find a way to write to the registers, you should be able to program it to just about any baud rate.

Alternatively you could patch the kernel and re-build it.

Reply