Home

User Manual 4-Channel New Generation 8-Channel

image

Contents

1. hss8UINT32 rccm hss8UINT32 sync hss8UINT32 syn_length hss8UINT32 send_idles_or_flags y typedef struct hss8BisyncInfoStruct hss8BisyncInfo CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 24 of 32 6 3 3 2 baud_rate clock_source max_receive_bytes min_no_sync_pairs crc select receive_bcs BISYNC Protocol Information Structure Members Options 1 200 1 Mbit s RS 232 1 200 16 Mbit s RS 422 485 Any values permissible The equation to calculate the actual baud rate for BISYNC is as follows Actual baud rate 100 MHz ROUND 100 MHz Desired baud rate Where ROUND implies that the result is rounded to the nearest integer HSS8_CLOCK_DEFAULT HSS8 CLOCK BRG1 HSS8 CLOCK BRG2 HSS8 CLOCK BRG3 HSS8_CLOCK_BRG4 HSS8_CLOCK_EXT1 HSS8_CLOCK_EXT2 HSS8_CLOCK_EXT3 HSS8_CLOCK_EXT4 BRGs 1 4 BRG1 for Channels A and E BRG2 for Channels B and F BRG3 for Channels C and G BRG4 for Channels D and H External Clocks connected on CLK_IN Pins Note HSS8_CLOCK_EXT 1 2 can only be used for Channels A and B and E and F while HSS8_CLOCK_EXT 3 4 can only be used for Channels C and D and IG and H 1 to 2 048 2 CRC bytes default or up to 32 kBytes 2 CRC bytes depending on how many bytes have been allocated to the RX and TX buffers See function hss8Create_device 0b0000 0 pairs 0b1111 16 pairs
2. e 1stdigit version number e 2nddigit revision number e 8rddigit beta number flashprog Flash update utility hss8Readme txt General information and installation notes hss8Release emb txt Release notes and revision history hss8Release_linux txt Please check this file for information on the latest updates ccHss8Test c Sample C code for accessing the HSS8 Linux Software Driver hss8Flash txt Procedure for updating the firmware if required hss8Test txt Test procedure for verifying HSS8 Linux Software Driver and firmware CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 3 of 32 4 1 4 2 Installation Procedure This paragraph describes the installation procedure for the HSS8 Linux Software Driver Compiling the HSS8 Linux Software Driver Module Unpack the HSS8 Linux Software Driver source file using tar xvzf ccHss8LnxSrcV lt version gt tar gz A directory named hss8 will be created Change to hss8 Inx builds host linux to build the HSS8 Linux Software Driver module by typing the following commands make clean make all Note The HSS8 Linux Software Driver is only supported on Linux kernel versions 2 6 and upwards Loading the HSS8 Linux Software Driver Within the hss8 Inx builds host linux directory are 3 script files to help load the HSS8 Linux Software Driver The HSS8 Linux Software Driver may be loaded in two ways e Using script files hss8_load hss8_unload wh
3. E i i AE i i i E E i J F J al i i NT32 NT32 NT32 NT32 NT32 NT32 NT32 NT32 NT32 NT32 NT32 NT32 N N N NI N N NT32 NT32 NT32 NT32 NT32 NT32 NT32 T32 T32 T32 32 32 32 32 baud_rate flow_control stop_bits data_bits uart_mode freeze_tx rx_zero_stop_bits sync_mode disable_rx while tx parity_enable rx_parity tx_parity diag_mode max_receive_bytes max_idl brkcr parec frmec nosec brkec uaddr1 uaddr2 toseg cc 8 rccm clock_source typedef struct hss8UartInfoStruct hss8UartInfo CCII HSS8 6 MAN 003 2009 08 20 CH8MANO3 WPD Page 16 of 32 Issue 1 2 6 3 1 2 UART Protocol Information Structure Members e Js eses baud_rate 1 200 1 Mbit s RS 232 1 200 16 Mbit s RS 422 485 Any values permissible The equation to calculate the actual baud rate for asynchronous UART is as follows Actual baud rate 100 MHz 16 ROUND 100 MHz 16 Desired baud rate The equation to calculate the actual baud rate for synchronous UART is as follows Actual baud rate 100 MHz ROUND 100 MHz Desired baud rate Where ROUND implies that the result is rounded to the nearest integer clock_source HSS8_CLOCK_DEFAULT BRGs 1 4 BRG1 for Channels A and E BRG2 for Channels B and F BRG3 for Channels C and G BRG4 for Channels D and H HSS8 CLOCK BRG1 HSS8 CLOCK BRG2 HSS8 CLOCK BRG3 HSS8_CLOCK_BRG4 HSS8
4. hss8U hss8U hss8U hss8U hss8U hss8U Leino Struct 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 HHHHHHHHHHHHHHHHHHHHHH A A 2 A A A A A A A AA AA A A AA A A AnA hss8U y 32 baud_rate crc_mode diag_mode max_receive_bytes max_frame_bytes address_mask addressl address2 address3 address4 nr_flags_between_frames retransmit_enabled flag_sharing_enabled rx_disabled_during_tx bus_mode bus_mode_rts multiple tx frames encoding method preamble length preamble_pattern send_idles_or_flags clock_source typedef struct hss8HdlcInfoStruct hss8HdlcInfo CCII HSS8 6 MAN 003 2009 08 20 CH8MANO3 WPD Page 20 of 32 Issue 1 2 6 3 2 2 HDLC Protocol Information Structure Members tions Beseription baud_rate 1 200 1 Mbit s RS 232 N 1 200 16 Mbit s RS 422 485 Any values permissible The equation to calculate the actual baud rate for FMO 1 Manchester and Diff Manchester is as follows Actual baud rate 100 MHz 16 ROUND 100 MHz 1161 Desired baud rate The equation to calculate the actual baud rate for NRZ NRZI is as follows Actual baud rate 100 MHz ROUND 100 MHz Desired baud rate Where ROUND implies that the result is rounded to the nearest integer clock_source HSS8_CLOCK_DEFAULT BRGs 1 4 HSS8 CLOCK BRG1 BRG1 for Channels JA and E HSS8_CLOCK_BRG2 BRG2
5. tinclude lt unistd h gt int close int fd 6 1 3 Read System Call Function read Purpose Read from device or read in received data from port Arguments lt fd gt File descriptor to read from lt buf gt Buffer to read bytes into lt count gt Number of bytes to read from device Returns num_bytes Number of bytes read This may be less than the bytes requested which is not an error If zero there are no bytes to read at present 1 Error occurred Errors EBADF Incorrect file descriptor specified EFAULT There was a problem copying data into the user specified buffer EAGAIN Non blocking has been specified and no data was immediately available for reading EINTR The close system call was interrupted by a signal tinclude lt unistd h gt ssize_t read int fd void buf size_t count CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 11 of 32 6 1 4 Write System Call Function write Purpose Write to device or send data on specific port Arguments lt fd gt File descriptor to write to lt buf gt Buffer containing the data to be written to device lt count gt Number of bytes to write to device May only be up to a maximum of 32 kBytes Returns num_bytes Number of bytes written If zero no bytes have been written 1 Error occurred Errors EBADF Incorrect file descriptor specified ENODEV Incorrect device specified or device cannot be found
6. CT Systems CCIl Systems Pty Ltd Registration No 1990 005058 07 Communications Computer Intelligence 2 Integration e User Manual for the 4 Channel New Generation and 8 Channel High Speed Serial I O Adapters Linux Software Driver Cl Systems Document No CCII HSS8 6 MAN 003 Issue Date 2009 08 20 Print Date 2009 08 20 File Name W HSS8 TECH MAN CH8MANO3 WPD C4 Systems The copyright of this document is the property of C2l Systems The document is issued for the sole purpose for which it is supplied on the express terms that it may not be copied in whole or part used by or disclosed to others except as authorised in writing by C212 Systems Document prepared by C2I Systems Cape Town Signature Sheet pn OJ TT 2 009 09 02 Completed by X Koer PP Accepted by Project Manager La ro Board Level Products Cl Systems Accepted by X Keuger 91 Systems 2009 08 22 Issue 1 2 Page ii of vi CCII HSS8 6 MAN 003 CH8MANO3 WPD Signature Sheet Completed by Project Engineer Board Level Products C l Systems Accepted by Project Manager Board Level Products C212 Systems Quality Assurance C l Systems CCII HSS8 6 MAN 003 2009 08 22 Issue 1 2 Amendment History es E ET 1 1 Implemented ECP made references to adapters more 2006 06 29 CCII HSS8 6 ECP 025 generic Improve document naming convention
7. FASYNC flag in the device by means of the F SETFL fenil command The above steps are implemented in software as follows include lt fcntl h gt setup this process as the owner of the file descriptor fentl fd F_SETOWN getpid set the SIGIO signal fcntl fd F_SETSIG SIGIO setup async notification fentl fd F_SETFL fentl fd F_GETFL FASYNC Th oO Call back function may be setup as follows include lt signal h gt void hss8Test_rx_callback int signo siginfo_t siginfo void what read data read siginfo gt si_fd rx_data 10 struct sigaction action setup rx callback memset amp action 0 sizeof action action sa_sigaction hss8Test_rx_callback action sa_flags SA_SIGINFO SA_NOMASK sigaction SIGIO amp action NULL Note For more information on the sigaction system call consult its man page 5 4 Reading in Received Data The read system call will return the number of bytes received on the specific channel of the HSS8 Adapter If less data is available than the application requested this amount will be returned immediately If no data is present the read system call will block by default until at least one byte is there If the flag O_NONBLOCK has been specified and no data is present the read system call will return immediately with a return value of EAGAIN CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MAN
8. HSS8_BISYNC_CRC_MODE_16 HSS8_BISYNC_CRC_MODE_LRC TRUE FALSE CCII HSS8 6 MAN 003 2009 08 20 CH8MANO3 WPD Page 25 of 32 Used to specify a single baud rate for both transmitter and receiver Units in bit s HSS8_CLOCK_DEFAULT connects BRGs 1 4 to Channels A D and Channels E H When transmit clock is set to HSS8_CLOCK_BRG 1 4 then receive clock is still set to HSS8_CLOCK_EXT 1 al for Channels A D and E H Note There are four BRGs and four clock input pins per PowerQUICC Il processor Maximum number of bytes to receive before closing buffer Minimum number of SYN1 SYN2 pairs sent between or before messages The entire pair is always sent regardless of the syn_length variable CRC selection 1 CRC16 X16 X15 X2 1 Initialise prere and pterc to all zeros or all ones 2 LRC sum check For even LRC initialise prere and pterc to zeros for odd LRC initialise to ones Enable Receive Block Check Sequence BCS Issue 1 2 rx_transparant_mode reverse_data disable rx vvhile tx rx_parity tx_parity diag_mode Options HSS8_BISYNC_PARITY_ODD HSS8_BISYNC_PARITY_LOW HSS8_BISYNC_PARITY_EVEN HSS8_BISYNC_PARITY_HIGH HSS8_DIAG_NORMAL HSS8_DIAG_LOOPBACK HSS8_DIAG_ECHO HSS8_DIAG_LOOPBACK_ECHO 0x0000 or OxFFFF 0 65 535 Normal operation Use this for external loopback Internal loopback TxD and RxD are connected interna
9. HSS8_DIAG_NORMAL Normal operation Use this for external loopback diag_mode HSS8_DIAG_ LOOPBACK Internal loopback TxD and RxD are connected internally The value on RxD is ignored HSS8_DIAG_ECHO The transmitter automatically resends received data bit by bit HSS8_DIAG_LOOPBACK_ECHO Loopback and echo operation occur simultaneously 1 to 2 048 default or up to 32 kBytes depending on how many bytes have been allocated to the RX and TX buffers See function hss8Create_device max_receive_bytes 0 to 2 048 default or up to 32 kBytes depending on how many bytes have been allocated to the RX and TX buffers See function hss8Create_device max_idl CCII HSS8 6 MAN 003 2009 08 20 Receive and transmit parity Parity will only be checked if parity is enabled Set diagnostic mode External loopback RS 422 485 Connect TxD to RxD and TxD to RxD External loopback RS 232 Connect TxD to RxD Maximum number of bytes that may be copied into a buffer idle characters When a character is received the receiver begins counting idle characters If max idi idle characters are received before the next data character an idle timeout occurs and the buffer is closed Thus max_idl offers a way to demarcate frames To disable the feature clear max_idl The bit length of an idle character is calculated as follows 1 data length 5 14 1 if parity is used number of stop bits 1
10. Options Description HSS8_UART_FREEZE_TX_NORMAL HSS8_UART_FREEZE_TX_FREEZE freeze_tx rx_zero_stop_bits sync_mode disable_rx_while_tx parity_enable rx_parity tx_parity diag_mode max_receive_bytes HSS8_UART_RX_ZERO_STOP_BITS_NORMAL HSS8_UART_RX_ZERO_STOP_BITS_NONE HSS8_UART_SYNC_MODE_ASYNC HSS8_UART_SYNC_MODE_SYNC HSS8_UART_DISABLE_RX_WHILE_TX_NORMAL HSS8_UART_DISABLE_RX_WHILE_TX_DISABLE HSS8_UART_PARITY_NO_PARITY HSS8_UART_PARITY_ENABLE HSS8_UART_PARITY_ODD HSS8_UART_PARITY_LOW HSS8_UART_PARITY_EVEN HSS8_UART_PARITY_HIGH HSS8_DIAG_NORMAL HSS8_DIAG_LOOPBACK HSS8_DIAG_ECHO HSS8_DIAG_LOOPBACK_EC HO Normal operation Use this for external loopback Internal loopback TxD and RxD are connected internally The value on RxD CTS and CD is ignored The transmitter and receiver share the same clock source The transmitter automatically resends received data bit by bit Loopback and echo operation occur simultaneously 1 to 2 048 default or up to 32 kBytes depending on how many bytes have been allocated to the RX and TX buffers See function hss8Create_device 0 to 2 048 default or up to 32 kBytes depending on how many bytes have been allocated to the RX and TX buffers See function hss8Create_device Pause freeze transmission Transmission continues when set back to normal If set to none the receiver receives data without st
11. Return POST Stats ad at mek dimen open anhalt ai eed at ed aaa 8 511 Return Adapter Type 0 a a S ne net teens 8 6 HSS8 Linux Software Driver Interface 0 0 ccc eee 10 6 1 HSS8 Linux Software Driver System Calls 000 ttt eee 10 61 11 Open System Gallis ja cn eae naw a eth bende ei vet te 10 6 1 2 Close System Call 0c tet ttn eee eee 11 61 3 Read System CAN sa prsh shk k md t Ae 11 614 Write System Calla rr anet ai kordat pe de Bua re arena adi 12 6 1 5 loctL System Call sa zer teri and ed dat d ne ed de e E e aude ke 13 6 2 HSS8 BIT Data SHUGLUTOS aa va Gencit ice re da pa da a da D ak wale 14 6 3 Protocol Data StructureS ee eee e eee nee 15 Biol UART ModE E DP EA Mesa eee Gree Bs 16 6 3 1 1 UART Protocol Information Structure eee 16 6 3 1 2 UART Protocol Information Structure Members 0 000 c eee ee ees 17 623725 lt HDEG MoOde ni aces eas cide a Nd 20 6 3 2 1 HDLC Protocol Information Structure aasan aana aaaea aaa 20 6 3 2 2 HDLC Protocol Information Structure Members 0000000 eee eee eae 21 6 3 2 3 Preamble Requirements aa 23 63 3 IBISYNG Mode o id a gad o ae RAMA TE ae net oe 24 6 3 3 1 BISYNC Protocol Information Structure 0 0 eee 24 6 3 3 2 BISYNC Protocol Information Structure Members 0000 ce ai 25 6 3 4 SMCUART Mode zini tin ar a Ste acd any bee a a dy 29 6 3 4 1 SMC UA
12. begins Ox7E flag 0x68 OxAA using 16 bit address recognition the address registers should contain OxAA68 and address_mask should contain OxFFFF For 8 bit addresses clear the eight high order address bits nr flags betveen frames 0 15 Minimum number of flags E between or before frames Enable re transmit retransmit_enabled flag_sharing_enabled TRUE Enable flag sharing FALSE rx_disabled_during_tx Disable receive during transmit bus_mode Enable bus mode bus_mode_rts Enable special RTS operation in N E HDLC bus mode multiple_tx_frames TRUE Enable multiple frames in zg FALSE transmit FIFO CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 22 of 32 tions Description 1 encoding_method HSS8 HDLC ENCODING METHOD NRZ RX TX encoding method NRZ HSS8_HDLC_ENCODING_METHOD_NRZI_MARK and NRZI use no DPLL FMO 1 HSS8_HDLC_ENCODING_METHOD_NRZI_SPACE Manchester and Diff_Manchester HSS8_HDLC_ENCODING_METHOD_FMO use the DPLL for clock HSS8_HDLC_ENCODING_METHOD_FM1 recovery The clock rate is 16x HSS8_HDLC_ENCODING_METHOD_MANCHESTER when the DPLL is used HSS8_HDLC_ENCODING_METHOD_DIFF_MANCHESTER preamble_length HSS8_DPLL_PREAMBLE_LENGTH_0 Determines the length of the E HSS8 DPLL PREAMBLE LENGTH 8 preamble pattern HSS8 DPLL PREAMBLE LENGTH 16 HSS8 DPLL PREAMBLE LENGTH 32 HSS8 DPLL PREAMBLE LENGTH 48 HSS8 DPLL PREAMBLE LENGTH 64 HSS8 DPLL PREAMBLE LENGTH 128 preamble pattern HSS8 DP
13. for Channesl B and F HSS8_CLOCK_BRG3 BRG3 for Channels C and G HSS8_CLOCK_BRG4 BRG4 for Channels D and H HSS8_CLOCK_EXT1 External Clocks connected on HSS8_CLOCK_EXT2 CLK_IN Pins HSS8_CLOCK_EXT3 HSS8_CLOCK_EXT4 Note HSS8_CLOCK_EXT 1 2 can only be used for Channels A and B and E and F while HSS8 CLOCK EXTI3 4 can only be used for Channels C and D and IG and H HSS8 HDLC CRC MODE 16 BIT HSS8 HDLC CRC MODE 32 BIT crc mode diag mode HSS8 DIAG NORMAL Normal operation Use this for external loopback CCII HSS8 6 MAN 003 2009 08 20 Used to specify a single baud rate for both transmitter and receiver Units in bit s HSS8_CLOCK_DEFAULT connects BRGs 1 4 to Channels A D and Channels JE H For NRZ NRZI VVhen transmit clock is set to HSS8 CLOCK BRGI1 4 then receive clock is still set to HSS8 CLOCK EXTI1 4 for Channels A D and E H For FMO 1 Manchester and Diff Manchester Transmit and receive clocks can be set to one of HSS8_CLOCK_BRG 1 4 or HSS8_CLOCK_EXT 1 4 Note There are four BRGs and four clock input pins per PowerQUICC II processor HDLC CRC mode Set diagnostic mode External loopback Connect TxD to RxD TxD to RxD CLK_OUT to CLK_IN and CLK_OUT to CLK_IN for synchronous mode External loopback RS 232 Connect TxD to RxD CLK_OUT to CLK_IN for synchronous mode and RTS to CTS and CD Set diagnos
14. 2 For 8 data bits no parity and 1 stop bit the character length is 10 bits Maximum Issue 1 2 CH8MANO3 WPD Page 30 of 32 7 Getting Started After installing the HSS8 Linux Software Driver according to Paragraph 4 test it by following the test procedure given in hss8Test txt CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 31 of 32 8 Contact Details 8 1 Contact Person Direct all correspondence and or support queries to the Project Manager at C2l Systems 8 2 Physical Address Cl Systems Unit 3 Rosmead Place Rosmead Centre 67 Rosmead Avenue Kenilworth Cape Town 7708 South Africa 8 3 Postal Address C212 Systems P O Box 171 Rondebosch 7701 South Africa 8 4 Voice and Electronic Contacts Tel 27 0 21 683 5490 Fax 27 0 21 683 5435 Email info ccii co za Email support ccii co za URL a http www ccii co za 8 5 Product Support Support on C2l2 Systems products is available telephonically between Monday and Friday from 09 00 to 17 00 CAT Central African Time CAT GMT 2 CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 32 of 32
15. EINVAL The maximum number of bytes to be written has been exceeded EFAULT There was a problem copying data from the user specified buffer EINTR The close system call was interrupted by a signal include lt unistd h gt ssize_t write int fd const void buf size_t count CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 12 of 32 6 1 5 loctl System Call Function ioctl Purpose Configure the protocol of the device or obtain device specific information Arguments lt fd gt File descriptor to configure lt request gt Command to be performed One of 1 HSS8 I0C SET PORT CONFIG 2 HSS8 I0C GET PORT CONFIG 3 HSS8 I0C BIT CLEAR 4 HSS8_IOC_BIT_GET 5 HSS8 IOC ENGINE VERSION GET 6 HSS8 IOC EMBEDDED VERSION GET 7 HSS8 IOC HOST VERSION GET 8 HSS8 IO0C POST ENABLE 9 HSS8 IOC POST STATUS 10 HSS8 I0C ADAPTER TYPE lt gt Command specific argument 1 Initialised hss8Protocollnfo structure 2 Cleared hss8Protocollnfo structure 3 No argument 4 Cleared hss8BitInfo structure 5 char buffer 6 char buffer 7 char buffer 8 char variable 9 char variable 10 char variable Returns 0 On success 1 Error occurred Errors EBADF Incorrect file descriptor specified ENODEV Incorrect device specified or device cannot be found EINVAL Incorrect protocol specified for specific device or port EFAULT The command specific argument references an inaccessible memo
16. LL PREAMBLE PATTERN 00 Determines what bit pattern HSS8_DPLL_PREAMBLE_PATTERN_10 precedes each TX frame HSS8_DPLL_PREAMBLE_PATTERN_01 HSS8_DPLL_PREAMBLE_PATTERN_11 send_idles_or_flags HSS8_HDLC_SEND_IDLES Send either idles or flags syncs 7 7 HSS8_HDLC_SEND_FLAGS_SYNCS between frames as defined by the protocol For HDLC the flag is defined as Ox7E NRZI encoding methods may only be used with flags syncs 6 3 2 3 Preamble Requirements Minimum Preamble Length Required Decoding Method Preamble Pattern Differential Manchester CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 23 of 32 6 3 3 BISYNC Mode This protocol may only be used with the eight SCC ports Ports A H 6 3 3 1 BISYNC Protocol Information Structure The following structure is defined in the file hss8Controllfc h and is given here in abbreviated format i e reserved and obsolete members are not shown Always use the structure as defined in hss8Controllfc h struct hss8BisyncInfoStruct hss8UINT32 baud_rate hss8UINT32 clock_source hss8UINT32 max_receive_bytes hss8UINT32 min_no_sync_pairs hss8UINT32 crc_select hss8UINT32 receive_bcs hss8UINT32 rx_transparant_mode hss8UINT32 reverse_data hss8UINT32 disable_rx_while_tx hss8UINT32 rx_parity hss8UINT32 tx_parity hss8UINT32 diag_mode hss8UINT32 crec hss8UINT32 prerc hss8UINT32 ptcrc hss8UINT32 parec hss8UINT32 bsync hss8UINT32 bdle hss8UINT32 cc 8
17. O3 WPD Page 6 of 32 5 5 5 6 5 7 5 8 Example Read 10 bytes from device with file descriptor fd unsigned char rx_data 10 read fd rx_data 10 Writing Data The write system call writes data to be send on the specific channel of the HSS8 Adapter The return value if the call was successful is the number of bytes written Blocking is not supported with the write system call If the specific channel of the HSS8 Adapter cannot accept anymore data the write system call will return immediately with a return value of EBUSY Example Write 4 bytes to device with file descriptor fd unsigned char tx_data 4 0xAA OxBB 0xCC OxDD write fd tx_data 4 Closing the Devices Devices are closed with the close system call Once closed the corresponding channel of the device will reject all incoming data This data will not be available once the device is re opened Obtaining the Current Host and Firmware Version Number The HSS8 Linux Software Driver engine version and the firmware version may be obtained with the ioctl system call This information is available on all devices per HSS8 Adapter char host_string HSS8_VERSION_STRING_LENGTH char engine_string HSS8_VERSION_STRING_LENGTH char firmware_string HSS8_VERSION_STRING_LENGTH status ioctl fd HSS8_IOC_ENGINE_VERSION_GET engine_string if status 0 printf Could not get current engine versi
18. RT Protocol Information Structure aa anaana aeaaaee 29 6 3 4 2 SMC UART Protocol Information Structure Members ooooooooooo 30 Te Getting lane ss da aa de dos 31 CCII HSS8 6 MAN 003 2009 08 22 Issue 1 2 8 Contact Details 2 dk eh nes bak ede ened Rehan nk BEE RS ERE ERE REED 32 8 1 Contact Person seas ese eae Oe oe mee es eer tse Reet ot ne scale theta dtl Ie ok 2 32 8 2 PhysiGAKAQArOSS i ivi ve shit avai SM Pee ne AR Ova SEE Vee ns A da 32 8 3 PostalWWAGGress fii ashe ee a teeth Sea div gona eee cated e BAe 32 8 4 Voice and Electronic Contacts aaua aaa aaa aaaea aaea 32 8 5 Product SUpport ara caida a om ao de aaa K t Sedu A ea asia ek angie Be 32 A shes te O RR AAN 1 1 1 Identification ira nde e e e e ra NE e Beas E e MMSE em ES 1 1 2 SYSTSIMOVEIVICW in ata a aa 1 1 3 DOCUMENTO VE VIEW he e a AS 1 2 Applicable and Reference Documents 000000 2 2 1 Applicable DOCUMENTS sarna rr ER id ES GA ns bal 2 2 2 Reference Documents 0c cece ee ee ee eee eee ee eens 2 3 HSS8 Linux Software Driver Distribution naaa aaaeeeaa 3 4 Installation Procedure aana 4 4 1 Compiling the HSS8 Linux Software Driver Module aaaea 4 4 2 Loading the HSS8 Linux Software Driver 0 0 ccc tte eee 4 5 Using the HSS8 Linux Software Driver aaa 5 5 1 Opening of Devices 00 0 e tte 5 5 2 Gonfiguring the Channels 2 ide si pes
19. SS8 POST RAM ADDR ENABLE Test the onboard RAM address bus HSS8 POST RAM DEV ENABLE Test the onboard RAM devices HSS8 POST KERNEL CRC ENABLE Test the embedded firmware CRC To disable all tests specify zero Note Every time the HSS8 Adapter starts up the specified tests are run If the user doesn t require these tests anymore they need to be disabled again By default no tests are specified Example Enable all POST tests char post tests HSS8_POST_RAM DATA_ENABLE HSS8 POST RAM ADDR ENABLE HSS8 POST RAM DEV ENABLE HSS8 POST KERNEL CRC ENABLE ioctl fd HSS8 IOC POST ENABLE spost tests Return POST Status The POST status may be obtained via the oct system call The following macros see hss8Controllfc h define the status e HSS8 OK All tests passed e HSS8 EEPROM UPDATE EEPROM was corrupt and was reprogrammed e HSS8 EEPROM ERROR EEPROM read write error e HSS8 RAM DATA ERROR RAM databus error e HSS8 RAM ADDR ERROR RAM addressbus error e HSS8 RAM DEVICE ERROR RAM device error e HSS8 FLASH MAGIC ERROR Flash magic number corrupt e HSS8 FLASH KERNEL CRC ERROR Flash GRC error e HSS8 SLAVE PovverQUlCC Il FAIL Second PowerQUICC II processor failed to start up Example Get POST status char post status 0 ioctl fd HSS8 IOC POST STATUS spost status Return A
20. _CLOCK_EXT1 HSS8_CLOCK_EXT2 HSS8_CLOCK_EXT3 HSS8_CLOCK_EXT4 External Clocks connected on CLK_IN Pins Note HSS8_CLOCK_EXT 1 2 can only be used for Channel A and B and E and F while HSS8_CLOCK_EXT 3 4 can only be used for Channels C and D and IG and H HSS8 UART FLOVV NORMAL flovv control HSS8 UART FLOVV ASYNC stop bits data bits HSS8 UART MODE NORMAL HSS8 UART MODE MAN MM HSS8 UART MODE AUTO MM CCII HSS8 6 MAN 003 2009 08 20 Used to specify a single baud rate for both transmitter and receiver Units in bit s HSS8_CLOCK_DEFAULT connects Baud Rate Generators BRGs 1 4 to Channels A D and Channels E H For synchronous UART When transmit clock is set to HSS8_CLOCK_BRG 1 4 then receive clock is still set to HSS8 CLOCK_EXT 1 4 for Channels A D and E H For asynchronous UART Transmit and receive clocks can be set to one of HSS8_CLOCK_BRG 1 4 or HSS8_CLOCK_EXT 1 4 Note There are four BRGs and four clock input pins per PowerQUICC II processor Normal or control asynchronous flow HSS8 UART STOP BITS ONE Number of full stop bits HSS8_UART_STOP_BITS_TWO Number of data bits Note only channels I L i e the SMC channels support nine or more data bits Select UART mode normal manual multidrop or automatic multidrop mode Issue 1 2 CH8MANO3 WPD Page 17 of 32 fame
21. a using the SYN1 SYN2 pair v If v 1 and the receiver is notin hunt mode when a SYNC character is received this character is discarded ssssssss 8 bits SYNC character When using 7 bit characters with parity the parity bit should be included in the SYNC register value Obv0000000dddddddd BISYNC DLE register In transparent mode the receiver discards any DLE character received v If v 1 and the receiver is notin hunt mode when a DLE character is received this character is discarded dddddddd 8 bits DLE character This character tells the receiver that the next character is text cc 8 ObObh cccccccc Valid entry Control characters 1 to 8 Ob1bh cccccccc Entry not valid and is not used Reserved Initialise to zero b Block check sequence expected A maskable interrupt is generated after the buffer is closed b 0 The character is written into the receive buffer and the buffer is closed b 1 The character is written into the receive buffer The receiver waits for 1 LRC or 2 CRC bytes and then closes the buffer h Enables hunt mode when the current buffer is closed h 0 The BISYNC controller maintains character synchronisation after closing the buffer h 1 The BISYNC controller enters hunt mode after closing the buffer When b 1 the controller enters hunt mode after receiving LRC or CRC cccccccc 8 bits Defines control characters to be compared to the i
22. dapter Type The adapter type may be obtained via the oct system call The return value will be either 4 or 8 describing a 4 channel four SCCs and two SMCs available or 8 channel eight SCCs and four SMCs available adapter When a 4 channel adapter is present only the following devices are valid hss8_ A D _ 0 3 four SCC channels and hss8_ A D 8 9 two SMC ports All other devices although visible in dev will return an error ENODEV when accessed CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 8 of 32 Example Get adapter type char adapter_type 0 loctl fd HSS8_IOC_ADAPTER_TYPE fadapter type CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 9 of 32 6 HSS8 Linux Software Driver Interface The HSS8 Linux Software Driver source contains the following header files in hss8 Inx src h which should always be included in user applications e hss8LnxDriver h e hss8Defs h e hss8HostDriver h e hss8Controllfc h e Other header files IOCTL command definitions HSS8 type definitions Of only importance for the HSS8 Linux Software Driver are the defines of the HSS8 adapter The function declarations may be ignored as they are not applicable to the HSS8 Linux Software Driver Definition of structures and types for all protocols available on the HSS8 Adapter Other header files are only used to compile the software dr
23. e ees 16 6 3 1 2 UART Protocol Information Structure Members aaa 17 69 29 SHD EGMOGO ar ni nt pn aS 20 6 3 2 1 HDLC Protocol Information Structure ee eee 20 6 3 2 2 HDLC Protocol Information Structure Members 0 000000 e eee ees 21 6 3 2 3 Preamble Requirements aa 23 6 3 3 IBISYNG Modes sic tides is a ek a Pe Battie atte Reed Bd Ae di 24 6 3 3 1 BISYNC Protocol Information Structure 0 0 0 0 anaana anaana aaaea 24 6 3 3 2 BISYNC Protocol Information Structure Members 000 00 aaa 25 63 4 SMG WART Modes cias dhen ces eas See Bio ees See E eG a a a Ue oli a oe 29 6 3 4 1 SMC UART Protocol Information Structure eee 29 CCII HSS8 6 MAN 003 2009 08 22 Issue 1 2 6 3 4 2 SMC UART Protocol Information Structure Members 0 0005 30 7 Getting Stan ii A AA aaa 31 6 Gontaci Detalls lt a oe tas BS ee DEP OARS EOS HERE ERT REE ee ee aes 32 8 1 Gonlaci POKSON ura pas o a o woe ance a beet atts 32 8 2 Physical Address weet s r dani kek k A bee T e Kta be eee 32 8 3 Postal Address ve he wd sek tate e aac debs Ea ee aN a Dray SAE I cnt SA ie ee E 32 8 4 Voice and Electronic Contacts eee eee eee ee 32 8 5 PROGUCESUPPOITS au th sere Baca te a tae dt SH 32 CCII HSS8 6 MAN 003 2009 08 22 Issue 1 2 Abbreviations and Acronyms API Application Program Interface BCS Block Check Sequence BISYNC Binary Sync
24. er must first set the default configuration for each ofthe channels To set the configuration of a channel a protocol specific information structure is used Examples of the required structure is given in ccHss8Test c for the UART protocol and can be used as a starting point The structures allow the user to set all the protocol specific options available on the HSS8 communication controller chip the MPC8260 PowerQUICC II For available options for each of the structure fields see 2 1 1 The ioctl system call is used to feed the protocol specific structure to the HSS8 Linux Software Driver Example Set device with file descriptor fd to UART mode Set initial SCC port configuration loctl fd HSS8_IOC_SET_PORT_CONFIG guart info CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 5 of 32 5 3 Adding Receive Call back Function The HSS8 Linux Software Driver is able to notify the user if data is available to read This is accomplished with asynchronous notification and is enabled as follows e The user program needs to specify a process as the owner of the device This is necessary so that the kernel knows which process to notify of an event e For the Call back function to determine the file descriptor that caused this signal the user program must set the SIGIO flag in the device by means of the F_SETSIG fenti command e To actually enable asynchronous notification the user program must set the
25. h ken r eet a o ea RG 5 5 3 Adding Receive Call back Function 0600 c cect teeta 6 5 4 Reading in Received Data aa 6 5 5 Writing DALA coito sis Bene Daa eee wh LG are bse A ee ew be bes aes Sao ee ws V nin be RS 7 5 6 Closing the Devices ttt teens 7 5 7 Obtaining the Current Host and Firmware Version Number 0 000 cece cece eee eee 7 5 8 HSS8 Built in Tests BITS 0 0 0 cnet eee tees 7 5 9 Enable Disable Power On Self Tests 00 ccc ee eee nee eee nee nne 8 510 Return POST Status Kid opi tl Saeed a gee ie Medes GRA ay teats Gone hh ARAL au ear asd autem Modine PA 8 511 Return Adapter Type si pa nai para fea ee a a eee Pea Say pase PEG et oa edhe Pee 8 6 HSS8 Linux Software Driver Interface 0 0 0 cc eee 10 6 1 HSS8 Linux Software Driver System Calls 000 cece tenes 10 61 11 Open System Call sinea Par et dat ese teed al eee aes ete 10 61 2 Close System Call j n e ara bordit dhe de dh R whew ress Meenas aie 11 6 1 3 Read System Call wax repann miea e reading fed dh vd dd ea eee tea dt Ae 11 6 1 4 Write System Call 0 2 0 tte teen eee 12 6 1 5 loctl System Call e nis eee ents Ser Meth Dose es Gee Pete GI ee a Gana Ma e dd eee Pe 13 6 2 HSS8 BIT Data Structures nnn nnn eens 14 6 3 Protocol Data Structures eee ence ee eee nee 15 69 WARTMOde nes pe Nd e adea A 16 6 3 1 1 UART Protocol Information Structur
26. hronous Communication BIT Built in Test bit s bits per second BRG Baud Rate Generator CD Carrier Detect CRC Cyclic Redundancy Check CTS Clear to Send DLE Data Link Escape DPLL Digital Phase Locked Loop EEPROM Electrically Erasable Programable Read Only Memory FIFO First In First Out HDLC High Level Data Link Control HSS4NG 4 Channel High Speed Serial Adapter HSS8 8 Channel High Speed Serial 1 0 Input Output LED Light Emitting Diode MHz MegaHertz NRZ Non Return to Zero NRZI Non Return to Zero Inverted POST Power On Self Test RAM Random Access Memory RTS Request to Send RxD Receive Data SCC Serial Communications Controller SDLC Synchronous Data Link control SMC Serial Management Controller SYNC Synchronisation TxD Transmit Data UART Universal Asynchronous Receiver Transmitter CCII HSS8 6 MAN 003 2009 08 22 Issue 1 2 ost o As Scope 1 1 Identification This document is the user manual for the HSS8 Linux Software Driver for the C I Systems 8 channel High Speed Serial HSS8 Adapter and the 4 Channel High Speed Serial Adapter HSS4NG The HSS4NG is based on a stripped down HSS8 Adapter and as such this manual applies except that only SCC channels 0 3 and SMC channels 8 9 will be available 1 2 System Overview The HSS8 Adapter provides eight channels of simultaneous high speed bi directional serial communications and an additional four channels of lower speed serial communications The eight high s
27. ich can be invoked from the system s rc ocal file or be called manually whenever the module is needed e Using an init script hss8_init to be placed in the directory the Linux distribution uses to load init scripts i e etc init d or etc rc d init d The HSS8 Linux Software Driver module should be located in the module directory of the kernel lib modules kernel version kernel drivers misc The HSS8 Linux Software Driver supports up to four HSS8 Adapters on one host system The script files will detect all HSS8 Adapters present and setup all devices All HSS8 devices are created in dev and have the following naming convention hss8_ lt X gt _ lt Y gt x A D indicating which HSS8 Adapter this device belongs to Y 0 11 indicating the channel number of the HSS8 Adapter The file oroc devices lists each HSS8 Adapter and its corresponding major number under the character devices section Each devices minor number corresponds to the channel number of the HSS8 Adapter Note In order to load the HSS8 Linux Software Driver the user must have root privileges CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 4 of 32 5 Using the HSS8 Linux Software Driver The HSS8 Linux Software Driver is a character driver Each channel on the HSS8 Adapter is available as a separate device on Linux and can be accessed with the following file handling system calls e open open the device or corresponding channe
28. iver module and are not necessary for user applications 6 1 HSS8 Linux Software Driver System Calls 6 1 1 Open System Call Function open Purpose Open the HSS8 device or port and return a file descriptor Arguments lt pathname gt The path and name of device Usually dev hss8_X_Y where X A D and Y 0 11 lt flags gt Always O_RDWR If no blocking is desired specify O NONBLOCK as well bitwise ORed with previous parameter Do not specify O_ASYNC here rather setup asynchronous notification as described in 5 3 Returns fd File descriptor 1 Error occurred Errors ENODEV Incorrect device specified or device cannot be found EBUSY The device is already open or the adapter is busy EINTR The open system call was interrupted by a signal include lt sys types h gt incl inc lude lt sys stat h gt lude lt fcntl h gt int open const char pathname int flags CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 10 of 32 6 1 2 Close System Call Function close Purpose Close the HSS8 device or port and release the file descriptor Arguments lt fd gt The file descriptor to be closed Returns 0 On success 1 Error occurred Errors EBADF Incorrect file descriptor specified ENODEV Incorrect device specified or device cannot be found EBUSY The adapter is busy EINTR The close system call was interrupted by a signal
29. l on the HSS8 Adapter for reading and writing e close close the device or corresponding channel on the HSS8 Adapter for reading and writing e read read from the device or receive data on the specific channel on the HSS8 Adapter e write write to the device or send data on the specific channel on the HSS8 Adapter e ioctl setup the various protocols UART HDLC BISYNC 5 1 Opening of Devices Before any device may be accessed it must be opened with the open system call The open system call returns a file descriptor which is used as a handle to the device for subsequent accesses The HSS8 Linux Software Driver allows only one instance of the device to be open at any time Hence subsequent open calls will return an error The user application should share the file descriptor between processes to access the device at any time Example For device dev hss8_A_0 fd open dev hss8_A_0 O_RDWR if fd lt 0 printf Error opening device s s n dev hss8_A_ strerror errno return 1 5 2 Configuring the Channels The HSS8 Adapter has eight Serial Communications Controllers SCCs Channels A H that support UART HDLC SDLC and BISYNC protocols and four Serial Management Controllers SMC s Channels L that support only asynchronous UART Devices hss8 JA DI 0 7 correspond to Channels A H and devices hss8_ A DI 8 11 to Channels L After a HSS8 device has been opened the us
30. lly The value on RxD CTS and CD is ignored The transmitter and receiver share the same clock source The transmitter automatically resends received data bit by bit Loopback and echo operation occur simultaneously CCII HSS8 6 MAN 003 2009 08 20 CH8MANO3 WPD Page 26 of 32 Enable Receiver transparent mode FALSE Normal receiver mode with SYNC stripping and control character recognition TRUE Transparent receiver mode SYNC s DLE s and control characters are recognised only after the leading DLE character The receiver calculates the CRC16 sequence even if it is programmed to LRC while in transparent mode Initialize prere to the CRC16 preset value before setting rx_transparant_mode Enable Reverse data Disable receiver while sending Receive and transmit parity Parity is ignored unless crc_select LRC Set diagnostic mode External loopback RS 422 485 Connect TxD to RxD TxD to RxD CLK_OUT to CLK_IN and CLK_OUT to CLK_IN External loopback RS 232 Connect TxD to RxD CLK_OUT to CLK_IN and RTS to CTS and CD CRC constant value Preset receiver transmitter CRC16 LRC These values should be preset to all ones or zeros depending on the BCS used Number of received parity errors Issue 1 2 bsync 0bv0000000ssssssss BISYNC SYNC register Contains the value of the SYNC character stripped from incoming data on receive once the receiver synchronizes to the dat
31. ncoming character When using 7 bit characters with parity include the parity bit in the character value CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 27 of 32 rccm syn length send idles or flags 0b11 00000000 0b11 11111111 Oxssss 2 bytes HSS8 BISYNC SYNL 8 HSS8 BISYNC SYNL 16 Options Ignore these bits when comparing incoming character Enable comparing the character to cc n incoming HSS8_BISYNC_SEND_IDLES HSS8_BISYNC_SEND_FLAGS_SYNCS CCII HSS8 6 MAN 003 2009 08 20 CH8MANO3 WPD Page 28 of 32 Receive control character mask A one enables comparison and a zero masks it SYNC character Should be programmed with the sync pattern HSS8 BISYNC SYNL 8 Should be chosen to implement mono sync protocol The receiver synchronizes on an 8 bit sync pattern in sync HSS8_BISYNC_SYNL_16 The receiver synchronizes on a 16 bit sync pattern stored in sync Send either idles or flags syncs between frames as defined by the protocol The flag character is equal to sync Issue 1 2 6 3 4 SMC UART Mode This protocol may only be used with the four SMC ports Ports L 6 3 4 1 SMC UART Protocol Information Structure The following structure is defined in the file hss8Controllfc h and is given here in abbreviated format i e reserved and obsolete members are not shown Always use the structure as defined in hss8Controllfc h struct hss8Sm hss8U h
32. nfoStruct hss8BitInfo CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 14 of 32 6 3 Protocol Data Structures Each protocol defines a protocol information structure used to configure a port with protocol specific options This paragraph details the information structures used by each protocol and explains the use and limitations of every structure member hss8Protocollnfo structure struct hss8ProtocolInfoStruct hss8UINT32 protocol_id union SCC info hss8UartInfo uart hss8HdlcInfo hdlc hss8BisyncInfo bisync SMC info hss8SmcUartInfo smc_uart info y typedef struct hss8ProtocolInfoStruct hss8ProtocolInfo protocol_id HSS8_PROTOCOL_UART HSS8_PROTOCOL_HDLC HSS8_PROTOCOL_BISYNC HSS8_PROTOCOL_SMC_UART CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 15 of 32 6 3 1 UART Mode This protocol may only be used with the eight SCC ports Ports A H 6 3 1 1 UART Protocol Information Structure The following structure is defined in the file hss8Controllfc h and is given here in abbreviated format i e reserved and obsolete members are not shown Always use the structure as defined in hss8Controllfc h struct hss8UartInfoStruct hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U E E E T F J P an E i
33. on n status ioctl fd HSS8_IOC_EMBEDDED_VERSION_GET firmware_string if status 0 printf Could not get current firmware version n status ioctl fd HSS8 IOC HOST VERSION GET host_string if status 0 printf Could not get current host version n printf Current driver vss n host string printf Current engine V sin engine_string printf Current firmware V s n n firmware_string HSS8 Built in Tests BITs The structure hss8Bitinfo defined in hss8Controllfc h stores each channel s statistics e g how many bytes packets have been accepted rejected sent received and how many errors were reported The ioctl system call fills in the structure with the latest data and returns it to the user application This information is available on all devices per HSS8 Adapter CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 7 of 32 5 9 5 10 Example Obtaining each channel s statistics hss8BitInfo bit_info ioctl fd HSS8_IOC_BIT_GET sbit info To clear the counters on the HSS8 Adapter use the following oct command ioctl fd HSS8_IOC_BIT_CLEAR Enable Disable Power On Self Tests Various Power On Self Tests POSTs may be enabled disabled via the ioctl system call The following macros see hss8Controllfc h define the tests HSS8 POST RAM DATA ENABLE Test the onboard RAM data bus H
34. op bits Select asynchronous normal or synchronous mode Enable normal or disable receiver while transmitting Used in multidrop mode to prevent reception of own messages Enable or disable parity checking Receive and transmit parity Parity will only be checked if parity is enabled Set diagnostic mode External RS 422 485 Connect TxD to RxD TxD to RxD CLK_OUT to CLK_IN and CLK_OUT to CLK_IN for synchronous mode loopback External loopback RS 232 Connect TxD to RxD CLK_OUT to CLK_IN for synchronous mode and RTS to CTS and CD Maximum number of bytes that may be copied into a buffer Maximum idle characters When a character is received the receiver begins counting idle characters If max_idl idle characters are received before the next data character an idle timeout occurs and the buffer is closed Thus max_idl offers a way to demarcate frames To disable the feature clear max_idl The bit length of an idle character is calculated as follows 1 data length 5 9 1 if parity is used number of stop bits 1 2 For 8 data bits no parity and 1 stop bit the character length is 10 bits Number of break characters sent by transmitter For 8 data bits no parity 1 stop bit and 1 start bit each break character consists of 10 zero bits 0 65 535 Number of received parity errors CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 18 of 32 f
35. peed channels are jumper configurable on a per channel basis for RS 232 or RS 422 485 drivers while the lower speed channels have RS 232 drivers only The HSS8 Linux Software Driver is a low level device dependent interface for transferring data over a Cl Systems HSS8 Adapter The HSS8 Linux Software Driver binaries are provided with explicit installation instructions 1 3 Document Overview This document gives an overview of the HSS8 Linux Software Driver installation procedure and its Software Driver Interface CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 1 of 32 2 Applicable and Reference Documents 2 1 Applicable Documents 2 1 1 MPC8260 PowerQUICC II Family Reference Manual MPC8260UM D rev 1 dated May 2003 2 1 2 CCII HSS8 6 MAN 001 Hardware Reference Manual for the 4 Channel New Generation and 8 Channel High Speed Serial I O Adapters 2 2 Reference Documents None CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 2 of 32 3 HSS8 Linux Software Driver Distribution The HSS8 Linux Software Driver software distribution consists of at least the following files ccHss8LnxSrcV lt version gt tar gz HSS8 Linux Software Driver source code lt version gt Software version is a 3 digit integer e 1stdigit version number e 2nddigit revision number e 8rddigit beta number ccHss8EmbV lt version gt hex HSS8 firmware lt version gt Software version is a 3 digit integer
36. rmec 0 65 535 Number of received characters with framing errors nosec 0 65 535 Number of received characters with noise errors brkec 0 65535 Number of break conditions on the signal uaddr1 uaddr2 0x0000 OXOOFF Address in multidrop mode Only the lower 8 bits are used so the upper 8 bits should be cleared toseq 0x0000 OXOOFF Transmit out of sequence character e g XON XOFF cccccccc Valid entry Control character 1 to 8 These cccccccc Cntry not valid and is not used characters can be used to delimit received messages 6 bits Reserved Initialise to zero cccccccc 8 bits Defines control characters to be compared to the incoming character 0b11 00000000 Ignore these bits when comparing Receive control character mask A incoming character one enables comparison and a 0b11 11111111 Enable comparing the incoming zero masks it character to cc n CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 19 of 32 6 3 2 HDLC Mode This protocol may only be used with the eight SCC ports Ports A H 6 3 2 1 HDLC Protocol Information Structure The following structure is defined in the file hss8Controllfc h and is given here in abbreviated format i e reserved and obsolete members are not shown Always use the structure as defined in hss8Controllfc h struct hss8Hdl hss8UIN hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U hss8U
37. ry area ENOTTY The specified request does not exist ENOMEM E Internal temporary kernel memory allocation failed EBUSY HSS8 Adapter may be busy include lt sys ioctl h gt int ioctl int fd int request CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 13 of 32 6 2 HSS8 BIT Data Structures The following structures define the HSS8 BIT variables defined in hss8Controllfc h BIT Structures struct hss8BoardBitInfoStruct E hss8UINT32 board_number hss8UINT32 firmware_version hss8UINT32 firmware_revision hss8UINT32 firmware_beta char firmware_creation_date 30 typedef struct hss8BoardBitInfoStruct hss8BoardBitInfo struct hss8SendBitInfoStruct hss8Count nr_accepted hss8Count nr_rejected hss8Count nr_errors hss8Count nr_sent hss8Count nr_bytes_accepted hss8Count nr_bytes_rejected hss8Count nr_bytes_sent j typedef struct hss8SendBitInfoStruct hss8SendBitinfo struct hss8ReceiveBitinfoStruct hss8Count nr_buffers_busy hss8Count nr_received hss8Count nr_bytes_received hss8Count nr_errors typedef struct hss8ReceiveBitinfoStruct hss8ReceiveBitInfo Main BIT Structure struct hss8BitInfoStruct y hss8BoardBitInfo board_bit hss8SendBitInfo tx_scc_bit HSS8_HW_NR_SCC hss8ReceiveBitInfo rx_scc_bit HSS8_HW_NR_SCC hss8SendBitInfo tx_smc_bit HSS8_HW_NR_SMC hss8ReceiveBitInfo rx_smc_bit HSS8_HW_NR_SMC typedef struct hss8BitI
38. s 2009 08 22 CCII HSS 6 ECP 042 CCII HSS8 6 MAN 003 2009 08 22 Issue 1 2 ost o Contents Te CODE ccs sasha ta eRe nae A N S 1 1 1 Identifications a a do wat dace eee 1 1 2 SYSTEM OVOIVIW 2 ve tee ee bein ee Meth bine a Pern tele eee Gale Bier ete oe ki nd rete Pied 1 1 3 DOCUMENT Overvie sensi A Calne eed ean Peta E bem wee Dees 1 2 Applicable and Reference Documents 00000 ee 2 2 1 Applicable Documents sasi ee od da ee Se e eee a 2 2 2 Reference Document a a lA 2 3 HSS8 Linux Software Driver Distribution naana aaaea eeaeee 3 4 Installation Procedure i cent oi rra va nin Ok way bed wie hed ne en 4 4 1 Compiling the HSS8 Linux Software Driver Module uaaa 4 4 2 Loading the HSS8 Linux Software Driver 00 000 cece ttt 4 5 Using the HSS8 Linux Software Driver aaa 5 Opening of Devices 0 nts 5 5 Configuring the Channels asana aaea 5 5 3 Adding Receive Call back Function 0 0 cee tte eens 6 5 4 Reading in Received Data cette 6 5 5 Writing Datta ea is hte bad hie Det BAe ae Pec A pee ee Boe i ae eh ws a bee ite ea aS 7 5 6 GIOSING NE DEVICES orinar rt ket Sha bate dy de aces han S 7 5 7 Obtaining the Current Host and Firmware Version Number aaa 7 5 8 HSSs8 Built in Tests BITS J rrasa is is A A Ee eats it are dae Ba 7 5 9 Enable Disable Power On Self Tests 00 ccc ccc eee eee een nee 8 5 10
39. ss8U hss8U hss8U hss8U hss8U hss8U hss8U HHHHHHHH A A AA AA AnA y cUartInfoStruct T32 T32 T32 T32 T32 T32 T32 T32 max_receive_bytes max_idl data_bits stop_bits parity_enable parity_mode diag_mode baud_rate typedef struct hss8SmcUartInfoStruct hss8SmcUartInfo CCII HSS8 6 MAN 003 2009 08 20 Issue 1 2 CH8MANO3 WPD Page 29 of 32 6 3 4 2 SMC UART Protocol Information Structure Members ama Js NT besim UT baud rate 1 200 115 2 kbit s RS 232 RS 422 485 Any values permissible The equation to calculate the actual baud rate for the SMC UART is as follows Actual baud rate 100 MHz 16 ROUND 100 MHz 16 Desired baud rate Where ROUND implies that the result is rounded to the nearest integer Used to specify a single baud rate for both transmitter and receiver Units in bit s stop bits HSS8_UART_STOP_BITS_ONE Number of full stop bits HSS8_UART_STOP_BITS_TWO HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA HSS8_UART_DATA data_bits Number of data bits Note Only Channels H i e the SMC channels support nine or more data bits parity_enable HSS8_UART_PARITY_NO_PARITY Enable or disable parity checking g HSS8_UART_PARITY_ENABLE HSS8_UART_SMC_PARITY_ODD parity_mode HSS8_UART_SMC_PARITY_EVEN
40. tic mode For synchronous mode see encoding_method Issue 1 2 CH8MANO3 WPD Page 21 of 32 HSS8_DIAG_LOOPBACK Internal loopback TxD and RxD are connected internally The value on RxD CTS and CD is ignored The transmitter and receiver share the same clock source HSS8_DIAG_ECHO The transmitter automatically resends received data bit by bit HSS8_DIAG_LOOPBACK_EC Loopback and echo operation HO occur simultaneously max_receive_bytes 1 to 2 048 CRC bytes 2 or 4 default or up to 32 KBytes CRC Maximum number of bytes to A bytes 2 or 4 depending on how many bytes have been allocated receive before closing buffer Set to the RX and TX buffers See function hss8Create_device equal to max_frame_bytes max frame bytes 1 to 2 048 default or up to 32 kBytes depending on how many Maximum number of bytes per a Ti bytes have been allocated to the RX and TX buffers See function frame Set equal to the number hss8Create_device of data bytes plus the number of CRC bytes either two or four per frame address mask 0x0000 OxFFFF HDLC address mask Aone enables comparison and a zero masks it address1 address2 0x0000 OxFFFF Four address registers for address3 address4 address recognition The SCC 8 reads the frame address from the HDLC receiver compares it with the address registers and masks the result with address_mask For example to recognize a frame that

Download Pdf Manuals

image

Related Search

Related Contents

SERVICE MANUAL  User Manual  ZUMA-NACHRICHTEN  Kyocera FS-3700 User's Manual  USER`S MANUAL - PEWD -  Hornos de la serie PRO 200  VFX 9.5 – What is new?  HP LP2275w monitor + Flat Panel Speaker  Brivis DRCi Wired Programmable Controller  AMORFO-2N  

Copyright © All rights reserved.
Failed to retrieve file