Presentation is loading. Please wait.

Presentation is loading. Please wait.

WIFI design Guide based PW620-I 802.11b/g ----Hardware section Orin.Zhu August 31 st, 2007.

Similar presentations


Presentation on theme: "WIFI design Guide based PW620-I 802.11b/g ----Hardware section Orin.Zhu August 31 st, 2007."— Presentation transcript:

1 WIFI design Guide based PW620-I 802.11b/g ----Hardware section Orin.Zhu E-mail: orinzhu@163.comorinzhu@163.com August 31 st, 2007

2 PW620-I Block Diagram Front-End Module PA,SW,Balun,Passive BPF(2.45G) 3.1V~4.5V Energy Management Unit (EMU) RF ZIF Section RF Up/Down Converter Baseband Filters High Speed Data Conversion Baseband Processor OFDM/CCK Modulation ARM9 WEP MAC Baseband & MAC SPI I/F BT I/F 3.0V~5.5V1.62V~1.90V40MHz 1.85V EEPROM

3 System Block i.MX21 PW620-I WIFI 802.11b/g SPI1 3.3V TXB0108 1.8V to 3.3V Level translator SPI 1.8V LDO(MIC5318-1.8) 3.7V to 1.8V 300mA LDO(MIC5318-3.3) 3.7V to 3.3V 300mA 40MHz, 1.8V,<=20ppm Clock Oscillator

4 SPI timing Configure—4 wire mode i.MX21 PW620-I MSB first, POL=0, PHA =0, CLK=24MHz, IRQ active high, rising edge triggered IRQ

5 4-wire SPI mode with IRQ J7I/OActive Pin 2SPI_IRQOHigh Pin 3SPI_CLKI Pin 4SPI_CS#I Pin 5SPI_MISOO Pin 6SPI_MOSII

6 SPI functions needed by MX21 extern void ssa_spi_reset_drive_low (void); extern void ssa_spi_reset_drive_high (void); extern int ssa_spi_get_irq (void); extern int ssa_spi_init (void); extern unsigned int ssa_spi_read_single8 (void); extern unsigned int ssa_spi_write_single8 (unsigned char value); extern unsigned int ssa_spi_read_single16 (void); extern unsigned int ssa_spi_write_single16 (unsigned short value); extern unsigned int ssa_spi_read_multi (unsigned char *dst, unsigned int count); extern unsigned int ssa_spi_write_multi (unsigned char *src, unsigned int count); For more details info about how to porting in Mx21, contact me.

7 PCB Outline view Cell Area Multi Area for PCB & SMT Note: For connection among boards, use the stamp holes(2mm length) For panel, use four mark & mount holes.

8 PCB parameters requirements Stack layer: TOP  VCC  GND  BOTTOM Board impendance: 60ohm +/- 5% Thinkness: 2mm Material: FR-4

9 Software Section

10 SPI registers in CX53121 #define SPI_ADRS_ARM_INTERRUPTS 0x00 #define SPI_ADRS_ARM_INT_EN 0x04 #define SPI_ADRS_HOST_INTERRUPTS 0x08 #define SPI_ADRS_HOST_INT_EN 0x0c #define SPI_ADRS_HOST_INT_ACK 0x10 #define SPI_ADRS_GEN_PURP_1 0x14 #define SPI_ADRS_GEN_PURP_2 0x18 #define SPI_ADRS_DEV_CTRL_STAT 0x26 // high word #define SPI_ADRS_DMA_DATA 0x28 #define SPI_ADRS_DMA_WRITE_CTRL 0x2c #define SPI_ADRS_DMA_WRITE_LEN 0x2e #define SPI_ADRS_DMA_WRITE_BASE 0x30 #define SPI_ADRS_DMA_READ_CTRL 0x34 #define SPI_ADRS_DMA_READ_LEN 0x36 #define SPI_ADRS_DMA_READ_BASE 0x38 #define SPI_CTRL_STAT_HOST_OVERRIDE 0x8000 #define SPI_CTRL_STAT_START_HALTED 0x4000 #define SPI_CTRL_STAT_RAM_BOOT 0x2000 #define SPI_CTRL_STAT_HOST_RESET 0x1000 #define SPI_CTRL_STAT_HOST_CPU_EN 0x0800 #define SPI_DMA_WRITE_CTRL_ENABLE 0x0001 #define SPI_DMA_READ_CTRL_ENABLE 0x0001

