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.
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.
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.