ACME-0010 SP AIR

Configurazione Kernel

Nella directory di compilazione del Kernel Linux digitare:

wget https://www.acmesystems.it/www/SP-AIR/acme-spair_defconfig 
mv acme-spair_defconfig arch/arm/configs
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- acme-spair_defconfig
make -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- zImage
scp arch/arm/boot/zImage root@192.168.1.10:/boot
make modules -j8 ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
make modules_install INSTALL_MOD_PATH=./modules ARCH=arm

Compilazione Device Tree

Nella directory di compilazione del Kernel Linux digitare:

wget https://www.acmesystems.it/www/SP-AIR/acme-spair.dts 
mv acme-spair.dts arch/arm/boot/dts
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- acme-spair.dtb
scp arch/arm/boot/dts/acme-spair.dtb root@192.168.1.10:/boot/at91-sama5d3_acqua.dtb

  • Sorgente device tree acme-spair.dts
  • Compilato device tree da mettere nella prima partizione della microSD e rinominare in at91-sama5d3_acqua.dtb acme-spair.dtb

Uso delle linee GPIO

Pin Acqua Pin MCU Kernel ID Active state Reset state
LED1 J2-33 PB8 GPIO 40 1 = Led ON Input - Led ON
LED2 J2-37 PB12 GPIO 44 1 = Led ON Input - Led ON
SWITCH1 J2-16 PB3 GPIO 35 0 = Pulsante premuto Input - Unpressed
WIFI POWER J1-39 PA24 GPIO 24 1 = WiFi ON Input - WiFi OFF
MODEM POWER J2-19 PB10 GPIO 42 1 = Modem ON Input - Modem OFF

Set dei vari dispositivi

#Modem ON
echo 42 > /sys/class/gpio/export
echo out > /sys/class/gpio/pioB10/direction
echo 1 > /sys/class/gpio/pioB10/value
 
#Modem OFF
echo 0 > /sys/class/gpio/pioB10/value

#WiFi ON
echo 24 > /sys/class/gpio/export
echo out > /sys/class/gpio/pioA24/direction
echo 1 > /sys/class/gpio/pioA24/value

#WiFi OFF
echo 0 > /sys/class/gpio/pioA24/value

#Led On (first)
echo 40 > /sys/class/gpio/export
echo out > /sys/class/gpio/pioB8/direction
echo 1 > /sys/class/gpio/pioB8/value

#Led OFF
echo 0 > /sys/class/gpio/pioB8/value

#Led ON (second)
echo 44 > /sys/class/gpio/export
echo out > /sys/class/gpio/pioB12/direction
echo 1 > /sys/class/gpio/pioB12/value

#Led OFF
echo 0 > /sys/class/gpio/pioB12/value
 
#Rear panel switch
echo 35 > /sys/class/gpio/export
echo in > /sys/class/gpio/pioB3/direction
cat /sys/class/gpio/pioB3/value

Modem /dev/ttyUSB0,1,2,3

Per la gestione del modem i flag da abilitare nel kernel sono:

CONFIG_PPP
CONFIG_PPP_FILTER ß
CONFIG_PPP_ASYNC
CONFIG_USB_SERIAL
CONFIG_USB_SERIAL_GENERIC
CONFIG_USB_SERIAL_OPTION

In questo modo vendono aperte quattro seriali:

/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2
/dev/ttyUSB3

Per il PPP segui questo articolo PPP over GPRS or HSPA link

Yarm

La Yarm è collegata sulla porta /dev/ttyS1

Porte seriali

Assegnazione delle porte seriale.


 +------------+  +------------+
 | /dev/ttyS2 |  | /dev/ttyS4 |
 +------------+  +------------+
 
 +------------+  +------------+
 | /dev/ttyS3 |  | /dev/ttyS5 |
 +------------+  +------------+
 

Programma di test

Schema elettrico

Links

Parti componenti

Varie