在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

電子發燒友App

硬聲App

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示
電子發燒友網>電子資料下載>類型>參考設計>ADF7242網絡MAC802154 Linux Drever

ADF7242網絡MAC802154 Linux Drever

2021-04-22 | pdf | 169.61KB | 次下載 | 2積分

資料介紹

This version (04 Feb 2021 15:40) was approved by Michael Hennerich.The Previously approved version (19 Jan 2018 10:28) is available.Diff

ADF7242 Network MAC802154 Linux Driver

Supported Devices

Evaluation Boards

Description

Product Details

The low cost and small profile RF solution 2.4GHz, 802.15.4/Proprietary Wireless Transceiver PMOD board (EVAL-ADF7242-PMDZ) is designed to support RF to FPGA or processor applications system that utilizes PMOD-compatible expansion ports configurable for SPI communication (PACKET MODE). For applications that require data streaming, a synchronous bidirectional serial port (SPORT) interface is also available. The Wireless Transceiver PMOD board can be selectively configured to operate on the 2400 MHz to 2483.5 MHz ISM band. This uses single chip ADF7242 2.4Ghz transceiver, with most of the system blocks embedded on chip, and minimizing eternal RF components .

The Wireless Transceiver PMOD board uses mini 2.4Ghz Chip Antennas. In conjunction with the impedance-matched (complex differential impedance value) filter balun, reduces the RF front end count. This PMOD board supports polarization diversity that uses two chip antennas which can greatly improve performance under multipath fading conditions.

Refer to the ADF7242 IC data sheet for detailed information regarding operation of the device.


21 Jan 2015 00:50 · Glaizel Arinuelo

Source Code

Status

Source Mainlined?
git Yes

Files

Function File
driver adf7242.c
include adf7242.h

Firmware for Automatic IEEE 802.15.4 Operating Modes (AN-1082)

Below you can find a simple command line tool that was used to convert the original firmware HEX file into binary format consumed by the ADF7242 Linux device driver.

Example platform device initialization

For compile time configuration, it’s common Linux practice to keep board- and application-specific configuration out of the main driver file, instead putting it into the board support file.

For devices on custom boards, as typical of embedded and SoC-(system-on-chip) based hardware, Linux uses platform_data to point to board-specific structures describing devices and how they are connected to the SoC. This can include available ports, chip variants, preferred modes, default initialization, additional pin roles, and so on. This shrinks the board-support packages (BSPs) and minimizes board and application specific #ifdefs in drivers.

21 Oct 2010 16:10

Example Platform / Board file

Declaring SPI slave devices

Unlike PCI or USB devices, SPI devices are not enumerated at the hardware level. Instead, the software must know which devices are connected on each SPI bus segment, and what slave selects these devices are using. For this reason, the kernel code must instantiate SPI devices explicitly. The most common method is to declare the SPI devices by bus number.

This method is appropriate when the SPI bus is a system bus, as in many embedded systems, wherein each SPI bus has a number which is known in advance. It is thus possible to pre-declare the SPI devices that inhabit this bus. This is done with an array of struct spi_board_info, which is registered by calling spi_register_board_info().

For more information see: Documentation/spi/spi-summary

21 Oct 2010 16:10
#include 
?
static const struct adf7242_platform_data adf7242_pdata = {
?
	.mode = ADF_IEEE802154_AUTO_CSMA_CA | ADF_IEEE802154_HW_AACK,
/*
 * Specifies number of attempts to
 * retransmit unacknowledged
 * frames while in automatic CSMA-CA 
 * Tx mode.
 */
	.max_frame_retries = 4,
/*
 * Specifies number of attempts to
 * repeat CSMA-CA algorithm prior to
 * cancellation of RC_TX command.
 * Valid range is 0 to 5; 
 * 7: CSMA-CA algorithm is off
 */
	.max_cca_retries = 4,
/* 
 * Specifies the maximum back-off
 * exponent used in the CSMA-CA
 * algorithm; valid range is 4 to 8
 * 
 */
	.max_csma_be = 6,
/*
 * Specifies the minimum back-off
 * exponent used in the CSMA-CA
 * algorithm; valid range is 0 to
 * csma_max_be
 */
	.min_csma_be = 1,
};
static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_IEEE802154_ADF7242) || defined(CONFIG_IEEE802154_ADF7242_MODULE)
	{
		.modalias = "adf7242",
		.max_speed_hz = 10000000,     /* max spi clock (SCK) speed in HZ */
		.irq = IRQ_PF6,
		.bus_num = 0,
		.chip_select = 0,	/* GPIO controlled SSEL */
		.controller_data = &adf7242_spi_chip_info, /* Blackfin only */
		.platform_data = &adf7242_pdata,
		.mode = SPI_MODE_0,
	},
#endif
};

Alternatively, it is possible to declare the SPI devices from a DeviceTree file.
Read the documentation for more details.

Example:

adf7242@0 {
	compatible = "adi,adf7242";
	reg = <0>;
	spi-max-frequency = <10000000>;
	interrupts = <0x62 IRQ_TYPE_LEVEL_HIGH>;

	adi,hw-aack-mode-enable;
	adi,auto-csma-ca-mode-enable;
};

Adding Linux driver support

Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)

The ADF7242 Driver depends on CONFIG_SPI and CONFIG_IEEE802154

------------------- Linux Kernel Configuration ----------------------

  [*] Networking support  --->
       Networking options  --->
         <*> IEEE Std 802.15.4 Low-Rate Wireless Personal Area Networks support
            <*>   Generic IEEE 802.15.4 Soft Networking Stack (mac802154)

  [*] Device drivers  --->
       [*] Network device support  --->
          --- Network device support
          [*]   Ethernet (10 or 100Mbit)  --->
          <*>   IEEE 802.15.4 drivers  --->
     	      --- IEEE 802.15.4 drivers
                  ADF7242 transceiver driver

Hardware configuration

Interface Connector Signal Description



21 Jan 2015 00:50 · Glaizel Arinuelo

Driver testing

On this demo network, we will have two different boards communicating with each other using ADF7242 modules: a Raspberry Pi and a ZedBoard.

Userspace tools for Linux IEEE 802.15.4 stack

lowpan-tools are deprecated please use linux-wpan tools available here: linux-wpan

Example using lowpan-tools

iwpan dev wpan0 set pan_id 0x777
iwpan phy phy0 set channel 0 11
iwpan dev wpan0 set ackreq_default 1
ifconfig wpan0 up 
ip link add link wpan0 name lowpan0 type lowpan
ip route add 2001::/64 dev lowpan0
ip addr add  2001::4/128 dev lowpan0
ifconfig lowpan0 up

Configuration of the IEEE 802.15.4 layer

We will configure the two devices to use the PAN ID 0x0777, the hardware addresses a0::1 and a0::2, and the short addresses 0x8001 and 0x8002.

Then, we will give them IPv6 addresses and test 6loWPAN communication with standard GNU tools.

Configuration for the first node (ZedBoard)

root:/> HW_ADDR="a0:0:0:0:0:0:0:1"
root:/> DEVICE_ADDR=8001 # hexadecimal
root:/> PAN_ID=777 # hexadecimal
root:/> CHANNEL=11
root:/>
root:/> iz add wpan-phy0
Registered new device ('wpan0') on phy wpan-phy0

root:/> ip link set wpan0 address ${HW_ADDR}
root:/> ifconfig wpan0 up

root:/> iz set wpan0 ${PAN_ID} ${DEVICE_ADDR} ${CHANNEL}

Configuration for the second node (Raspberry Pi)

We only need to change the first two lines:

root:/> HW_ADDR="a0:0:0:0:0:0:0:2"
root:/> DEVICE_ADDR=8002 # hexadecimal
root:/> PAN_ID=777 # hexadecimal
root:/> CHANNEL=11
root:/>
root:/> iz add wpan-phy0
Registered new device ('wpan0') on phy wpan-phy0

root:/> ip link set wpan0 address ${HW_ADDR}
root:/> ifconfig wpan0 up

root:/> iz set wpan0 ${PAN_ID} ${DEVICE_ADDR} ${CHANNEL}

Some GNU/Linux distributions offered on the Raspberry Pi, like Raspbian, will auto-enable the wpan0 interface as soon as it is created. We can disable this behaviour with the following command:

root:/> ifplugd -S -i wpan0 && ifconfig wpan0 down

Chat application

Now that our two devices are correctly configured, we can verify that the two devices can communicate using the “izchat” application:

ZedBoard:

root:/> izchat 0x0777 0x8001 0x8002
Hello World!
>Thanks 

Raspberry Pi:

root:/> izchat 0x0777 0x8002 0x8001
>Hello World!
Thanks

This is a pretty simple two way communication. The ASCII strings are encapsulated in IEEE802.15.4 DATA frames.

Configuration of the 6loWPAN layer

The previous example shows that communication is working, but it is not very useful. By using the 6loWPAN protocol on top (the low-power equivalent of the IPv6 protocol), we can allow standard Linux network applications to communicate over the IEEE 802.15.4 link with standard sockets.

Configuration for the first node (ZedBoard)

root:/> HW_ADDR="a0:0:0:0:0:0:0:1" # Same as before
root:/> IPV6_ADDR="2001::1/128"
root:/>
root:/> ip link add link wpan0 name lowpan0 type lowpan
root:/> ip link set lowpan0 address ${HW_ADDR}
root:/>
root:/> ip addr add ${IPV6_ADDR} dev lowpan0
root:/> ip route add 2001::/64 dev lowpan0

Configuration for the second node (Raspberry Pi)

root:/> HW_ADDR="a0:0:0:0:0:0:0:2" # Same as before
root:/> IPV6_ADDR="2001::2/128"
root:/>
root:/> ip link add link wpan0 name lowpan0 type lowpan
root:/> ip link set lowpan0 address ${HW_ADDR}
root:/>
root:/> ip addr add ${IPV6_ADDR} dev lowpan0
root:/> ip route add 2001::/64 dev lowpan0

Some GNU/Linux distributions offered on the Raspberry Pi, like Raspbian, will auto-enable the lowpan0 interface as soon as it is created. We can disable this behaviour with the following command:

root:/> ifplugd -S -i lowpan0 && ifconfig lowpan0 down

Testing the communication

Ping!

From the Raspberry Pi, we can now ping the ZedBoard at the address fe80::a200:0:0:1%lowpan0:

root@analog:~# ping6 -i0.1 2001::3
PING 2001::3(2001::3) 56 data bytes
64 bytes from 2001::3: icmp_seq=1 ttl=64 time=44.8 ms
64 bytes from 2001::3: icmp_seq=2 ttl=64 time=39.9 ms
64 bytes from 2001::3: icmp_seq=3 ttl=64 time=44.0 ms
64 bytes from 2001::3: icmp_seq=4 ttl=64 time=36.5 ms
64 bytes from 2001::3: icmp_seq=5 ttl=64 time=45.6 ms
64 bytes from 2001::3: icmp_seq=6 ttl=64 time=49.1 ms
64 bytes from 2001::3: icmp_seq=7 ttl=64 time=42.1 ms
64 bytes from 2001::3: icmp_seq=8 ttl=64 time=34.2 ms
64 bytes from 2001::3: icmp_seq=9 ttl=64 time=35.0 ms
64 bytes from 2001::3: icmp_seq=10 ttl=64 time=33.1 ms
64 bytes from 2001::3: icmp_seq=11 ttl=64 time=46.6 ms
64 bytes from 2001::3: icmp_seq=12 ttl=64 time=28.8 ms
64 bytes from 2001::3: icmp_seq=13 ttl=64 time=43.0 ms
64 bytes from 2001::3: icmp_seq=14 ttl=64 time=38.6 ms
64 bytes from 2001::3: icmp_seq=15 ttl=64 time=41.1 ms
64 bytes from 2001::3: icmp_seq=16 ttl=64 time=40.3 ms
64 bytes from 2001::3: icmp_seq=17 ttl=64 time=45.6 ms
64 bytes from 2001::3: icmp_seq=18 ttl=64 time=53.3 ms
64 bytes from 2001::3: icmp_seq=19 ttl=64 time=51.6 ms
64 bytes from 2001::3: icmp_seq=20 ttl=64 time=26.6 ms
64 bytes from 2001::3: icmp_seq=21 ttl=64 time=42.3 ms
64 bytes from 2001::3: icmp_seq=22 ttl=64 time=32.7 ms
64 bytes from 2001::3: icmp_seq=23 ttl=64 time=50.0 ms
^C
--- 2001::3 ping statistics ---
23 packets transmitted, 23 received, 0% packet loss, time 2210ms
rtt min/avg/max/mdev = 26.622/41.122/53.348/6.945 ms
root@analog:~# 

We can as well ping the Raspberry Pi from the Zedboard using the address fe80::a200:0:0:2%lowpan0.

Standard tools

The following is just to demonstrate that any Linux program can, using standard sockets, communicate over the IEEE 802.15.4 link with 6loWPAN:

root@raspberrypi:/> ssh -6 analog@fe80::a200:0:0:1%lowpan0
analog@fe80::a200:0:0:1%lowpan0's password: 
Welcome to Linaro 14.04 (GNU/Linux 3.18.0-33199-g62cfd65-dirty armv7l)

Last login: Thu Jan  1 00:02:21 1970 from fe80::a200:0:0:2%lowpan0

