Test all the RB interfaces in 10 mins in command Line
Last updated
Last updated
Refer the Hardware and System reference manual to check out the PIN Numbers and PORT numbers etc. of respective interfaces.
In case of any doubts you can Ask questions in RuggedBoard forum.
Targeted Hardware
SOM Version: PICM-001-A1
CB : RuggedBoard-A5D2x
CB Version : RB-A5D2x-V1.1
Targeted Software
RBNR-20.0.0/RBSD-20.0.0
- AT91Bootstrap-3.8.12
- Uboot-2018-07
- Linux Kernel v4.9.151
- Yocto 2.5.2 (sumo HEAD commit 623b77885051)
To test GPIO let us use the On-board LED on RuggedBoard. For this demonstration let's use LED_1 which is connected to GPIO PC13 (Refer hardware manual for more information).
RuggedBoard-A5D2x
Boot the board from NOR/MMC. After booting check toggling of USER LED.
Type the following commands in a sequence to toggle led.
echo 77 > /sys/class/gpio/export
echo out > /sys/class/gpio/PC13/direction
echo 1 > /sys/class/gpio/PC13/value
echo 0 > /sys/class/gpio/PC13/value
echo 1 > /sys/class/gpio/PC13/value
echo 0 > /sys/class/gpio/PC13/value
root@ruggedboard-a5d2x:~# echo 77 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PC13/direction
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PC13/value
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PC13/value
Try the above steps again replacing 77 with 81 & 83 respectively to toggle other two LEDs present on the board.
You can use remaining two user LED or any GPIO PIN mentioned in the Hardware manual with the same method. In case of any doubt post your detailed question into the RuggedBoard forum.
To check UART 3 node in /dev/.
To test the UART3 Port functionality in Kernel by shorting Transmitter and receiver pins.
To test the UART3 Port funcationaly in Kernel by connecting Transmitter pin of first board to receiver pin of second board and connect Receiver pin of first board to transmitter pin of second board using patch cards.
UART PORT .
PATCH CORDS
Boot the board from NOR/MMC.
Check weather the node is created in /dev
$ ls /dev/ttyS3
root@ruggedboard-a5d2x:~# ls /dev/ttyS3
/dev/ttyS3
Boot the board from NOR/MMC, Check the Log file whether node is created or not.
Open the microcom and enter some random data, to open microcom type the command given below.
$ microcom -s <baud-rate> /dev/ttyS3
root@ruggedboard-a5d2x:~# microcom -s 9600 /dev/ttyS3
atmel_usart_serial atmel_usart_serial.3.auto: using dma0chan0 for rx DMA transfers
atmel_usart_serial atmel_usart_serial.3.auto: using dma0chan1 for tx DMA transfers
Welcome to phytec
Boot the board from NOR/MMC, Check the Log file whether node is created or not.
Open microcom on both the boards and send data.
$ microcom -s <baud-rate> /dev/ttyS3
RB-Device-1:
root@ruggedboard-a5d2x:~# microcom -s 115200 /dev/ttyS3
atmel_usart_serial atmel_usart_serial.3.auto: using dma0chan0 for rx DMA transfers
atmel_usart_serial atmel_usart_serial.3.auto: using dma0chan1 for tx DMA transfers
helloooo....................
RB-Device-2:
root@ruggedboard-a5d2x:~# microcom -s 115200 /dev/ttyS3
atmel_usart_serial atmel_usart_serial.3.auto: using dma0chan0 for rx DMA transfers
atmel_usart_serial atmel_usart_serial.3.auto: using dma0chan1 for tx DMA transfers
ruggedboard......
To test the read and write functionality of i2c based eeprom
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
Boot the board from NOR/MMC.
Give the below command to write the data on eeprom
$echo phytec > /sys/class/i2c-adapter/i2c-0/0-0050/eeprom
Please give the below command to read the data from eeprom.
$cat /sys/class/i2c-adapter/i2c-0/0-0050/eeprom
root@rugged-board-a5d2x:~# echo phytec > /sys/class/i2c-adapter/i2c-0/0-0050/eeprom
root@rugged-board-a5d2x:~# cat /sys/class/i2c-adapter/i2c-0/0-0050/eeprom
phytec
To test the USB1 Port functionality using the dmesg in Kernel with Pen-drive.
To test the USB1 Port functionality in Kernel with Pen-drive to read and write the data.
To test the USB1 Port functionality in Kernel with USB host performance test.
USB PORT/Hub. -USB Stick.
USB-STICK should be detected.
Boot the board from NOR/MMC. After booting insert the USB Stick into Board USB port/USB-HUB, Check the Log file whether node is created or not.
Type the command given below for getting the log.
$ dmesg | tail
root@ruggedboard-a5d2x:~# dmesg | tail
usb-storage 1-1:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6
sd 0:0:0:0: [sda] 61341696 512-byte logical blocks: (31.4 GB/29.3 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda:
sd 0:0:0:0: [sda] Attached SCSI removable disk
Boot the board from NOR/MMC. After booting insert the USB Stick into Board USB port/USB-HUB, Check the Log file whether node is creadted or not using dmesg.
Once the node is detected, mount the node and do the read and write by typing the command given below.
$ mount /dev/mmcblk1p1 /mnt/
root@ruggedboard-a5d2x:~# mount /dev/mmcblk1p1 /mnt/
FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@ruggedboard-a5d2x:~# cd /mnt/
root@ruggedboard-a5d2x:/mnt# ls
BOOT.BIN u-boot.bin
a5d2x-rugged_board.dtb zImage
at91-sama5d27_som1_ek.dtb
root@ruggedboard-a5d2x:/mnt# cd
root@ruggedboard-a5d2x:~# mount usb 1-1: USB disconnect, device number 2
usb 1-1: new full-speed USB device number 3 using at91_ohci
usb 1-1: New USB device found, idVendor=0781, idProduct=5567
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Cruzer Blade
usb 1-1: Manufacturer: SanDisk
usb 1-1: SerialNumber: 4C530001280707107415
usb-storage 1-1:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6
sd 0:0:0:0: [sda] 61341696 512-byte logical blocks: (31.4 GB/29.3 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda:
sd 0:0:0:0: [sda] Attached SCSI removable disk
/dev/root on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=27004k,nr_inodes=6751,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/mmcblk1p1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
root@ruggedboard-a5d2x:~# mount /dev/sda /mnt/
FAT-fs (sda): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@ruggedboard-a5d2x:~# cd /mnt/
root@ruggedboard-a5d2x:/mnt# ls
adc i2c spidev_test read
root@ruggedboard-a5d2x:/mnt# vi hello.c
root@ruggedboard-a5d2x:/mnt# ls
adc i2c spidev_test read hello.c
root@ruggedboard-a5d2x:/mnt# ./read
Boot the board from NOR/MMC
After booting run the script file and insert the USB Stick into Board USB port/USB-HUB.
$ sh usb_host_test.sh
root@sama5d27-a5d2x:~# sh usb_host_test.sh
insert usb flash stick
usb 1-1: new full-speed USB device number 3 using at91_ohci
usb 1-1: New USB device found, idVendor=0781, idProduct=5567
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Cruzer Blade
usb 1-1: Manufacturer: SanDisk
usb 1-1: SerialNumber: 4C530001280707107415
usb-storage 1-1:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.00 PQ: 0 ANSI: 6
sd 0:0:0:0: [sda] 61341696 512-byte logical blocks: (31.4 GB/29.3 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda:
sd 0:0:0:0: [sda] Attached SCSI removable disk
dmesg -c
hdparm -t /dev/sda
hdparm -T /dev/sda
dd if=/dev/urandom bs=1M count=32 of=/tmp/test.img
mount -o rw,uid=1000 /dev/sda1 /mnt
time cp /tmp/test.img /mnt/test.img
time sync
md5sum -c /tmp/test.md5
time cp /mnt/test.img /tmp/test.img
md5sum -c /tmp/test.md5
mount -o rw,uid=1000,remount,sync /dev/sda1
time cp /tmp/test.img /mnt/test.img
md5sum -c /tmp/test.md5
umount /dev/sda1
To test the Ethernet ping functionality in Kernel.
Ethernet Switch / Hub / Router, Ethernet cable.
Make sure the network configuration & connection between Host & Target is established, connected to same switch / router.
Boot the board with NOR/MMC.
Before the ping test for Ethernet in Linux,we need to set the ip address by using below command on the target board. Make sure both the Target and Host are in the same sub-net
$ ifconfig eth0 192.168.1.11 up
4.Next ping to your host ip address by using below command.
$ ping 192.168.1.12
root@ruggedboard-a5d2x:~# ping 192.168.1.12
PING 192.168.1.12 (192.168.1.12): 56 data bytes
64 bytes from 192.168.1.12: seq=0 ttl=64 time=0.791 ms
64 bytes from 192.168.1.12: seq=1 ttl=64 time=0.533 ms
64 bytes from 192.168.1.12: seq=2 ttl=64 time=0.468 ms
64 bytes from 192.168.1.12: seq=3 ttl=64 time=0.503 ms
64 bytes from 192.168.1.12: seq=4 ttl=64 time=0.487 ms
64 bytes from 192.168.1.12: seq=5 ttl=64 time=0.510 ms
^C
--- 192.168.1.12 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.468/0.548/0.791 ms
Note : Use the working IP address of your LAN. Ping command is used to test net connectivity between two IP based devices. Here 192.168.1.12 is general IP address of server ip
To test the CAN Device functionality in Kernel.
CAN Phy should be mounted on Board.
P CAN-USB Adapter
CAN Adapter Driver , can-utils on host.
Boot the board from MMC.Due to size issue we are not providing can utils package for NOR flash,so please boot from SD card.
After booting,check the interface is available or not by giving the below command.
$ ifconfig can0
To Transmit packets from board to PC
Target side:
$ ip link set can0 down
$ ip link set can0 type can bitrate 50000
$ ip link set can0 up
$ cansend can0 123#1232
Host side:
$ sudo ip link set can0 down
$ sudo ip link set can0 type can bitrate 50000
$ sudo ip link set can0 up
$ candump can0
$ can0 123 [2] 12 32
To Transmit packets from PC to Board
Host side :
sudo ip link set can0 down
sudo ip link set can0 type can bitrate 50000
sudo ip link set can0 up
sudo cansend can0 123#1232
Target side :
ip link set can0 down
ip link set can0 type can bitrate 50000
ip link set can0 up
candump can0
can0 123 [2] 12 32
To Transmit packets from board to PC
Target side:
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# cansend can0 123#1232
Host side:
USER@ubuntudesk:~$ sudo ip link set can0 down
USER@ubuntudesk:~$ sudo ip link set can0 type can bitrate 50000
USER@ubuntudesk:~$ sudo ip link set can0 up
USER@ubuntudesk:~$ sudo candump can0
can0 123 [2] 12 32
To Transmit packets from PC to Board
Host side :
USER@ubuntudesk:~$ sudo ip link set can0 down
USER@ubuntudesk:~$ sudo ip link set can0 type can bitrate 50000
USER@ubuntudesk:~$ sudo ip link set can0 up
USER@ubuntudesk:~$ sudo cansend can0 123#1232
Target side:
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# candump can0
can0 123 [2] 12 32
Take 2 boards and Boot the boards from NOR/MMC.
After booting,check the interface is available or not by giving the below command.
$ ifconfig can0
Case1: Test the CAN through commands.
To Transmit packets from Board1 to Board2
Board1 side:
ip link set can0 down
ip link set can0 type can bitrate 50000
ip link set can0 up
cansend can0 123#1232
Board2 side:
ip link set can0 down
ip link set can0 type can bitrate 50000
ip link set can0 up
candump can0
can0 123 [2] 12 32
To Transmit packets from Board2 to Board1
Board2 side :
ip link set can0 down
ip link set can0 type can bitrate 50000
ip link set can0 up
cansend can0 123#1232
Board1 side :
ip link set can0 down
ip link set can0 type can bitrate 50000
ip link set can0 up
candump can0
can0 123 [2] 12 32
Case2: Test the CAN through the application
After booting,run the cansend application in board1 and canreceive in board2 and vice versa by using like below commands.
./cansend
./canrecv
Case1 :
To Transmit packets from Board1 to Board2
Board1 side:
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# cansend can0 123#1232
Board2 side:
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# candump can0
can0 123 [2] 12 32
To Transmit packets from Board2 to Board1
Board2 side :
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# cansend can0 123#1232
Board1 side :
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# candump can0
can0 123 [2] 12 32
Case2 :
To Transmit packets from Board1 to Board2
Board1 side :
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# ./cans
Can Send Test
can0 at index 2
Wrote 16 bytes
Board2 side :
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# ./canr
Can Recieve Test
can0 at index 2
Can frames recieved
<0x123> [2] 11 22
To Transmit packets from Board2 to Board1
Board1 side :
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# ./canr
Can Recieve Test
can0 at index 2
Can frames recieved
<0x123> [2] 11 22
Board2 side :
root@ruggedboard-a5d2x:~# ip link set can0 down
root@ruggedboard-a5d2x:~# ip link set can0 type can bitrate 50000
root@ruggedboard-a5d2x:~# ip link set can0 up
root@ruggedboard-a5d2x:~# ./cans
Can Send Test
can0 at index 2
Wrote 16 bytes
To test the digital input pin on the carrier board.
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
Patch card
Boot the board from NOR/MMC
Carrier board having 4 digital input pins on P5 connector.Fifth pin of P5 connector is ground.
After completion of board booting, connect the one end of patch card to first pin of P5 connector and other end to input voltage pin.
Give the below commands to test the digital inputs.
$ echo 84 > sys/class/gpio/export
$ echo in > /sys/class/gpio/PC20/direction
$ cat /sys/class/gpio/PC20/value
Remove the patch card and give the below command
$ cat /sys/class/gpio/PC20/value
The value of digital pin is changed one to zero.
Meanwhile we can check the rest of the digital pins on P5 connector.Please have a look on below expected output for all digital input pins on P5 connector.
root@ruggedboard-a5d2x:~# echo 84 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo in > /sys/class/gpio/PC20/direction
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC20/value
0
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC20/value
1
root@ruggedboard-a5d2x:~# echo 88 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo in > /sys/class/gpio/PC24/direction
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC24/value
1
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC24/value
0
root@ruggedboard-a5d2x:~# echo 79 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo in > /sys/class/gpio/PC15/direction
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC15/value
0
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC15/value
1
root@ruggedboard-a5d2x:~# echo 86 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo in > /sys/class/gpio/PC22/direction
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC22/value
1
root@ruggedboard-a5d2x:~# cat /sys/class/gpio/PC22/value
0
To test the digital output pins on carrier board
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
External LED
Boot the board from NOR/MMC
Carrier board having 4 digital outpins on P6 connector.Please refer the schematic to p6 connector pins.
After booting connect the External LED postive to 5th pin of P6 connector and other end to Ground.
Please give a below commands and observe the led status.
$echo 97 > /sys/class/gpio/export
$echo out > /sys/class/gpio/PD1/direction
$echo 1 > /sys/class/gpio/PD1/value
$echo 0 > /sys/class/gpio/PD1/value
Please have a look on below expected output for testing rest of gpios in P6 connector.
root@ruggedboard-a5d2x:~# echo 17 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PA17/direction
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PA17/value
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PA17/
root@ruggedboard-a5d2x:~# echo 14 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PA14/direction
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PA14value
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PA14/value
root@ruggedboard-a5d2x:~# echo 16 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PA16/direction
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PA16/value
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PA16/value
root@ruggedboard-a5d2x:~# echo 97 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PD1/direction
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PD1/value
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PD1/value
To test the SD card Port functionality in Kernel with SD card.
To test the SD card Port functionality in Kernel with SD card and read the data from SD card.
To test the SD card Port functionality in Kernel with SD card and write the data to SD card.
SD card.
SD card should be detected.
Boot the board from NOR/MMC. After booting or while booting insert the SD card into Board MMC slot, Check the Log file whether node is created or not.
Poky (Yocto Project Reference Distro) 2.5.2 ruggedboard-a5d2x /dev/ttyS0
ruggedboard-a5d2x login:
mmc1: Problem switching card into high-speed mode!
mmc1: new SDHC card at address 0001
mmcblk1: mmc1:0001 SD 7.44 GiB
mmcblk1: p1 p2
Boot the board from NOR/MMC. After booting or while booting insert the SD card into Board MMC slot, Check the Log file whether node is created or not.
Mount the SD-Card using the mount command.
$ mount /dev/mmcblkp1 /mnt/
root@ruggedboard-a5d2x:~# mount /dev/mmcblk1p1 /mnt/
FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@ruggedboard-a5d2x:~# cd /mnt/
root@ruggedboard-a5d2x:/mnt# ls
BOOT.BIN u-boot.bin
a5d2x-rugged_board.dtb zImage
at91-sama5d27_som1_ek.dtb read.c
root@ruggedboard-a5d2x:/mnt# vi read.c
Boot the board from NOR/MMC. After booting or while booting insert the SD card into Board MMC slot, Check the Log file whether node is creadted or not.
mount /dev/mmcblkp1 /mnt/
root@ruggedboard-a5d2x:~# mount /dev/mmcblk1p1 /mnt/
FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
root@ruggedboard-a5d2x:~# cd /mnt/
root@ruggedboard-a5d2x:/mnt# ls
BOOT.BIN u-boot.bin
a5d2x-rugged_board.dtb zImage
at91-sama5d27_som1_ek.dtb read.c
root@ruggedboard-a5d2x:/mnt# vi write.c
root@ruggedboard-a5d2x:/mnt# ls
BOOT.BIN u-boot.bin
a5d2x-rugged_board.dtb zImage
at91-sama5d27_som1_ek.dtb read.c
write.c
To test the ADC functionality with Potentio meter
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
Potentiometer
Boot the board from NOR/MMC. After board booting connect the Potentiometer signal pin to Analog signal pin.
Give the below command to read the digital value of ADC.
cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/
buffer/ in_voltage6-voltage7_raw
current_timestamp_clock in_voltage6_raw
dev in_voltage7_raw
in_voltage-voltage_scale in_voltage8-voltage9_raw
in_voltage0-voltage1_raw in_voltage8_raw
in_voltage0_raw in_voltage9_raw
in_voltage10-voltage11_raw in_voltage_scale
in_voltage10_raw name
in_voltage11_raw of_node/
in_voltage1_raw power/
in_voltage2-voltage3_raw sampling_frequency
in_voltage2_raw scan_elements/
in_voltage3_raw subsystem/
in_voltage4-voltage5_raw trigger/
in_voltage4_raw uevent
in_voltage5_raw
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
4095
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
3500
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
2337
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
1222
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
1094
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
878
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
779
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
671
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
173
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
73
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
33
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
28
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
18
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
0
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage6_raw
0
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
497
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage7_raw
493
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage8_raw
2452
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage8_raw
2449
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage8_raw
2453
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage9_raw
2389
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage9_raw
2385
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage9_raw
2386
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage10_ra
w
8
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage10_ra
w
13
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage10_ra
w
18
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage10_ra
w
19
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage11_ra
w
2463
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage11_ra
w
2461
root@ruggedboard-a5d2x:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage11_ra
w
2462
To test the debug console on carrier board.
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
Connect the USB cabel to board to PC.
Follow the RB-Quick start guide to set the minicom settings.
Please give the below commands to open the debug console in PC.
$ sudo minicom
U-Boot 2018.07-linux4sam_6.0-00025-g3bff827-dirty (Dec 02 2019 - 01:35:03 +0530)
CPU: SAMA5D27 512M bits DDR2 SDRAM
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
DRAM: 64 MiB
MMC: sdio-host@a0000000: 0, sdio-host@b0000000: 1
Loading Environment from SPI Flash... SF: Detected mx25l25645g with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Failed (-5)
In: serial@f8020000
Out: serial@f8020000
Err: serial@f8020000
Net: eth0: ethernet@f8008000
Hit any key to stop autoboot: 0
Unknown command 'console=ttyS0,115200' - try 'help'
SF: Detected mx25l25645g with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0xa6000, size 0x500000
SF: 5242880 bytes @ 0xa6000 Read: OK
device 0 offset 0x96000, size 0x10000
SF: 65536 bytes @ 0x96000 Read: OK
## Flattened Device Tree blob at 21000000
Booting using the fdt blob at 0x21000000
Loading Device Tree to 23b6b000, end 23b763d9 ... OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 4.9.151-linux4sam_5.8+-04814-g499d99b-dirty (ganesh@phytec) (gcc version 7.3.0 (GCC) ) #3 Wed Jan 29 16:06:33 IST 2020
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: RUGGED BOARD A5D2X
cma: Failed to reserve 64 MiB
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16240
Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mtdblock5 rw rootwait rootfstype=squashfs
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 54004K/65536K available (7168K kernel code, 215K rwdata, 1188K rodata, 1024K init, 220K bss, 11532K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0800000 (8160 kB)
.init : 0xc0a00000 - 0xc0b00000 (1024 kB)
.data : 0xc0b00000 - 0xc0b35fc8 ( 216 kB)
.bss : 0xc0b35fc8 - 0xc0b6d208 ( 221 kB)
NR_IRQS:16 nr_irqs:16 16
L2C-310 ID prefetch enabled, offset 2 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 128 kB
L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x36020000
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 11654027029 ns
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Console: colour dummy device 80x30
Calibrating delay loop... 326.86 BogoMIPS (lpj=1634304)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20100000 - 0x20100058
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
AT91: PM: standby: standby, suspend: ulp0
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 186464433812 ns
at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xc4883000
at_xdmac f0004000.dma-controller: 16 channels, mapped at 0xc4885000
AT91: Detected SoC family: sama5d2
AT91: Detected SoC: sama5d27c 64MB SiP, revision 2
VDDANA: supplied by VDDIN_3V3
advref: supplied by VDDANA
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
at91_i2c f8028000.i2c: could not find pctldev for node /ahb/apb/pinctrl@fc038000/i2c0_default, deferring probe
media: Linux media interface: v0.10
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
Bluetooth: Core ver 2.22
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=14 max_order=14 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 421, nTxLock = 3375
io scheduler noop registered (default)
pinctrl-at91-pio4 fc038000.pinctrl: atmel pinctrl initialized
[drm] Initialized
brd: module loaded
loop: module loaded
atmel_usart_serial.0.auto: ttyS1 at MMIO 0xf801c000 (irq = 33, base_baud = 5125000) is a ATMEL_SERIAL
atmel_usart_serial.1.auto: ttyS0 at MMIO 0xf8020000 (irq = 34, base_baud = 5125000) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart_serial.2.auto: ttyS2 at MMIO 0xf8024000 (irq = 35, base_baud = 5125000) is a ATMEL_SERIAL
atmel_usart_serial.3.auto: ttyS3 at MMIO 0xfc008000 (irq = 39, base_baud = 5125000) is a ATMEL_SERIAL
atmel_usart_serial.4.auto: ttyS4 at MMIO 0xfc00c000 (irq = 40, base_baud = 5125000) is a ATMEL_SERIAL
atmel_qspi f0024000.spi: mx25l25645g (32768 Kbytes)
7 ofpart partitions found on MTD device f0024000.spi
Creating 7 MTD partitions on "f0024000.spi":
0x000000000000-0x000000006000 : "at91bootstrap"
0x000000006000-0x000000016000 : "bootloader env"
0x000000016000-0x000000096000 : "bootloader"
0x000000096000-0x0000000a6000 : "device tree"
0x0000000a6000-0x0000005a6000 : "kernel"
0x0000005a6000-0x0000019a6000 : "rootfs"
0x0000019a6000-0x000002000000 : "data"
atmel_spi fc018400.spi: DMA TX channel not available, SPI unable to use DMA
atmel_spi fc018400.spi: Atmel SPI Controller using PIO only
atmel_spi fc018400.spi: Using FIFO (16 data)
atmel_spi fc018400.spi: Atmel SPI Controller version 0x311 at 0xfc018400 (irq 178)
libphy: Fixed MDIO Bus: probed
CAN device driver interface
m_can fc050000.can: m_can device registered (irq=48, version=31)
libphy: MACB_mii_bus: probed
random: fast init done
Micrel KSZ8081 or KSZ8091 f8008000.ethernet-ffffffff:07: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f8008000.ethernet-f)
macb f8008000.ethernet eth0: Cadence GEM rev 0x00020203 at 0xf8008000 irq 28 (80:1f:12:4e:24:9e)
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver sierra_net
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver qmi_wwan
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci 400000.ohci: USB Host Controller
at91_ohci 400000.ohci: new USB bus registered, assigned bus number 1
at91_ohci 400000.ohci: irq 18, io mem 0x00400000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: USB Host Controller
usb usb1: Manufacturer: Linux 4.9.151-linux4sam_5.8+-04814-g499d99b-dirty ohci_hcd
usb usb1: SerialNumber: at91
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
usbcore: registered new interface driver qcaux
usbserial: USB Serial support registered for qcaux
usbcore: registered new interface driver qcserial
usbserial: USB Serial support registered for Qualcomm USB modem
rtc rtc0: invalid alarm value: 1900-1-1 0:0:0
at91_rtc f80480b0.rtc: rtc core: registered f80480b0.rtc as rtc0
at91_rtc f80480b0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
AT91: Starting after general reset
sama5d4_wdt f8048040.watchdog: initialized (timeout = 16 sec, nowayout = 0)
usbcore: registered new interface driver bfusb
usbcore: registered new interface driver btusb
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-at91 a0000000.sdio-host: update clk mul to 39 as gck rate is 480000000 Hz
mmc0: SDHCI controller on a0000000.sdio-host [a0000000.sdio-host] using ADMA
sdhci-at91 b0000000.sdio-host: update clk mul to 39 as gck rate is 480000000 Hz
mmc1: SDHCI controller on b0000000.sdio-host [b0000000.sdio-host] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
atmel_aes f002c000.aes: version: 0x500
atmel_aes f002c000.aes: Atmel AES - Using dma0chan0, dma0chan1 for DMA transfers
atmel_sha f0028000.sha: version: 0x510
atmel_sha f0028000.sha: using dma0chan2 for DMA transfers
atmel_sha f0028000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
atmel_tdes fc044000.tdes: version: 0x703
atmel_tdes fc044000.tdes: using dma0chan3, dma0chan4 for DMA transfers
atmel_tdes fc044000.tdes: Atmel DES/TDES
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
at91-sama5d2_adc fc030000.adc: setting up trigger as external_rising
at91-sama5d2_adc fc030000.adc: version: 800
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20161123 t)
can: netlink gateway (rev 20130117) max_hops=1
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Bluetooth: HIDP socket layer initialized
at91_i2c f8028000.i2c: can't get DMA channel, continue without DMA support
at91_i2c f8028000.i2c: Using FIFO (16 data)
at24 0-0050: 256 byte 24c02 EEPROM, writable, 8 bytes/write
at91_i2c f8028000.i2c: AT91 i2c bus driver (hw version: 0x704).
at91_rtc f80480b0.rtc: setting system clock to 2012-01-01 00:00:10 UTC (1325376010)
ALSA device list:
No soundcards found.
atmel_usart_serial atmel_usart_serial.1.auto: using dma0chan5 for rx DMA transfers
atmel_usart_serial atmel_usart_serial.1.auto: using dma0chan6 for tx DMA transfers
VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
starting pid 112, tty '': '/bin/mount -t proc proc /proc'
starting pid 113, tty '': '/bin/mount -t sysfs sysfs /sys'
starting pid 114, tty '': '/bin/mount -t devtmpfs devtmpfs /dev'
mount: mounting devtmpfs on /dev failed: Resource busy
starting pid 115, tty '': '/bin/mount -o remount,rw /'
starting pid 116, tty '': '/bin/mkdir -p /dev/pts'
starting pid 117, tty '': '/bin/mount -t devpts devpts /dev/pts'
starting pid 118, tty '': '/bin/mount -a'
starting pid 119, tty '': '/etc/init.d/rcS'
starting pid 123, tty '/dev/ttyS0': '/sbin/getty 115200 ttyS0'
Poky (Yocto Project Reference Distro) 2.5.2 ruggedboard /dev/ttyS0
ruggedboard login: root
-sh: command: not found
root@ruggedboard:~#
root@ruggedboard:~#
root@ruggedboard:~#
root@ruggedboard:~#
To test the Expansion Header GPIOs functionality in Kernel whether they are toggling.
External LED.
External LED should glow.
Boot the board from NOR/MMC. After booting check whether Expansion Header GPIOs are toggling or not.
$ echo <gpiono> sys/class/gpio/export
$ echo out > /sys/class/gpio/<gpiopinno>/direction
$ echo 1 > /sys/class/gpio/<gpiopinno>/value
$ echo 0 > /sys/class/gpio/<gpiopinno>/value
root@ruggedboard-a5d2x
root@ruggedboard-a5d2x:~# echo 115 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PD19/direction
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PD19/value
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PD19/value
root@ruggedboard-a5d2x:~# echo 116 > /sys/class/gpio/export
root@ruggedboard-a5d2x:~# echo out > /sys/class/gpio/PD20/direction
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/gpio/PD20/value
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/gpio/PD20/value
To test the mini pcie connector on the carrier board.
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
PCIE Module
Boot the board from NOR/MMC. After booting insert the mPCIe module to the mPCIe connector.
After inserting module ,log will appear on shell.Please have a look on below expected output.
root@ruggedboard-a5d2x:~# usb 1-2: new full-speed USB device number 2 using at91_ohci
|usb 1-2: config 1 has an invalid interface number: 8 but max is 3
usb 1-2: config 1 has no interface number 1
usb 1-2: New USB device found, idVendor=1199, idProduct=68c0
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: Sierra Wireless WP7608
usb 1-2: Manufacturer: Sierra Wireless, Incorporated
usb 1-2: SerialNumber: XG85120024011021
qcserial 1-2:1.0: Qualcomm USB modem converter detected
usb 1-2: Qualcomm USB modem converter now attached to ttyUSB0
qcserial 1-2:1.2: Qualcomm USB modem converter detected
usb 1-2: Qualcomm USB modem converter now attached to ttyUSB1
qcserial 1-2:1.3: Qualcomm USB modem converter detected
usb 1-2: Qualcomm USB modem converter now attached to ttyUSB2
qmi_wwan 1-2:1.8: cdc-wdm0: USB WDM device
qmi_wwan 1-2:1.8 wwan0: register 'qmi_wwan' at usb-at91-2, WWAN/QMI device, 9a:c1:df:e1:6f:18
To test the PWM functionality in Kernel with External LED.
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
External LED
Boot the board from NOR/MMC.
Please connect the positive pin of LED to the 16 th pin of the M1 connector.And connect the other pin of led to ground.
Give the below commands the and observe the brightness of LED pin.
$echo 0 > /sys/class/pwm/pwmchip0/export
$echo 50000 > /sys/class/pwm/pwmchip0/pwm0/period
$echo 4000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
$echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
$echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable
root@ruggedboard-a5d2x:~# cat /sys/class/pwm/pwmchip0/npwm
4
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/pwm/pwmchip0/export
root@ruggedboard-a5d2x:~# cat /sys/class/pwm/pwmchip0/pwm0/polarity
normal
root@ruggedboard-a5d2x:~# echo 50000 > /sys/class/pwm/pwmchip0/pwm0/period
root@ruggedboard-a5d2x:~# echo 4000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
root@ruggedboard-a5d2x:~# echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable
root@ruggedboard-a5d2x:~# echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
To test the reset switch in carrier board.
phyCORE-A5d2x System on Module
phyCORE-A5d2 Rugged Board
USB cable
Boot the board from NOR/MMC.
After completion of board booting press the reset switch.
Please check the board is whether reboot or not.
U-Boot 2018.07-linux4sam_6.0-00025-g3bff827-dirty (Dec 02 2019 - 01:35:03 +0530)
CPU: SAMA5D27 512M bits DDR2 SDRAM
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
DRAM: 64 MiB
MMC: sdio-host@a0000000: 0, sdio-host@b0000000: 1
Loading Environment from SPI Flash... SF: Detected mx25l25645g with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
Failed (-5)
In: serial@f8020000
Out: serial@f8020000
Err: serial@f8020000
Net: eth0: ethernet@f8008000
Hit any key to stop autoboot: 0
Unknown command 'console=ttyS0,115200' - try 'help'
SF: Detected mx25l25645g with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0xa6000, size 0x500000
SF: 5242880 bytes @ 0xa6000 Read: OK
device 0 offset 0x96000, size 0x10000
SF: 65536 bytes @ 0x96000 Read: OK
## Flattened Device Tree blob at 21000000
Booting using the fdt blob at 0x21000000
Loading Device Tree to 23b6b000, end 23b763d9 ... OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 4.9.151-linux4sam_5.8+-04814-g499d99b-dirty (ganesh@phytec) (gcc version 7.3.0 (GCC) ) #3 Wed Jan 29 16:06:33 IST 2020
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: RUGGED BOARD A5D2X
cma: Failed to reserve 64 MiB
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16240
Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mtdblock5 rw rootwait rootfstype=squashfs
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 54004K/65536K available (7168K kernel code, 215K rwdata, 1188K rodata, 1024K init, 220K bss, 11532K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0800000 (8160 kB)
.init : 0xc0a00000 - 0xc0b00000 (1024 kB)
.data : 0xc0b00000 - 0xc0b35fc8 ( 216 kB)
.bss : 0xc0b35fc8 - 0xc0b6d208 ( 221 kB)
NR_IRQS:16 nr_irqs:16 16
L2C-310 ID prefetch enabled, offset 2 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 128 kB
L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x36020000
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 11654027029 ns
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Console: colour dummy device 80x30
Calibrating delay loop... 326.86 BogoMIPS (lpj=1634304)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20100000 - 0x20100058
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
AT91: PM: standby: standby, suspend: ulp0
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 186464433812 ns
at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xc4883000
at_xdmac f0004000.dma-controller: 16 channels, mapped at 0xc4885000
AT91: Detected SoC family: sama5d2
AT91: Detected SoC: sama5d27c 64MB SiP, revision 2
VDDANA: supplied by VDDIN_3V3
advref: supplied by VDDANA
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
at91_i2c f8028000.i2c: could not find pctldev for node /ahb/apb/pinctrl@fc038000/i2c0_default, deferring probe
media: Linux media interface: v0.10
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
Bluetooth: Core ver 2.22
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=14 max_order=14 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 421, nTxLock = 3375
io scheduler noop registered (default)
pinctrl-at91-pio4 fc038000.pinctrl: atmel pinctrl initialized
[drm] Initialized
brd: module loaded
loop: module loaded
atmel_usart_serial.0.auto: ttyS1 at MMIO 0xf801c000 (irq = 33, base_baud = 5125000) is a ATMEL_SERIAL
atmel_usart_serial.1.auto: ttyS0 at MMIO 0xf8020000 (irq = 34, base_baud = 5125000) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart_serial.2.auto: ttyS2 at MMIO 0xf8024000 (irq = 35, base_baud = 5125000) is a ATMEL_SERIAL
atmel_usart_serial.3.auto: ttyS3 at MMIO 0xfc008000 (irq = 39, base_baud = 5125000) is a ATMEL_SERIAL
atmel_usart_serial.4.auto: ttyS4 at MMIO 0xfc00c000 (irq = 40, base_baud = 5125000) is a ATMEL_SERIAL
atmel_qspi f0024000.spi: mx25l25645g (32768 Kbytes)
7 ofpart partitions found on MTD device f0024000.spi
Creating 7 MTD partitions on "f0024000.spi":
0x000000000000-0x000000006000 : "at91bootstrap"
0x000000006000-0x000000016000 : "bootloader env"
0x000000016000-0x000000096000 : "bootloader"
0x000000096000-0x0000000a6000 : "device tree"
0x0000000a6000-0x0000005a6000 : "kernel"
0x0000005a6000-0x0000019a6000 : "rootfs"
0x0000019a6000-0x000002000000 : "data"
atmel_spi fc018400.spi: DMA TX channel not available, SPI unable to use DMA
atmel_spi fc018400.spi: Atmel SPI Controller using PIO only
atmel_spi fc018400.spi: Using FIFO (16 data)
atmel_spi fc018400.spi: Atmel SPI Controller version 0x311 at 0xfc018400 (irq 178)
libphy: Fixed MDIO Bus: probed
CAN device driver interface
m_can fc050000.can: m_can device registered (irq=48, version=31)
libphy: MACB_mii_bus: probed
random: fast init done
Micrel KSZ8081 or KSZ8091 f8008000.ethernet-ffffffff:07: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f8008000.ethernet-f)
macb f8008000.ethernet eth0: Cadence GEM rev 0x00020203 at 0xf8008000 irq 28 (80:1f:12:4e:24:9e)
usbcore: registered new interface driver asix
usbcore: registered new interface driver ax88179_178a
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
usbcore: registered new interface driver sierra_net
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver qmi_wwan
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver