Pin # | Channel | Assignment |
01 | 1 | VIN+ |
02 | 1 | No Connect |
03 | 1 | LIN BUS |
04 | 1 | VIN- / GND |
05 | 1 | No Connect |
06 | 1 | No Connect |
07 | 1 | No Connect |
08 | 1 | No Connect |
09 | 1 | No Connect |
Event name | Event meaning |
GLINRESET | The processor on the LIN card has been reset |
GLINBADID | An invalid ID has been received |
GLINSYNC | Received synch field is not 0x55 |
GLINWAKEUP | A wakeup signal was received |
GLINSLEEP | A sleep command was received or bus activity has timed out |
GLINWAKEUPFAILED | The master failed to respond to the wakeup sequence |
GLINNEWBITRATE | The bit rate has changed |
IOCTL name | Function | Data field length/purpose |
GLINGETBITRATE | Get current bitrate | 4 data bytes |
GLINSETBITRATE | Set new bitrate | 4 data bytes |
GLINGETBRKSPACE | Get current dominant (low) break time in bits | 1 data byte |
GLINSETBRKSPACE | Set new dominant (low) break time in bits | 1 data byte |
GLINGETBRKMARK | Get current recessive (high) break time in bits | 1 data byte |
GLINSETBRKMARK | Set new recessive (high) break time in bits | 1 data byte |
GLINGETIDDELAY | Get current delay, in bits, between synch field and ID | 1 data byte |
GLINSETIDDELAY | Set new delay, in bits, between synch field and ID | 1 data byte |
GLINGETRESPDELAY | Get current delay, in bits, between ID and Data | 1 data byte |
GLINSETRESPDELAY | Set new delay, in bits, between ID and Data | 1 data byte |
GLINGETINTERBYTE | Get current Data interbyte delay in bits | 1 data byte |
GLINSETINTERBYTE | Set new Data interbyte delay in bits | 1 data byte |
GLINGETWAKEUPDELAY | Get current wakeup delay | 1 data byte |
GLINSETWAKEUPDELAY | Set new wakeup delay | 1 data byte |
GLINGETWAKEUPTIMEOUT | Get current wakeup timeout | 1 data byte |
GLINSETWAKEUPTIMEOUT | Set new wakeup delay | 1 data byte |
GLINGETWUTIMOUT3BR | Get current wakeup timeout after 3 breaks | 1 data byte |
GLINSETWUTIMOUT3BR | Set new wakeup timeout after 3 breaks | 1 data byte |
GLINSENDWAKEUP | Send wakeup signal | no data bytes |
GLINGETMODE | Get current mode of operation | 1 data byte
0 Master or Slave depending on usage
1 Currently Slave
2 Currently Master
3 Slave; may not be Master
4 Master; must be master
|
GLINSETMODE | Set new mode of operation | 1 data byte |
GLINGETSLEW | Get the LIN bus slew rate | 1 data byte
0 Slow slew rate
1 Normal slew rate
2 High slew rate
|
GLINSETSLEW | Set the LIN bus slew rate | 1 data byte |
GLINADDSCHED | Add a LIN schedule |
Bytes 0 thru 3 The number of bytes to follow
Bytes 4 thru 35 The name of the schedule
Repeated for each message in the schedule: 4 bytes:   delay time in tenths of milliseconds
1 byte:   Number of IDs to follow
1 byte:   Low 4 bits: number of data bytes to follow;   bit 6 set if sporadic;   bit 7 set if event driven
1 or more bytes:   ID(s)
0 to 8 bytes:   data bytes
|
GLINGETSCHED | Get a LIN schedule |
Bytes 0 thru 3 The size of the schedule
Bytes 4 thru 35 The name of the schedule
Remainder returned data for the schedule (see GLINADDSCHED)
|
GLINGETSCHEDSIZE | Get the size of a LIN schedule |
Bytes 0 thru 3 The size of the schedule suitable for use in GLINGETSCHED
Bytes 4 thru 35 The name of the schedule
|
GLINDELSCHED | Delete a LIN schedule |
Bytes 0 thru 31 The name of the schedule to be deleted
if the name is empty (the first byte of the name is a NULL), all of the schedules are deleted |
GLINACTSCHED | Activate a LIN schedule |
Bytes 0 thru 31 The name of the schedule to be activated
|
GLINDEACTSCHED | Deactivate the currently active LIN schedule | 0 data bytes |
GLINGETACTSCHED | Get the active LIN schedule |
Bytes 0 thru 31 The name of the currently active schedule (returned)
|
GLINGETNUMSCHEDS | Get the number of LIN schedules | 2 data bytes |
GLINGETSCHEDNAMES | Get a list of the LIN schedules | Variable number of data bytes (equals 32 times the number of schedules) |
GLINSETFLAGS | Set the flag bit(s) for one or more ID's |
Byte 0 Starting frame ID (0 through 63)   (If zero, all flags will be cleared first. If non-zero, existing flags will be left intact.)
Byte 1 The number of frame IDs for which to set the flags
Bytes 2 thru n Flag bits as defined below
|
GRESETHC08 | Reset Card (HC080) | 0 data bytes |
GTESTHC08COP | Test the COP (Computer Operating Properly) module | 0 data bytes |
GRESETHC08 causes the driver to perform a hard reset of the HC08 on the LIN card. This causes all of the information about which slaves are being emulated as well as the slave data itself to be lost. A GLINRESET event is reported while the card's firmware is restarting.If the main loop of the card's firmware takes more than 16.83 milliseconds between any two passes, the HC08's watchdog expires and resets the processor. A GLINRESET event is reported while the card's firmware is restarting.
GTESTHC08COP prevents the watchdog timer from being reset in the firmware's main loop. If everything is working properly, a GLINRESET event will be reported within 16.38 milliseconds when the watchdog timer expires.
There are up to 4 flag bits per Frame ID that may be used by the driver. Currently only two bits are defined.
Bit 7 - Checksum flag.     Set for Enhanced Checksum:   Reset for Classic Checksum.Bit 6 - Event flag.     Set if this is an event frame. If so, the unconditional frame's ID code is present in the low order six bits. To allow the to emulate slaves that share the same event frame, this bit may also be set in the unconditional frame's entry, allowing a string of unconditional frames to be defined for one event frame.
Any ID checkbits present in the header are discarded by the firmware before it generates them from the lower 6 bits of the header (ID). Thus, it is impossible to send an invalid ID code from the .
When receiving messages from the network, the checksums are verified. If the checksum is valid, the data minus the checksum is present in the FT_DATA packet in the Data field. If the checksum is invalid, it (the invalid checksum) is placed in the FT_DATA packet in the Extra Data field.
By sending just the ID (header) in an FT_DATA packet to the , the 's mode is set to Master, if allowed, and the ID is sent on the LIN bus.
If both the ID and data are sent to the card, the data is stored in the card,
indexed by the ID. The firmware will, in the future, automatically send the
stored data in response to receiving the corresponding ID.
If the Remote bit in the mode element of the data header is not set, the
's mode is set to Master, if allowed, and the ID is sent on the LIN bus
which causes the data to be sent as well. (The ID is transmitted on the LIN
bus followed by the data which was just stored in the card.)
If the Remote bit in the mode element of the data header is set, no further
action is taken. (Neither the ID nor the data is transmitted on the LIN bus.)
To clear the data in the card for a given ID, send a data message message to the card with the desired ID, no Data bytes and one byte of Extra Data. The Extra Data byte must have its least signficant bit set. The rest of the bits in the byte should be reset to allow for future use. This message is trapped by the LIN driver which sends a special flag to the card to cause the data to be deleted for that ID.
To clear the data in the card for all of the IDs, send a data message message to the card with any ID, no Data bytes and one byte of Extra Data. The Extra Data byte must have its next to least signficant bit set (set to 2). The rest of the bits in the byte should be reset to allow for future use. This message is trapped by the LIN driver which sends a special flag to the card to cause the data to be deleted for all of the IDs.
The Transmit/Receive flag in the Data Header indicates whether the transmitted or received the header.
The Local/Remote flag in the Data Header indicates whether the transmitted or received the data portion of the message.