root@analog:/>
下載該資料的人也在下載 下載該資料的人還在閱讀
更多 >

評論

查看更多

下載排行

本周

  1. 1AN-1267: 使用ADSP-CM408F ADC控制器的電機控制反饋采樣時序
  2. 1.41MB   |  3次下載  |  免費
  3. 2AN158 GD32VW553 Wi-Fi開發指南
  4. 1.51MB   |  2次下載  |  免費
  5. 3AN148 GD32VW553射頻硬件開發指南
  6. 2.07MB   |  1次下載  |  免費
  7. 4AN-1154: 采用恒定負滲漏電流優化ADF4157和ADF4158 PLL的相位噪聲和雜散性能
  8. 199.28KB   |  次下載  |  免費
  9. 5AN-960: RS-485/RS-422電路實施指南
  10. 380.8KB   |  次下載  |  免費
  11. 6EE-249:使用VisualDSP在ADSP-218x DSP上實現軟件疊加
  12. 60.02KB   |  次下載  |  免費
  13. 7AN-1111: 使用ADuCM360/ADuCM361時的降低功耗選項
  14. 306.09KB   |  次下載  |  免費
  15. 8AN-904: ADuC7028評估板參考指南
  16. 815.82KB   |  次下載  |  免費

本月

  1. 1ADI高性能電源管理解決方案
  2. 2.43 MB   |  450次下載  |  免費
  3. 2免費開源CC3D飛控資料(電路圖&PCB源文件、BOM、
  4. 5.67 MB   |  138次下載  |  1 積分
  5. 3基于STM32單片機智能手環心率計步器體溫顯示設計
  6. 0.10 MB   |  130次下載  |  免費
  7. 4使用單片機實現七人表決器的程序和仿真資料免費下載
  8. 2.96 MB   |  44次下載  |  免費
  9. 5美的電磁爐維修手冊大全
  10. 1.56 MB   |  24次下載  |  5 積分
  11. 6如何正確測試電源的紋波
  12. 0.36 MB   |  18次下載  |  免費
  13. 7感應筆電路圖
  14. 0.06 MB   |  10次下載  |  免費
  15. 8萬用表UT58A原理圖
  16. 0.09 MB   |  9次下載  |  5 積分

總榜

  1. 1matlab軟件下載入口
  2. 未知  |  935121次下載  |  10 積分
  3. 2開源硬件-PMP21529.1-4 開關降壓/升壓雙向直流/直流轉換器 PCB layout 設計
  4. 1.48MB  |  420062次下載  |  10 積分
  5. 3Altium DXP2002下載入口
  6. 未知  |  233088次下載  |  10 積分
  7. 4電路仿真軟件multisim 10.0免費下載
  8. 340992  |  191367次下載  |  10 積分
  9. 5十天學會AVR單片機與C語言視頻教程 下載
  10. 158M  |  183335次下載  |  10 積分
  11. 6labview8.5下載
  12. 未知  |  81581次下載  |  10 積分
  13. 7Keil工具MDK-Arm免費下載
  14. 0.02 MB  |  73810次下載  |  10 積分
  15. 8LabVIEW 8.6下載
  16. 未知  |  65988次下載  |  10 積分
主站蜘蛛池模板: 天天操天天操 | 天天干夜夜噜 | 午夜在线播放视频 | 国产亚洲欧美视频 | 亚洲高清一区二区三区 | 老司机亚洲精品影院在线 | 亚洲欧美国产视频 | 国产黄视频在线观看 | 小雪被老外黑人撑破了 | 激情网婷婷 | 夜夜精品视频一区二区 | 在线免费视频国产 | 福利午夜 | 狠狠色噜噜狠狠狠97影音先锋 | 欧美色图中文字幕 | 激情五月激情综合色区 | 亚洲黄色性视频 | 狠狠干狠狠干狠狠干 | 午夜看片网站 | 天天干天天射天天爽 | 中文字幕在线视频第一页 | 色爱区综合激情五月综合色 | 黄的三级在线播放 | 49pao强力免费打造在线高清 | 日本黄色片在线播放 | 四虎影视永久在线 yin56xyz | freesex性woman欧美 | 狠狠干天天操 | 日本在线一级 | 99热免费| 欧洲三级网站 | 日韩毛片视频 | 精品国产一二三区在线影院 | 欧美性喷潮xxxx | 起碰成人免费公开网视频 | 一级片在线播放 | 人人艹人人射 | 免费黄色在线观看 | 一日本道加勒比高清一二三 | 狠狠色狠狠色综合日日小蛇 | 天天操天天射天天色 |