11 SPI registers in CX53121 #define FIRMWARE_FILE "/etc/isl3825.arm" #define FIRMWARE_ADDRESS 0x20000 #define PDA_FILE "/etc/pda.bin" #define SPI_MAX_PDA_SIZE 2560 #define SPI_TIMEOUT 100 /* msec */ #define SPI_MAX_RX_PACKETS 32 #define SPI_MAX_TX_PACKETS 32 #define SPI_MAX_PACKET_SIZE 3600 #define SPI_TARGET_INT_WAKEUP 0x00000001 #define SPI_TARGET_INT_SLEEP 0x00000002 #define SPI_TARGET_INT_RDDONE 0x00000004 #define SPI_TARGET_INT_CTS 0x00004000// clear to send #define SPI_HOST_INT_READY 0x00000001 #define SPI_HOST_INT_UPDATE 0x10000000 #define SPI_HOST_INT_SW_UPDATE 0x00000004 #define SPI_HOST_INT_WR_READY 0x00000002 #define SPI_HOST_INT_CTS 0x00004000// clear to send #define SPI_HOST_INT_DR 0x00008000// data ready

12 Software View of Application PW620 * During boot process, WLAN firmware is downloaded to target as a package. * The driver provides a Network Interface as well as a Control Interface to the Application Software and Host Operating System (OS)

13 Software system View SPI1/SDIO interface PW620 Module SPI1/SDIO interface Interface APIMessage API SPI1/SDIO interface

14 Function API Initialize the HHAL and the initial configuration of the target module Start /stop/reset the target via command Send request/data message to the target During reset, bootloads the firmware to the target and re-initializing Register the callback routine for DMA events, management event, transmit/receive events Hookup function Memory dump function Boot-up processing

15 Power up Boot-ROM code initializes the internal DMA channel Target write its mailbox to generate one interrupt request Asking the host to send firmware Host detects the IRQ, and it DMAs A small boot agent to target Once completion, host will write one scratch register to inform the target Host configures the SPI clock, Polarity & phase by writing scratch register The target responses it, then execute the boot agent Host writes the start command to target….

16 Platform API Initialize the platform layer before/after boot-up Read/write the HW registers and interrupt status Enable/disable the MAC function DMA transfer between host and target

17 Driver Block WLAN driver stack BUS driver stack Target– PW620

18 WLAN driver stack –Host side Client driver HHAL Platform Layer HOSAL WLAN Driver Stack Forward incoming request to platform layer, Initialize, configure, send and receive the data to/from the target using SPI read/write function Client application

19 Platform layer – Host side This layer performs information exchange between host & target via SPI mailbox & scratch registers, SPI_DMA, internally, also the external interrupt output. It follows a certain protocol and is implemented in this layer Power up Download firmware To PW620 SPI Start PW620 module via customer command 3825lmac.h The actual WLAN specific communication between the Host and the Target is performed through management and data request and confirm messages. DMA

20 HOSAL layer --- Host side OS & related structure initialize Memory management Timer Queue Interrupt Thread Event Lock

21 Bus driver stack –Host side SPI Client Bus driver Host controller driver HOST OS Enumeration, initialize, Configuration via client driver Common (layer) SPI driver for target & client driver Send & receive commands to the target, also, pass the interrupt To bus driver & spi client layer Host driver ioctl

22 Linux System software architecture Driver Softmac DDK SPI_BSPUMACLMAC Implement Linux WIFI driver for conexant chipset \driver\Core\ \driver\SPI\ (Bus drvier) SPI low- level driver WIFI protocol Independent of OS/Bus ISL3825.arm Firmware Little-endian

23 SoftMAC DDK Applications Driver Include Lib Patches Makefile Config Run.sh

24 Context

25 How to upload firmware to CX53121 1.Read LMAC firmware from NOR flash/hard-disk, from FIRMWARE_ADDRESS Note: the firmware is read as file system. 2.Reset the cx53121 by writing to reset register of WIFI via SPI interface 3. Read data from firmware file into buffer kmalloced by OS. 4. find LMAC description (first block must contain LMAC descriptor) by UMAC and transfer the return value to the driver. 5. Compare the version info of LMAC and UMAC 6. Write CMD & data from buffer into CX53121 via SPI write function 7. Enable the CX53121, the firmware will start! 8. LMAC firmware initializes and generates one Device Initialized interrupt to OS, and wait for OS processing. 9. Interrupt handler triggers the init procedure of the UMAC & driver.


Download ppt "WIFI design Guide based PW620-I 802.11b/g ----Hardware section Orin.Zhu August 31 st, 2007."

Similar presentations


Ads by Google