Upload
yuval
View
37
Download
0
Embed Size (px)
DESCRIPTION
WIFI design Guide based PW620-I 802.11b/g ----Hardware section. Orin .Zhu E-mail: [email protected] August 31 st , 2007. Energy Management Unit (EMU). 1.85V. RF ZIF Section RF Up/Down Converter Baseband Filters. ARM9 WEP MAC. SPI I/F. Baseband Processor OFDM/CCK Modulation. - PowerPoint PPT Presentation
Citation preview
WIFI design Guide based PW620-I 802.11b/g ----Hardware section
Orin .ZhuE-mail: [email protected] 31st , 2007
PW620-I Block Diagram
Front-End ModulePA,SW,Balun,Passive
BPF(2.45G)
3.1V~4.5V
Energy Management Unit (EMU)
RF ZIF SectionRF Up/Down
ConverterBaseband Filters
High Speed Data Conversion
BasebandProcessor
OFDM/CCKModulation
ARM9WEPMAC
Baseband & MAC
SPI I/F
BT I/F
3.0V~5.5V 1.62V~1.90V 40MHz
1.85V
EEPROM
System Block
i.MX21 PW620-I WIFI802.11b/g
SPI13.3V
TXB01081.8V to 3.3V
Level translator
SPI1.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
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
4-wire SPI mode with IRQ
J7 I/O Active
Pin 2 SPI_IRQ O High
Pin 3 SPI_CLK I
Pin 4 SPI_CS# I
Pin 5 SPI_MISO O
Pin 6 SPI_MOSI I
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.
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.
PCB parameters requirements
Stack layer: TOPVCCGNDBOTTOM
Board impendance: 60ohm +/- 5%
Thinkness: 2mm
Material: FR-4
Software Section
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
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
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)
Software system View
SPI1/SDIO interface
PW620 Module
SPI1/SDIO interface
Interface API Message API
SPI1/SDIO interface
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
Boot-up processing
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….
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
Driver Block
WLAN driver stack
BUS driver stack
Target– PW620
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
Platform layer – Host sideThis 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 firmwareTo 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 anddata request and confirm messages.
DMA
HOSAL layer --- Host side• OS & related structure initialize
• Memory management
• Timer
• Queue
• Interrupt
• Thread
• Event
• Lock
Bus driver stack –Host side
SPI Client
Bus driver
Host controllerdriver
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
Linux System software architecture
DriverSoftmac DDK SPI_BSP UMAC LMAC
Implement Linux WIFI driver for conexant chipset
\driver\Core\
\driver\SPI\(Bus drvier)
SPI low-level driver
WIFI protocol
Independent of OS/Bus
ISL3825.armFirmware
Little-endian
SoftMAC DDK
Applications Driver Include Lib Patches Makefile Config Run.sh
Context
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.