Programming Information; User Leds; I²C Bus; Spi Bus - Janz Tec emVIEW-7/RPI3 Hardware Manual

Embedded computing touch panel
Table of Contents

Advertisement

emVIEW-7/RPI3 (Hardware and Software Manual) • Programming Information
6

Programming Information

This chapter gives technical information on how to program, or adapt existing Linux drivers to the
emVIEW-7/RPI3 hardware and is intended for users familiar with creating own Linux kernels and
drivers.
For standard Linux users, optionally our emVIEW-7/RPI3 driver package (chapter 5.2) is available and
this already includes all required drivers, therefore no driver programming is needed to use the
emVIEW-7/RPI3 hardware and it's interfaces.
6.1

User LEDs

The two front panel LEDs of the CPU module are controllable by the user. They are controlled by
Raspberry GPIOs.
IO
GREEN
RED
LEDs are turned on by setting the GPIO to low level.
Example:
root@raspberry ~$ echo "12" > /sys/class/gpio/export
root@raspberry ~$ echo "out" > /sys/class/gpio/gpio12/direction
root@raspberry ~$ echo "1" > /sys/class/gpio/gpio12/value
root@raspberry ~$ echo "0" > /sys/class/gpio/gpio12/value
NOTICE
When the emVIEW-7/RPI3 driver package (chapter 5.2) has been installed, the green
LED is configured to show the µSD-card activity. To control this LED by from the
command line, uncomment the entry "dtparam=act_led_gpio=5" from the configuration
file /boot/config.txt and remove all entries starting with "bcm2708.disk_*" from the
configuration file /boot/cmdline.txt and reboot the system and reboot the system. After
this, setting the output value of GPIO 5 controls the green LED.
6.2
I²C Bus
The emVIEW-7/RPI3 utilizes the Raspberry I2C bus to connect to several peripheral devices.
Type
EEPROM
Thermal
Sensor
RTC
6.3

SPI Bus

The emVIEW-7/RPI3 utilizes the Raspberry PI SPI bus to connector CAN and an additional UART.
Type
CAN
UART
Rev. 1.0
GPIO
GPIO5 (Pin 29)
GPIO12 (Pin 32)
Device
Address
-
0b1010000
DS75
0b1001000
MCP7940
0b1101111
Table 8: Internal I²C devices
Device
Chip Select
MCP2515
CE0#
SC16IS740
CE1#
Notes
Optional
Optional
Interrupt
GPIO25 (Pin22)
GPIO17 (Pin11)
© Janz Tec AG
6 - 25

Advertisement

Table of Contents
loading

Table of Contents