Skip to content
Advertisement

Debian 9.4 (stretch) change UART4 baud rate to 9600

I researched and tried a lot updating uart4 baud rate of Beaglebone green running Debian 9.4, but could not succeed. I am not even sure whether uart4 is enabled in Debian 9.4. As per am335x-boneblack.dts, uart4 is disabled and clock-frequency value is 0x2dc6c00 (this is for baudrate 115200 I guess).

serial@481a6000 {
    compatible = "ti,am3352-uart", "ti,omap3-uart";
    ti,hwmods = "uart4";
    clock-frequency = <0x2dc6c00>;
    reg = <0x481a6000 0x2000>;
    interrupts = <0x2c>;
    status = "disabled";
    linux,phandle = <0xa7>;
    phandle = <0xa7>;
    };

Advertisement

Answer

I used termios library for uart configuration in linux. The termios functions describe a general terminal interface that is provided to control asynchronous communications ports. Here is an example of usage in c.

Advertisement