(cardInit) (cardInit card_id) (cardInit [card_id [port [hardware_address [intr [module]]]]) (cardInit PCI)
![]() | Shared interrupts are not supported, so if the same interrupt is associated with more than one card, only the first will use interrupt mode, and the remainder will use polling mode. |
OK if successful, otherwise
(error "cardInit DR_ERR_CARD_INVALID (time) invalid card: card_id") (error "cardInit DVN_ERR_NO_CARD (time) No additional 5136-DNP-PCI cards detected") (error "cardInit DVN_ERR_NO_CARD (time) No 5136-DNP-PCI cards detected") (error "cardInit DVN_ERR_NO_CARD (time) Card not available") (error "cardInit DVN_ERR_BAD_IRQ_LEVEL (time) Invalid IRQ level") (error "cardInit DVN_ERR_BAD_PORT_PASSIVE (time) Card passive port signature invalid") (error "cardInit DVN_ERR_BAD_PORT_ACTIVE (time) Card active port signature invalid") (error "cardInit DVN_ERR_MEMMAP (time) Failed to map memory") (error "cardInit DVN_ERR_FIRMWARE_FILENAME (time) Specified Firmware file not found") (error "cardInit DVN_ERR_FIRMWARE_WRITE (time) Error writing firmware to card") (error "cardInit DVN_ERR_CARD_FAILURE (time) tart-up self-test error detected") (error "cardInit DVN_ERR_FIRMWARE_NOT_RUNNING (time) Firmware failed to execute")
This command initializes one or more SST DeviceNet cards. A card must be initialized before it can be used. At least one card must be initialized from the configuration file to prevent the driver from terminating. The driver can interface with up to 4 cards. Each card is uniquely identified by its card ID, between 0 and 3.
ISA cards must be initilized one at a time, fully specifying the card_id, port and hardware_address parameters.
If either port or hardware_address parameters are 0 or not specified, then the command will scan the system for new PCI card(s) that have not yet been initialized by the driver. If card_id is also not specified, then sequential available IDs are assigned to the cards. If multiple PCI cards are detected and a card_id is specified that is not the first available ID, then the driver skips over those cards that would have corresponded to the intervening IDs.
The (cardInit PCI) form of the command provides a list of PCI cards installed that match any of the known PCI ID signatures for SST DeviceNet cards. No cards are actually initialized. The debug level must be set to at least 5, for example (debug 5). The driver will reply with OK, but will output to stdout a list with the number of cards found for each type and the port, address and irq of each card. (see example)
In the following example, the system will initialize an ISA card as ID 1 at port 0x250 and address 0xD0000. The card will default to polled mode.
(cardInit 1 0x250 0xD000 )
In the next example, the driver will scan for PCI cards in the system, identifying up to 4 cards, and assigning consecutive device IDs. The card(s) will default to interrupt mode, and following on from the previous example, would be assigned IDs of 0, then 2, and then 3.
(cardInit)
In the next example, the driver will scan for PCI cards. Assuming no other cards have been initialized, and 2 cards are detected, the first card is skipped, and the second is assigned an ID of 1 and forced to polling mode. The subsequent cardInit command again detects all the available cards, assigning the first an ID of 0 with interrupt mode, and skipping the second that has already been initialized.
(cardInit 1 0 0 -1) (cardInit)
In the final example, the driver generates the requested information on the console where the driver was started. This input:
(debug 5) (cardInit PCI)
would yield results like this:
Probing for PCI cards with signature (0x10B5,0x9050,0x133D,0x10): 1 found 5136-DNP-CPCI or 5136-DNP-PCI at port=0xFFE0, addr=0xFFB40000, irq=9 Probing for PCI cards with signature (0x10B5,0x9030,0x133D,0x3A): 1 found SST-DN3-PCI-1 at port=0xFFF0, addr=0xFFB80000, irq=11 Probing for PCI cards with signature (0x10B5,0x9030,0x133D,0x39): 0 found
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.