Skip to content

Commit

Permalink
First commit for making lesson1 compatible with rpi4
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikash jha authored and Vikash jha committed Aug 18, 2019
1 parent f8c49a8 commit b430423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/lesson01/include/peripherals/base.h
@@ -1,6 +1,7 @@
#ifndef _P_BASE_H
#define _P_BASE_H

#define PBASE 0x3F000000
/* New raspberry pi-4 base address */
#define PBASE 0xFE000000

#endif /*_P_BASE_H */
4 changes: 2 additions & 2 deletions src/lesson01/src/config.txt
@@ -1,2 +1,2 @@
kernel_old=1
disable_commandline_tags=1
# raspberry pi-4 lesson1
arm_64bit=1
2 changes: 1 addition & 1 deletion src/lesson01/src/mini_uart.c
Expand Up @@ -49,7 +49,7 @@ void uart_init ( void )
put32(AUX_MU_IER_REG,0); //Disable receive and transmit interrupts
put32(AUX_MU_LCR_REG,3); //Enable 8 bit mode
put32(AUX_MU_MCR_REG,0); //Set RTS line to be always high
put32(AUX_MU_BAUD_REG,270); //Set baud rate to 115200
put32(AUX_MU_BAUD_REG,541); //Set baud on raspberry pi-4 rate to 115200 (GPU clock rate is now 500Mhz)

put32(AUX_MU_CNTL_REG,3); //Finally, enable transmitter and receiver
}

0 comments on commit b430423

Please sign in to comment.