Linux Device Driver An Introduction with Raspberry Pi | Introducción a Driver de Linux con Raspberry Pi


This document was used in the COMPDES2017 for training purpose. The main details you must know about this document are:

  1. Many aspects are no cited in the document because it was given during the training sessions, I will complete as soon as I can.
  2. It’s written only in Spanish because the event (COMPDES) is for Latin America students, I will release the English version soon.

The purpose of this document is giving a source where you can find useful information and understand Linux Device Driver. However, the best document to study this theory, in my opinion is Linux Device Driver by Jonathan Corbet. I wrote theory supported by examples. There is a framework with instructions to prepare an environment, and you can test examples. Despite the fact the document is Raspberry Pi-focused as hardware for this training, many theory aspects apply to others scenarios.

I recommend you try to understand memory address management (virtual and physical addresses) that is one of the most useful topics about communication between Kernel operative system and hardware peripheral.

Hope you can find useful information in this document.

Direct download


Este documento fue usado en el COMPDES2017 en un taller para entrenamiento. Los principales detalles que debes saber sobre este documento son:

Muchos aspectos no estan citados en el documento porque fueron discutidos durante las sesiones del taller; las completaré tan pronto como pueda.
Esta escrito solamente en español pues el evento (COMPDES) es para estudiantes de latino america; escribiré la versión en Ingles pronto.

El propósito de este documento es ofrecer una fuente donde puedas encontrar informaion útil y entender mas acerca de Linux Device Driver. Sin embargo, el mejor documento para estudiar esta teoría, en mi opinión es Linux Device Driver by Jonathan Corbet. Escribí teoría para apoyada con ejemplos. Existe un framework con instrucciones para preparar un entorno, y poder probar ejemplos. A pesar del hecho que el documento esta enfocado a Raspberry Pi como hardware para este estudio, muchos aspectos teoricos aplican para otros escenarios.

Recomiendo que intentes ententer la administración de direcciones de memoria (direcciones físicas y virtuales) que es uno de los topicos mas útiles sobre comunicación entre Kernel de sistema operativo y perifericos de hardware.

Espero puedas encontrar informacion útil en este documento.

Descarga directa

Reading from SD – Part 1

It’s been a while since my last post, my apologies for that. Anyways I hope you can find this post useful as me; I used the next information in a project that consisted in perform a grayscale filter to an image using an AXI-Stream IP in the programmable logic part. To do so, I stored the image into the SD then read the raw of the file (which is the data without any compression or file headers) and sent it to the IP using AXI Stream functions at the associated addresses. On this post I am going to show you, how to configure the hardware in order you to do tasks like the mentioned above. So, by the end of this post, you will be able to:


  • Understand how the SD slot is to connect to the Zynq on the Zybo board.
  • Perform the necessary configuration in the Zynq to enable transfer SD to PS.
  • Write a software application which can read and write from/to the SD card, using FATFs library.

Tools and materials:

Main steps:

  • Vivado
    • Create new project
    • Create block design
    • Configure Zynq IP
  • Xilinx SDK
    • Import Xilffs libraries into board support package (BSP)
    • Create new project with the modified BSP
  • Preparing the SD card

Contine reading

Using Standard Pmod in Zybo Zynq-7000 Development Board – Part 2

Go to Part one

Before continue we have to edit some configuration in the Zynq, this configuration are important for set I/O peripherals and correct clock value which are necessary for the Zybo correct function at least with this hardware specification, double click on Zynq7 IP then click on Import XPS Settings then look for the settings file and press ok. we almost done now we have to set constraint.

Contine reading

Using Standard Pmod in Zybo Zynq-7000 Development Board – Part 1


  • To show hardware configuration which is needed to access Pmod connectors in the Zybo Board
  • To make an application using Xilinx SDK which is allowed control external LEDs connected to the standard PMOD (JE) using el BTN0 (R18)


You are going to need:

  • Vivado
  • Xilinx SDK

Main steps:

  • Create new project
  • Create block design
  • Configure IPs
  • Set constraints
  • Program software

Contine reading