diff --git a/03_uart1/OLVASSEL.md b/03_uart1/OLVASSEL.md index 04ce36f4..99c77f23 100644 --- a/03_uart1/OLVASSEL.md +++ b/03_uart1/OLVASSEL.md @@ -1,8 +1,10 @@ Oktatóanyag 03 - UART1, Auxilary mini UART ========================================== -Ezúttal a hírhedt Helló Világ példát vesszük elő. Előbb az UART1-re írjuk meg, mivel azt egyszerűbb programozni. -NOTE: qemu nem irányítja át alapból az UART1-et a terminálra, csak az UART0-át! +Ezúttal a hírhedt Helló Világ példát vesszük elő. Előbb az UART1-re írjuk meg, mivel azt egyszerűbb programozni, +mivel fix órafrekvenciája van. + +FIGYELEM: qemu nem irányítja át alapból az UART1-et a terminálra, csak az UART0-át! Gpio.h ------ diff --git a/03_uart1/README.md b/03_uart1/README.md index 42e07f9c..e176b9e2 100644 --- a/03_uart1/README.md +++ b/03_uart1/README.md @@ -1,7 +1,9 @@ Tutorial 03 - UART1, Auxilary mini UART ======================================= -It is time for the famous Hello World example. We're going to write on the UART1 first, as it's easier to program. +It is time for the famous Hello World example. We're going to write on the UART1 first, as it's easier to program +as it has a fixed clocked frequency. + NOTE: qemu does not redirect UART1 to terminal by default, only UART0! Gpio.h diff --git a/04_mailboxes/OLVASSEL.md b/04_mailboxes/OLVASSEL.md index 83d3a6b2..767adcb0 100644 --- a/04_mailboxes/OLVASSEL.md +++ b/04_mailboxes/OLVASSEL.md @@ -3,7 +3,8 @@ Oktatóanyag 04 - Levelesládák Mielőtt nekiugranánk az UART0-ának, szükségünk lesz a levelesládára. Ezért ebben az oktatóanyagban bemutatom a mailbox interfészt. Arra használjuk, hogy lekérdezzük az alaplap egyedi sorszámát, majd kiírjuk azt. -NOTE: qemu nem irányítja át alapból az UART1-et a terminálra, csak az UART0-át! + +FIGYELEM: qemu nem irányítja át alapból az UART1-et a terminálra, csak az UART0-át! Uart.h, uart.c -------------- @@ -17,16 +18,22 @@ A levelesláda interfésze. Először értékekkel feltöltjük az `mbox` tömb hogy értesüljön róla a GPU, megadva közben a levelesláda csatornáját. Ebben a példában a [property csatornát](https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface) használtam, aminek az üzenete a következőképp néz ki: + +``` 0. üzenet teljes hossza bájtban, (x+1)*4 1. MBOX_REQUEST mágikus szám, kérés típusú üzenetet jelent 2-x. parancsok x+1. MBOX_TAG_LAST mágikus szám, nincs további parancs jelölése +``` Ahol minden egyes parancs szerkezete a következő: + +``` n+0. parancs azonosító n+1. adatterület mérete bájtban n+2. nulla n+3. opcionális adatterület +``` Main ---- diff --git a/04_mailboxes/README.md b/04_mailboxes/README.md index 9c3d2cf0..2ff4da20 100644 --- a/04_mailboxes/README.md +++ b/04_mailboxes/README.md @@ -3,6 +3,7 @@ Tutorial 04 - Mailboxes Before we could go on with UART0, we need mailboxes. So in this tutorial we introduce the mailbox interface. We'll use it to query the board's serial number and print that out on UART1. + NOTE: qemu does not redirect UART1 to terminal by default, only UART0! Uart.h, uart.c @@ -17,16 +18,22 @@ The mailbox interface. First we fill up the message in `mbox` array, then we cal `mbox_call(ch)` to pass it to the GPU, specifying the mailbox channel. In this example we have used the [property channel](https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface), which requires the message to be formatted as: + +``` 0. size of the message in bytes, (x+1)*4 1. MBOX_REQUEST magic value, indicates request message 2-x. tags x+1. MBOX_TAG_LAST magic value, indicates no more tags +``` Where each tag looks like: + +``` n+0. tag identifier n+1. value buffer size in bytes n+2. must be zero n+3. optional value buffer +``` Main ---- diff --git a/07_delays/OLVASSEL.md b/07_delays/OLVASSEL.md index 3d23291a..bb539526 100644 --- a/07_delays/OLVASSEL.md +++ b/07_delays/OLVASSEL.md @@ -3,7 +3,7 @@ Oktatóanyag 07 - Késleltetések Roppant fontos, hogy a megfelelő időtartamot késleltessünk, amikor alacsony szintű hardverrel bánunk. Ebben az okatatóanyagban három megközelítést nézünk meg. Az egyik CPU órajel függő (akkor hasznos, ha -a várakozási idő óraciklusban van megadva), a másik kettő mikroszekundum (másodperc milliomod része) alapú. +a várakozási idő órajelciklusban van megadva), a másik kettő mikroszekundum (másodperc milliomod része) alapú. Delays.h, delays.c ------------------ diff --git a/07_delays/README.md b/07_delays/README.md index 30dba2e4..25061710 100644 --- a/07_delays/README.md +++ b/07_delays/README.md @@ -3,7 +3,7 @@ Tutorial 07 - Delays It is very important to wait precise amounts of time while you're interfacing with low level hardware. In this tutorial we'll cover there ways. One is CPU frequency dependent (and useful if wait time is given -in CPU clock cycles), the other two are are microsec (millionth of a second) based. +in CPU clock cycles), the other two are microsec (millionth of a second) based. Delays.h, delays.c ------------------ diff --git a/08_power/README.md b/08_power/README.md index c6c06746..7de864ae 100644 --- a/08_power/README.md +++ b/08_power/README.md @@ -10,7 +10,7 @@ connected to a data GPIO pin for example). Power.h, power.c ---------------- -The power management controller is one of the periphels that are not emulated properly by qemu. +The power management controller is one of the peripherals that are not emulated properly by qemu. Works on real hardware though. `power_off()` shutdowns the board to a almost zero power consumption state. diff --git a/OLVASSEL.md b/OLVASSEL.md index 596177da..4f9467eb 100644 --- a/OLVASSEL.md +++ b/OLVASSEL.md @@ -127,7 +127,9 @@ Néhány az érdekesebb MMIO címek közül: 0x3F980000 - USB vezérlő (Universal Serial Bus controller) ``` A többi információ megtalálható a Raspberry Pi firmware wiki-ben és a documentation repóban a github-on. + https://github.com/raspberrypi Sok szerencsét és élvezetes hekkelést a Raspberry-dhez! :-) + bzt diff --git a/README.md b/README.md index aa089ebe..99b9acb2 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,9 @@ Some of the more interesting MMIO addresses are: 0x3F980000 - Universal Serial Bus controller ``` For more information, see Raspberry Pi firmware wiki and documentation on github. + https://github.com/raspberrypi Good luck and enjoy hacking with your Raspberry! :-) + bzt