futurehomeno / RPI_mini_UART

Serial driver for BCM2835 mini UART.
GNU General Public License v3.0
5 stars 5 forks source link

compilation error on kernel 4.9.66 #5

Open kamomil opened 6 years ago

kamomil commented 6 years ago

Hi, tried to compile it and I get:

error: implicit declaration of function '__io_address' [-Werror=implicit-function-declaration]
     __raw_writel(1,(uint32_t *)__io_address(AUX_BASEADDR + AUX_ENABLES));
chribru commented 6 years ago

Hi, we discovered that it was possible to use the mini UART for our purposes without a kernel module. This project has therefore been discontinued, and is not compatible with newer kernels. The mini UART can be enabled by using the device tree overlay uart1. We just added

enable_uart=1
dtoverlay=uart1,txd1_pin=40,rxd1_pin=41

to /boot/config.txt (for GPIO 40/41)

(See https://github.com/raspberrypi/firmware/blob/1.20171029/boot/overlays/README#L1548-L1554). Have not tested with baud rates different from 115200, though.

kamomil commented 6 years ago

thanks a lot, I set:

enable_uart=1
dtoverlay=uart1,txd1_pin=14,rxd1_pin=15

in /boot/config.txt and set console=serial1,9600 in /boot/cmdline.txt instead of console=serial0,115200 and now the uart for the console is the mini uart