文档详情

W5100配置指导手册.pdf

发布:2017-07-05约1.11万字共5页下载文档
文本预览下载声明
W5100 Porting Guide Ver.1.0 W5100 Porting Guide Ver. 1.0 WIZnet default driver source is based on Atmega128. Therefore, in case of porting w ith Atmega128, there is no need to modify existing driver source. However, if you port W5100 in a system using other MCU, you should consider following points . 1 1. MCU dependant part  Big-endian or Little-endian The default byte ordering is ‘Little-endian’ in sample source code. If you want to change it to ‘Big-endian’, you should change the ‘SYSTEM_ ENDIAN’ value into ‘_ ENDIAN_BIG_’ as below. Refer to /mcu/type.h #define _ ENDIAN_LITTLE_ 0 #define _ ENDIAN_ BIG_ 1 #define SYSTEM_ ENDIAN _ ENDIAN_ BIG_  Base address of W5100 Define W5100’s base address as ‘__ DEF_ IINCHIP_ MA P_ BASE__ ’. #define __ DEF_ IINCHIP_ MAP_ BASE__ 0x8000 If its base address is more than 0xFFFF, following parts should be changed. Refer to /iinchip/w5100.c static u32 SBUFBASEADDRESS[MAX_SOCK_ NUM]; static u32 RBUFBASEADDRESS[MAX_SOCK_ NUM]; u32 getIINCHIP_ Rx BASE(u8 s) u32 getIINCHIP_Tx BASE(u8 s) u8 IINCHIP_WRITE(u32 addr, u8 data) u8 IINCHIP_ READ(u32 addr)  Interrupt service routine When you develop an application using W5100, you can use the interrupt-driven mode or polled mode. If you build F/W using the interrupt-driven mode, you should define interrupt enable/disable. Refer to /mcu/type.h #define IINCHIP_ ISR_ DISABLE() (EIMSK = ~(0x 10)) #define
显示全部
相似文档