| 数据搜索系统,热门电子元器件搜索 |
|
AN2282 数据表(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2282 数据表(HTML) 10 Page - STMicroelectronics |
|
10 / 19 page ![]() Firmware AN2282 10/19 The inb function is used only to perform the switch of Ethernet controller from an 8-bit to a 16-bit data interface because, even if after a reset the CS8900A starts in 8-bit mode, it is recommended to be used in 16-bit mode. This switching operation is done by driving a transition on nSBHE pin of CS8900A, so connecting this pin to address line SA0 (see Figure 2), the transition is simply done by performing some dummy byte read operations. 2.1.2 Initialization and configuration The lan8900.c module provides all the functions for CS8900A initialization, configuration and packet transmission/reception management. The Ethernet controller can be initialized either by using an external EEPROM (where all configuration words are automatically downloaded into the CS8900A internal registers at reset time) or by filling them through software. In this application note the Ethernet controller is initialized and configured by the function ● unsigned long csInitFromBSPDefs(void); This function reads the configuration constant from the module bsp.h. The header file for this is mainly defined as follows: a) The base address for I/O access mode: #define BSP_CS8900_IO_BASE 0x300 b) The interrupt request number: #define BSP_CS8900_IRQ 10 This number defines which interrupt line of the Ethernet Controller must be connected to the external interrupt line of the STR7 [5]. c) The access type (I/O or memory mode): #define BSP_CS8900_MEM_MODE YES d) The base address for memory access mode: #define BSP_CS8900_MEM_BASE 0x01000 e) The media type: #define BSP_CS8900_MEDIA_TYPE TEN_BASE_T f) The individual Ethernet address: #define BSP_CS8900_IND_ADDR "00:24:20:10:FF:41" The header file lan8900.h defines all CS8900A internal registers, for more details refer to the CS8900A datasheet. All Initialization functions (csInitFromBSPDefs included) are called by the function: ● unsigned long csInitialize( void (*ap_addr)(mblk_t *, IA, IA) ); The function verifies the Ethernet controller ID and resets it by calling the following functions: ● unsigned long csVerifyChip(void); ● unsigned long csResetChip(void); Moreover, this function sets the individual and broadcast Ethernet addresses, the function for new packet notification from the passed argument and initializes the interrupt number calling the function unsigned long csInitInterrupt(void); 2.1.3 Ethernet packet management The packets to transmit or to receive are exchanged with the upper layer as messages with the following structure: |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |