Is there a way to access the UART registers

Hello,

I have a problem, how can I access the UART registers on a BeagleBone Black? I need to change UART modes described in
in: TI AM335x ARM A8 Microprocessors technical reference manual

example of instructions.

Disable the UART before accessing the UARTi.UART_DLL and UARTi.UART_DLH registers:
Set the UART_MDR1[2:0] MODE_SELECT bit field to 0x7.

Thanks,

You can find the memory offsets for the uart control, and then the offsets for the specific registers in that reference manual. From there, you can use an mmap to the registers in your program/script or use the devmem2 command to read/write the registers directly.

mmap example with gpio registers:
c\c++: http://stackoverflow.com/questions/13124271/driving-beaglebone-gpio-through-dev-mem
python: http://www.alexanderhiam.com/tutorials/beaglebone-io-using-python-mmap/

devmem2: http://man.cx/devmem2(1) just uses an mmap to access memory.

read-modify-write: concept is to read the current value, modify some bits in the read value, and then write back the modified value, preserving all of the bits you didn’t want to change. Search for “bitwise operations” for your language.

Make sure the bits you’re trying to access aren’t available with the sysfs and c interface first.

I have the same problem

I have already set the GPIO bank registers. But it seems that the same way don’t works for UART ones.

root@beaglebone:/sys/class > devmem2 0x48024008
/dev/mem opened.
Memory mapped at address 0xb6f10000.
Bus error

so strange!