Part Number Hot Search : 
P010236 STPR8 CX6VSM2 EA10952 001591 CNL500 BU305 1017405
Product Description
Full Text Search
 

To Download MK50H28DIP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  mk50h28 multi logical link frame relay controller section 1 - features based on itu q.933 annex a and t1.617 an- nex d standards for frame relay service and additional pocedures for permanent virtual circuits(pvcs). optional transparent mode (no lmi protocol processing - all frame data received). local management link protocol with optional bi-directional message processing. detects and indicates service-affecting errors in the timing or content of events. programmable timers/counters: nt1/t391, nt2/t392, nn1/n391, nn2/n392, nn3/n393 and dn1 for the lmi/liv channel. provides error counters for the lmi channel and congestion statistics for all the active channels. lmi/liv frames can be transmitted/received on dlci 0 or 1023. supports reception of up to 4 octets of address field with a maximum of 8192 active channels or dlcis (data link connection identifiers) priority dlci scheme for channels requiring higher rate of service. buffer management includes: - initialization block - address look up table - context table - separate receive and transmit rings of vari- able size for each active channel on chip dma control with programmable burst length. handles all hdlc frame formatting: - zero bit insertion and deletion - fcs (crc) generation and detection - frame delimiting with flags programmable minimum frame spacing on transmission (1-62 flags between frames). selectable fcs (crc) of 16 or 32 bits. testing facilities: internal loopback, silent loopback, clockless loopback, and self test. system clock rates up to 25 mhz. cmos process; fully compatible with both 8 and 16 bit systems; all inputs and outputs are ttl compatible. programmable for full or half duplex operation. pin-for-pin compatible and architecturally the same as the mk50h25 (x.25/lapd) and mk50h27 (ccs#7). section 2 - description the stmicroelectronics mk50h28 multi-logical link communications controller is a cmos vlsi device which provides link level data communica- tions control for frame relay applications on per- manent virtual circuits (pvcs). the mk50h28 will perform frame formating including: frame de- limiting with flags, transparency (so-called obit- stuffingo), plus fcs (crc) generation and detec- tion. it also supports local management interface (lmi) protocol with the ooptional bidirectional pro- cedureso (annex d, t1.617 - 1991 and t1.617a- 1994). one of the outstanding features of the mk50h28 is its buffer management which includes on-chip dual channel dma. this feature allows users to receive and transmit multiple data frames at a time. (a conventional serial communications con- trol chip plus a separate dma chip would handle data for only a single block at a time.) the march 2000 dip48 plcc52 ? 1/64
mk50h28 will move multiple blocks of receive and transmit data directly into and out of memory through the host's bus. moreover, the memory management capability includes the chaining of long frames. a possible system configuration for the mk50h28 is shown in figure 1. the mk50h28 may be used with any of several popular 16 and 8 bit microprocessors, such as 68000, 6800, z8000, z80, lsi- 11, 8086, 8088, 8080, etc. the mk50h28 may be operated in either full or half duplex mode. in half duplex mode, the rts and cts modem control pins are provided. in full duplex mode, these pins become user program- mable i/o pins. all signal pins on the mk50h28 are ttl compatible. this has the advantage of making the mk50h28 independent of the physical interface. as shown in figure 1, line drivers and receivers are used for electrical connection to the physical layer. description (continued) vss-gnd dal07 dal06 dal05 dal04 dal03 dal02 dal01 dal00 read intr dali dalo das bmo, byte, busrel bmi, busako hold, busrq ale, as cs adr ready reset vss-gnd 24 hlda 1 2 3 4 5 6 7 8 9 10 11 12 13 14 48 47 46 45 44 43 42 41 40 39 38 37 36 23 22 21 20 19 18 17 16 15 35 34 33 32 31 30 29 28 27 26 25 tclk a18 a19 a20 a21 a22 a23 rd dsr, cts td sysclk rclk dtr, rts vcc (+5v) dal08 dal09 dal10 dal11 dal12 dal13 dal14 dal15 a16 a17 m k 5 0 h 2 8 dip48 pin connection (top view) mk50h28 2/64
gnd dal07 dal06 dal05 dal04 dal03 dal02 dal01 dal00 read intr dali dalo das 8 7 1 52 47 46 34 33 21 20 bmo/byte/busrel no connect bm1/busako hold/busrq ale/as hlda cs adr ready reset gnd tclk no connect dtr/rts rclk sysclk td dsr/cts rd a23 no connect a22 a21 a20 a19 a18 a17 a16 dal15 dal13 dal14 vcc dal08 dal09 dal10 dal11 dal12 no connect mk50h28q plcc52 pin connection (top view) mk50h28 3/64
signal name pin(s) type description dal<15:00> 2-9 40-47 [2-10 44-51] io/3s the time multiplexed data/address bus. during the address portion of a memory transfer, dal<15:00> contains the lower 16 bits of the memory address. during the data portion of a memory transfer, dal<15:00> contains the read or write data, depending on the type of transfer. read 10 [11] io/3s read indicates the type of operation that the bus controller is performing during a bus transaction. read is driven by the mk50h28 only while it is the bus master. read is valid during the entire bus transaction and is tristated at all other times. mk50h28 as a bus slave : read = high - data is placed on the dal lines by the chip. read = low - data is taken off the dal lines by the chip. mk50h28 as a bus master : read = high - data is taken off the dal lines by the chip. read = low - data is placed on the dal lines by the chip. intr 11 [12] o/od interrupt is an attention interrupt line that indicates that one or more of the following csr0 status flags is set: miss, merr, rint, tint or pint. interrupt is enabled by csr0<09>, inea=1. dali 12 [13] o/3s dal in is an external bus transceiver control line. dali is driven by the mk50h28 only while it is the bus master. dali is asserted by the mk50h28 when it reads from the dal lines during the data portion of a read transfer. dali is not asserted during a write transfer. dalo 13 [14] o/3s dal out is an external bus transceiver control line. dalo is driven by the mk50h28 only while it is the bus master. dalo is asserted by the mk50h28 when it drives the dal lines during the address portion of a read transfer or for the duration of a write transfer. das 14 [15] io/3s data strobe defines the data portion of a bus transaction. by definition, data is stable and valid at the low to high transition of das. this signal is driven by the mk50h28 while it is the bus master. during the bus slave operation, this pin is used as an input. at all other times the signal is tristated. bmo byte busrel 15 [16] io/3s i/o pins 15 and 16 are programmable through csr4. if bit 06 of csr4 is set to a one, pin 15 becomes input busrel and is used by the host to signal the mk50h28 to terminate a dma burst after the current bus transfer has completed. if bit 06 is clear then pin 15 is an output and behaves as described below for pin 16. bm1 busako 16 [18] o/3s pins 15 and 16 are programmable through bit 00 of csr4 (bcon). if csr4<00> bcon = 0, i/o pin 15 = bmo (o/3s) i/o pin 16 = bm1 (o/3s) byte mask<1:0> indicates the byte(s) on the dal to be read or written during this bus transaction. mk50h28 drives these lines only as a bus master. mk50h28 ignores the bm lines when it is a bus slave. byte selection is done as outlined in the following table. bm1 bm0 type of transfer low low entire word low high upper byte (dal<15:08>) high low lower byte (dal<07:00>) high high none table 1 - pin description legend: i input only o output only io input / output 3s 3-state od open drain (no internal pull-up) note: pin out for 52 pin plcc is shown in brackets. mk50h28 4/64
table 1: pin description (continued) signal name pin(s) type description if csr4<00> bcon = 1, i/o pin 15 = byte (o/3s) i/o pin 16 = busako (o) byte selection is done using the byte line and dal<00> latched during the address portion of the bus transaction. mk50h28 drives byte only as a bus master and ignores it when a bus slave. byte selection is done as outlined in the following table. byte dal<00> type of transfer low low entire word low high illegal condition high low lower byte high high upper byte busako is a bus request daisy chain output. if mk50h28 is not requesting the bus and it receives hlda, busako will be driven low. if mk50h28 is requesting the bus when it receives hlda, busako will remain high note: all transfers are entire word unless the mk50h28 is configured for 8 bit operation. hold busrq 17 [19] io/od pin 17 is configured through bit 0 of csr4. if csr4<00> bcon = 0, i/o pin 17 = hold hold request is asserted by mk50h28 when it requires a dma cycle, if hlda is inactive, regardless of the previous state of the hold pin. hold is held low for the entire ensuing bus transaction. if csr4<00> bcon = 1, i/o pin 17 = busrq busrq is asserted by mk50h28 when it requires a dma cycle if the prior state of the busrq pin was high and hlda is inactive. busrq is held low for the entire ensuing bus transaction. ale as 18 [20] o/3s the active level of address strobe is programmable through csr4. the address portion of a bus transfer occurs while this signal is at its asserted level. this signal is driven by mk50h28 while it is the bus master. at all other times, the signal is tristated. if csr4<01> acon = 0, i/o pin 18 = ale address latch enable is used to demultiplex the dal lines and define the address portion of the transfer. as ale, the signal transitions from high to low during the address portion of the transfer and remains low during the data portion. if csr4<01> acon = 1, i/o pin 18 = as as as, the signal pulses low during the address portion of the bus transfer. the low to high transition of as can be used by a slave device to strobe the address into a register. as is effectively the inversion of ale. hlda 19 [21] i hold acknowledge is the response to hold. when hlda is low in response to mk50h28's assertion of hold, the mk50h28 is the bus master. hlda should be deasserted only after hold has been released by the mk50h28. cs 20 [22] i chip select indicates, when low, that the mk50h28 is the slave device for the data transfer. cs must be valid throughout the entire transaction. adr 21 [23] i address selects the register address port or the register data port. it must be valid throughout the data portion of the transfer and is only used by the chip when cs is low. adr port low register data port high register address port ready 22 [24] io/od when the mk50h28 is a bus master, ready is an asynchronous acknowledgement from the bus memory that memory will accept data in a write cycle or that memory has put data on the dal lines in a read cycle. mk50h28 5/64
table 1: pin description (continued) signal name pin(s) type description as a bus slave, the mk50h28 asserts ready when it has put data on the dal lines during a read cycle or is about to take data from the dal lines during a write cycle. ready is a response to das and it will be released after das or cs is negated. reset 23 [25] i reset is the bus signal that will cause mk50h28 to cease operation, clear its internal logic and enter an idle state with the power off bit of csr0 set. tclk 25 [28] i transmit clock. a 1x clock input for transmitter timing. td changes on the falling edge of tclk. the frequency of tclk may not be greater than the frequency of syscl dtr rts 26 [29] io data terminal ready, request to send. modem control pin. pin 26 is configurable through csr5. this pin can be programmed to behave as output rts or as programmable io pin dtr. if configured as rts, the mk50h28 will assert this pin if it has data to send and throughout the transmission of a signal unit. rclk 27 [30] i receive clock. a 1x clock input for receiver timing. rd is sampled on the rising edge of rclk. the frequency of rclk may not be greater than the frequency of sysclk. sysclk 28 [31] i system clock. system clock used for internal timing of the mk50h28. sysclk should be as defined in the electrical specifications in section 5. td 29 [32] o transmit data. transmit serial data output. dsr cts 30 [33] io data set ready, clear to send. modem control pin. pin 30 is configurable through csr5. this pin can be programmed to behave as input cts or as programmable io pin dsr. if configured as cts, the mk50h28 will transmit all ones while cts is high. rd 31 [34] i receive data. received serial data input. a<23:16> 32-39 [37-43] o/3s address bits <23:16> used in conjunction with dal<15:00> to produce a 24 bit address. mk50h28 drives these lines only as a bus master. a23-a20 may be driven continuously as described in the csr4<7> bae bit. vss-gnd 1,24 [1,26] ground pins vcc 48 [52] power supply pin +5.0 vdc + 5% section 3 operational description the stmicroelectronics mk50h28 multi-logical link communications controller device is a vlsi product intended for high performance data com- munication applications requiring frame relay service on permanent virtual circuits. the mk50h28 will perform all frame formatting, such as: frame delimiting with flags, fcs (crc) gen- eration and detection, and zero bit insertion and deletion for transparency. the mk50h28 also in- cludes a buffer management mechanism that al- lows the user to transmit and/or receive multiple frames for each active channel or dlci. con- tained in the buffer management is an on-chip dual channel dma: one channel for receive and one channel for transmit. the mk50h28 can be used with any popular 16 or 8 bit microprocessor. a possible system con- figuration for the mk50h28 is shown in figure 1. this document assumes that the processor has a byte addressable memory organization. the mk50h28 will move multiple blocks of re- ceive and transmit data directly in and out of memory through the host's bus. the mk50h28 may be operated in full or half du- plex mode. in half duplex mode the rts and cts modem control pins are provided. in full du- plex mode, these pins become user programma- ble i/o pins. all signal pins on the mk50h28 are ttl compat- ible. this has the advantage of making the mk50h28 independent of the physical interface. as shown in fig. 1, line drivers and receivers are used for electrical connection to the physical layer. mk50h28 6/64
host processor (68000, 80186, z8000, etc) 16-bit data bus including 24-bit address and bus control memory (multiple data blocks) mk50h28 rd td line drivers and receivers (such as rs-449, rs-232c, v.35) data comm. connector electrical i/o (such as rs-232c, rs-423, rs-422) tclk rclk dsr, cts dtr, rts figure 1: possible system configuration for the mk50h28 mk50h28 7/64
dali dalo hlda hold ale, as bm0 bm1 das read intr adr ready dtr, rts dsr, cts cs firmware rom micro controller timers dma controller control / status registers 0 - 5 sysclk internal bus receiver fifo transmitter fifo receiver transmitter loopback test rd rclk tclk td vss - gnd reset vcc dal <15:00> a <23:16> figure 2: mk50h28 simplified block diagram mk50h28 8/64
3.1 functional blocks refer to the block diagram in figure 2. the mk50h28 is primarily initialized and control- led through six 16-bit control and status regis- ters (csr0 thru csr5). the csr's are accessed through two bus addressable ports, the register address port (rap), and the register data port (rdp). the mk50h28 may also generate an in- terrupt(s) to the host. these interrupts are en- abled and disabled through csr0. the on-chip microcontroller is used to control the movement of parallel receive and transmit data, and to handle the address field filtering. 3.1.1 microcontroller the microcontroller controls all of the other blocks of the mk50h28. the microcontroller performs frame processing and protocol processing. all primitive processing and generation is also done here. the microcode rom contains the control program of the microcontroller. 3.1.2 receiver serial receive data comes into the receiver (fig- ure 2). the receiver is responsible for: 1. leading and trailing flag detection. 2. deletion of zeroes inserted for transparency. 3. detection of idle and abort sequences. 4. detection of good and bad fcs (crc). 5. monitoring receiver fifo status. 6. detection of receiver over-run. 7. odd byte detection. note: if frames are received that have an odd number of bytes then the last byte of the frame is said to be an odd byte. 8. detection of non-octet aligned frames. such frames are treated as invalid frames. 3.1.3 transmitter the transmitter is responsible for: 1. serialization of outgoing data. 2. generating and appending the fcs (crc). 3. framing the outgoing frame with flags. 4. zero bit insertion for transparency. 5. transmitter under-run detection. 6. transmission of odd byte. 7. rts/cts control. 3.1.4 frame check sequence or cyclic re- dundancy check the fcs (crc) on the transmitter or receiver may be either 16 bit or 32 bit, and is user select- able. for full duplex operation, both the receiver and transmitter have individual fcs computation circuits. the characteristics of the fcs are: transmitted polarity: inverted transmitted order: high order bit first pre-set value: all 1's polynomial 16 bit: x 16 +x 12 +x 5 +1 remainder 16 bit (if received correctly): high order bit-->0001 1101 0000 1111 polynomial 32 bit: x 32 +x 26 +x 23 +x 22 +x 16 +x 12 +x 11 +x 10 + +x 8 +x 7 +x 5 +x 4 +x 2 +x+1 remainder 32 bit (if received correctly): high order bit-->1100 0111 0000 0100 1101 1101 0111 1011 3.1.5 receive fifo the receive fifo buffers the data received by the receiver. this performs two major functions. first, it resynchronizes the data from the receive clock to the system clock. second, it allows the microcontroller time to finish whatever it may be doing before it has to process the received data. the receive fifo holds the data from the receiver without interrupting the microcontroller until it con- tains enough data to reach the watermark level. this watermark level can be programmed in csr4 to occur when the fifo contains at least 18 or more bytes; 34 or more bytes; or 50 or more bytes. this programmability , along with the programmable burst length of the dma controller, enables the user to define how often and for how long the mk50h28 must use the host bus. for more information, see control/status register 4. for example, if the watermark level is set at 34 bytes and the burst length is limited to 8 word transfers at a time, the mk50h28 will request control of the host bus as soon as 34 bytes are received and again after every 16 subsequent bytes. 3.1.6 transmit fifo the transmit fifo buffers the data to be trans- mitted by the mk50h28. this also performs two major functions. first, it resynchronizes the data from the system clock to the transmit clock. sec- ond, it allows the microcontroller and dma con- troller to burst read data from the host's memory buffers; making both the mk50h28 and the host bus more efficient. mk50h28 9/64
3.1.7 dma controller the mk50h28 has an on-chip dma controller cir- cuit. this allows it to access memory without re- quiring host software intervention. whenever the mk50h28 requires access to the host memory it will negotiate for mastership of the bus. upon gaining control of the bus the mk50h28 will begin transferring data to or from memory. the mk50h28 will perform memory transfers until either it has nothing more to transfer, it has reached its dma burst limit (user programmable), or the busrel pin is driven low. in any case, it will complete the current bus transfer before re- leasing bus mastership back to the host. if during a memory transfer, the memory does not respond within 256 sclk cycles, the mk50h28 will re- lease ownership of the bus immediately and the merr bit will be set in csr0. the dma burst limit can be programmed by the user through csr4. in 16 bit mode the limit can be set to 1 word, 8 words, or unlimited word transfers. in 8 bit mode,it can be set to 2 bytes, 16 bytes, or un- limited byte transfers. for high speed data lines (i.e. > 1 mbps) a burst limit of 8 words, 16 bytes or unlimited is suggested to allow maximum throughput. the byte ordering of the dma transfers can be programmed to account for differences in proces- sor architectures or host programming languages. byte ordering can be programmed separately for data and control information. data information is defined as all contents of data buffers; control in- formation is defined as anything else in the shared memory space (i.e. initialization block, de- scriptors, etc). for more information see section 4.1.2.5 on control and status register 4. 3.1.8 bus slave circuitry the mk50h28 contains a bank of internal con- trol/status registers (csr0-5) which can be ac- cessed by the host as a peripheral. the host can read or write to these registers like any other bus slave. the contents of these registers are listed in section 4 and bus signal timing is described in figures 13 and 14. 3.2 memory/buffer management overview the mk50h28 memory structure (fig. 3) consists of various blocks of off-chip memory. only the control/status registers, some ram and firmware rom are onboard the chip. the initialization block, priority dlci block, status buffer, address lookup table (alt), context table (ct), trans- mit/receive rings and buffers are in the off-chip memory. the buffer management is a circular queue of tasks in memory called descriptor rings. there are separate rings to describe the transmit and receive operations. the mk50h28 buffer man- agement mechanism will handle data frames which are longer than the length of an individual buffer. this is done by a chaining method which utilizes multiple buffers. the mk50h28 tests the next segment in the descriptor ring in a look- ahead manner. if the packet is too long for one buffer, the next buffer will be used after filling the first buffer (that is chained to the previous buffer). the mk50h28 will then look ahead to the next buffer, and chain that buffer also if necessary, and so on. 3.2.1 initialization block the mk50h28 initialization information is located in a block of off- chip memory called the initializa- tion block. the initialization block consists of 44 contiguous words of memory starting on a word boundary. the starting address for the initializa- tion block, iadr, is defined in the csr2 and csr3 registers inside the mk50h28. this mem- ory is assembled by the host, and the first 15 words are accessed by the mk50h28 during in- itialization. the initialization block (refer to sec- tion 4.2) is comprised of: a. mode of operation. b. the nn1, nn2, and nn3 counters. c. the dn1(max frame length) counter. d. the nt1, nt2 and tp (transmit polling) timers. e. pointer to the beginning of context table. f. pointer to the beginning of address lookuptable. g. pointer to the beginning of status buffer. h. error counters and statistics. 3.2.1.1 priority dlci block (pdb) the priority dlci block consists of context table indices for the priority channels. these indices are a mechanism through which the host can de- mand the mk50h28 to immediately service cer- tain desired dlcis. the host should first set up entries in the pdb before setting the ptdmd bit in csr2. in response to that, the mk50h28, after completing transmission service of its current dlci, will jump to the pdb rather than advancing to the next entry in the context table. after servic- ing all active entries in the pdb, the mk50h28 will return to the context table and resume the transmission service that was in progress before it was interrupted. 3.2.1.2 interrupt descriptor rings the mk50h28 has two descriptor ring structures for the purpose of queing transmit and receive interrupts. the pointers to these two descriptor rings are located at iadr+24 thru iadr+30 in the initialization block. these descriptor rings are of mk50h28 10/64
a fixed size of 128 entries each. each entry will consist of two 16-bit words containing the24-bit address of the context table entry (xctadr or rctadr) corresponding to the interrupt, a 7-bit field for the descriptor index (curxd or currd) into the associated descriptor ring, and a bit srvc which is used to indicate whether the inter- rupt has been serviced. the srvc bit is set by the mk50h28 when it writes an interrupt to the in- terrupt ring, and it should be cleared by the host when it services the interrupt. if the mk50h28 at- tempts to write an interrupt to the interrupt de- scriptor ring and finds that srvc is not clear then it will issue a provider primitive 7 to indicate an interrupt ring miss (with pparm=0 to indicate a receive interrupt ring miss or pparm=1 to indi- cate a transmit interrupt ring miss). 3.2.2 address lookup table(alt) the alt contains the maximum of 1024 or 8192 addresses formed by the data link connection identifier (dlci). the mk50h28 can support upto 4 octets of address field. the alt is used to iden- tify which of the 1024 or 8192 addresses are ac- tive. for each active channel it has an index to the context table(ct). the alt is only used by the receive process of the mk50h28. 3.2.3 context table(ct) the mk50h28 performs multi-tasking by means of a context table. each entry in this table con- tains all the information relevant to one dlci channel. associated with each dlci are a set of descriptor rings that are used for transmitting and receiving frames. all channel entries, except the lmi channel,, have equal priority. the mk50h28 scans each entry in the ct sequentially, or through the use of an index pointer mechanism, for any available frames to be transmitted. when a user primitive 8 with uparm=2 is issued to the mk50h28. polling of the lmi/liv channel will be enabled to occur between each poll of the other ct entries. 3.2.4 transmit descriptor ring(s) the transmit descriptor ring is a circular queue of tasks that point to data buffers. a variable number of buffers may be queued-up on a descriptor ring awaiting execution by the mk50h28. the de- scriptor ring has a segment assigned to each buffer. each segment holds a pointer for the starting address of the buffer, and holds values for the length of the buffer and the length of the frame to be transmitted. each segment also con- tains an owna control bit to denote whether the mk50h28, or the host oownso the buffer. for transmit, when the mk50h28 owns the buffer, the mk50h28 is allowed and commanded to transmit the contents of the buffer. when the mk50h28 does not own the buffer, it will not transmit the data in that buffer. 3.2.5 receive descriptor ring(s) the receive descriptor ring is circular queue of tasks that point to data buffers. a variable number of buffers may be queued-up on a descriptor ring awaiting execution by the mk50h28. the de- scriptor ring has a segment assigned to each buffer. each segment holds a pointer for the starting address of the buffer, and holds values for the length of the buffer and the length of the frame received. each segment also contains an owna control bit to denote whether the mk50h28, or the host oownso the buffer. for receive, when the mk50h28 owns the buffer, the mk50h28 may place received data into that buff- er. conversely, when the mk50h28 does not own a receive buffer, it will not place received data in that buffer. 3.2.6 frame format the frame format supported by the mk50h28 is shown below. each frame may consist of a pro- grammable number of leading flag patterns (01111110), an address field, an information field, an fcs (crc) of either 16 or 32 bits, and a trail- ing flag pattern. the number of leading flags transmitted is programmable through the mode register in the initialization block. the mk50h28 is capable of transmitting and receiving a single flag between adjacent frames. transmitted first 3.2.7 mk50h28 supported frame types the mk50h28 supports all frame types shown in table 1. in lmi, both user and network modes of operation, along with ooptional bidirectional network procedureso (annex d, ansi t1.617 - 1991) are supported. address info flag 16/24/32 8*n 8 flag fcs 8 16/32 mk50h28 11/64
init block ptr to init mode ptr to alt ptr to status ptr to ct address lookup table ring0 xmit buff 0 buff address buff size buff msg cnt desc 0 timer values act. chnl (1 entry/act. chnl) buffers data active chnl. 1 active chnl. n table context ring n xmit buff size buff msg cnt desc 0 desc 1 desc m buff m desc 1 desc n buff address buff 1 buff 1 buff n lmi error status buffer csr2, csr3 counters buff 0 rx ring n desc 0 desc 1 buff 0 buff y desc y buffers data buff address buff size buff msg cnt buff 1 rx ring 0 desc 0 desc 1 buff 0 buff x desc x buffers data buff address buff size buff msg cnt buff 1 desc ring ptrs active chnl. 0 cong statistics dlci / address cong statistic s dlci / address desc ring ptrs cong statistics dlci / address desc ring ptrs buffer (dlci 0 to dlci 1024 priority dlci block or dlci 8192) rx interrupt ring desc 0 desc 1 desc 127 rx ct address current rx desc service bit tx interrup t ring desc 0 desc 1 desc 127 tx ct address current tx desc service bit ptr to tint dr ptr to rint dr figure 3: mk50h28 memory management structure mk50h28 12/64
3.2.8 modes of protocol operation the user mode of operation is entered by issuing an auto lmi primitive 7 with uparm=0. in this mode, the device transmits status enquiry messages to the network with an interval deter- mined by the nt1 timer. after every nn1 transmis- sions of status enquiry with report type of olength integrity verification (liv) onlyo the mk50h28 transmits a status enquiry with report type of ofull statuso. when a status frame is received in response to a status enquiry(liv only), the receive se- quence number received from the network side is checked against the user send sequence num- ber. a received full status frame will be stored into the lmi/liv channel buffer, the sequence number checking will be performed, and its recep- tion will be indicated to the host via provider primitive 13. an available transmit or receive buff- er is not required for the mk50h28 automatic processing of oliv onlyo frames. a received asynchronous status frame will be stored into the lmi/liv channel buffer and its re- ception will be indicated to the host via provider primitive 14. if a status enquiry frame (full or liv only) is received in this mode of operation, the mk50h28 will discard the frame and incre- ment the discarded frames counter in context table enrtry 0. also see nt1 description in 4.2.2 timer/counter section. the network mode of operation is entered by is- suing an auto lmi primitive 7 with uparm=1. in this mode, the device automatically responds to status enquiry with report type of olength integrity verification (liv) onlyo by transmitting a status frame with report type of oliv onlyo along with restarting the nt2 timer. an available transmit or receive buffer is not required for the mk50h28 automatic processing of oliv onlyo frames. when a status enquiry with report type of ofull statuso is received, the device issues the lmi received primitive 13 (with pparm=1) and expects the host to respond with an lmi status request primitive 11 with uparm=0 (when the host is ready to transmit the full status frame). asynchronous status frames may be transmit- ted by placing the data to be transmitted into the appropriate buffer and issueing primtive 11 with uparm=2. if a status frame (full, liv only, or asynchronous) is received in this mode of opera- tion, the mk50h28 will discard the frame and in- crement the discarded frames counter in con- text table enrtry 0. also see nt2 description in 4.2.2 timer/counter section. the bi-directional network procedures mode is entered by issuing an auto lmi primitive 7 with uparm=2. the mk50h28 supports this opera- tion using separate user and network sequence numbers and n392 and n393 counters. in this mode, the device transmits status enquiry messages with a user set of sequence numbers at an interval determined by the nt1/t391 timer. the expected response is a status frame with corresponding sequence numbers. after every nn1/n391 transmissions of status enquiry with report type of oliv onlyo, the mk50h28 transmits a status enquiry with report type of ofull statuso. a received full status frame will be stored into the lmi/liv channel buffer, the sequence number checking will be performed, and its reception will be indicated to the host via provider primitive 13. a received asynchronous status frame will be stored into the lmi/liv channel buffer and its re- ception will be indicated to the host via provider primitive 14. in this mode, the device also automatically re- sponds to status enquiry (oliv onlyo) by transmitting a status (oliv onlyo) frame along with restarting the nt2 timer. when a ofull statuso table 1 - mk50h28 frame types information element name direction message type encoding msb lsb message type status_enquiry user -> network 0 1 1 1 0 1 0 1 status network -> user 0 1 1 1 1 1 0 1 update_status network <-> user 0 1 1 1 1 0 1 1 notes: 1. status_enquiry frame - this frame has the format as shown in figure 4. 2. status frame - this frame has the format as shown in figure 5. if full status information is to be sent, the host must specify the pvc_status information element(s) in the transmit buffer(s). 3. asynchronous status frame - this frame has the format as shown in figure 6. the host must specify the pvc_ status information element in the transmit buffer(s). 4. update_status frame - not used in most current applications, mk50h28 supported for backwards compatibility. mk50h28 13/64
status enquiry is received, the device is- sues the lmi received primitive 13 (with pparm=1) and expects the host to respond with lmi status request primitive 11 with uparm=0 (when the host is ready to transmit the full status frame). asynchronous status frames may be transmit- ted by placing the data to be transmitted into the appropriate buffer and issueing primtive 11 with uparm=2. lmi frames received in any mode will not cause receive interrupts (rint) to be generated, nor will the receive interrupt ring be updated. in- stead, the mk50h28 will issue primitives corre- sponding to those lmi frame received which are not automatically processed by the mk50h28 (i.e. non oliv onlyo frames). see the description of primitives in section 4.1.2.2. in addition to the primitives, bits 09-11 of the receive message de- scriptor 0 (rmd0) for the lmi channel will indicate the type of frame received. see section 4.3.1.2 for details. in non-auto-lmi mode of operation, lmi frames received on the lmi channel (typically dlci 0) will be written into the receive buffer as transpar- ent or svc frames. also refer to detailed programming procedures (section 4.4) for more information on using the device in the previously mentioned modes of pro- tocol operation. mk50h28 14/64
11111100 11110001 01111110 01010001 1 00000000 01010011 2 current seq last rcvd seq management dlci un-numbered info frame protocol discriminator call reference (null) status message report_ty pe ie (full stat us message) link integrity verification ie 87654321 fcs (msb) fcs (lsb) 01111110 frame fcs 00000011 00001000 00000000 01111101 01010111 3 pvc dlci (msb) pvc dlci (lsb) pvc_status ie 00 1 0 0 0 1000n0a0 figure 5: sample annex a status frame (full) 11111100 11110001 01111110 00000011 00001000 00000000 01110101 01010001 1 00000001 01010011 2 current seq last rcvd seq fcs (msb) fcs (lsb) 01111110 management dlci un-numbered info frame protocol discriminator call reference (null) status_enquiry message report_type ie (requesting a liv only status message) link integrity verification ie frame fcs 87654321 figure 4: sample annex a status_enquiry frame mk50h28 15/64
11111100 11110001 01111110 00 00 000 1 1 00 00 001 0 management dlci un-numbered info frame protocol discriminator call reference (null) status message report_type ie (asynchronous status message) 87654321 00000011 00001000 00000000 01111101 fcs (msb) fcs (lsb) 01111110 frame fcs 00000111 1000n0a0 3 pvc dlci (msb) pvc dlci (lsb) pvc_status ie 10010101 locking shift (ansi annex d only) 1 00 000 figure 7: sample asynchronous status frame (annex d) 11111100 11110001 01111110 00 00 000 1 1 00 00 000 0 00 00 001 1 2 current seq last rcvd seq management dlci un-numbered info frame protocol discriminator call reference (null) status message report_type ie (full status message) length integrity verificationie 87654321 00000011 00001000 00000000 01111101 fcs (msb) fcs (lsb) 01111110 frame fcs 00 00 011 1 1000n0a0 3 pvc dlci (msb) pvc dlci (lsb) pvc_status ie 10010101 locking shift (ansi annex d only) 1 00 000 figure 6: sample annex d status frame (full) mk50h28 16/64
section 4 programming specification this section defines the control and status reg- isters and the memory data structures required to program the mk50h28. 4.1 control and status registers there are six control and status registers (csr's) resident within the mk50h28. the csr's are accessed through two bus address- able ports, an address port (rap), and a data port (rdp), thus requiring only two locations in the system memory or i/o map. 4.1.1 accessing the control and status regis- ters the csr's are read (or written) in a two step op- eration. the address of the csr is written into the address port (rap) during a bus slave transac- tion. during a subsequent bus slave transaction, the data being read from (or written into) the data port (rdp) is read from (or written into) the csr selected in the rap. once written, the address in rap remains unchanged until rewritten or upon a bus reset. a control i/o pin (adr) is provided to distinguish the address port from the data port. adr port 4.1.1.1 register address port (rap) 00000000 b m 8 000 csr <2:0> 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 h b y e t bit name description 15:08 reserved must be written as zeroes 07 bm8 when set, places chip into 8 bit mode. csr's, init block, and data transfers are all 8 bit transfers; this provides compatibility with 8 bitmicroprocessors. when clear, all transfers are 16 bit transfers. this bit must be set to the same value each time it is written, changing this bit during normal operation will achieve unexpected results. bm8 is read/write and cleared on bus reset. 06:04 reserved must be written as zeroes 03:01 cs3<2:0> csr address select bits. read/write. selects the csr to be accessed through the rdp. rap is cleared by bus reset. csr<2:0> csr 0 csr0 1 csr1 2 csr2 3 csr3 4 csr4 5 csr5 00 hbyte determines which byte is addressed for 8 bit mode. if set, the high byte of the register referred to by csr<2:0> is addressed, otherwise the low byte is addressed. this bit is only meaningful in 8 bit mode and must be written as zero if bm8=0. hbyte is read/write and cleared on bus reset. mk50h28 17/64
csr data 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 4.1.1.2 register data port (rdp) bit name description 15:00 csr data writing data to the rdp loads data into the csr selected by rap. reading the data from rdp reads the data from the csr selected in rap. 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 0 r i n t t i n t p i n t t u r m i s s m e r r r o r i n t r r x o n t x o n i n e a s t o p d t x d r x p t d m d 4.1.2 control and status register definition 4.1.2.1 control and status register 0 (csr0) rap<3:1> = 0 bit name description 15 ptdmd transmit demand for priority dlcis. setting this bit to 1 causes the mk50h28 to jump to priority dlci block (pdb). this bit is cleared by the mk50h28 after servicing all active entries in the pdb. (note: see section 4.2.9 for more details.) 14 stop stop, when set, indicates that mk50h28 is operating in the stopped phase of operation. all external activity is disabled and internal logic is reset. mk50h28 remains inactive except for primitive processing until a start primitive is issued. stop is read only and set by bus reset or a stop primitive. writing to this bit has no effect. 13 dtx disable transmitter. prevents the mk50h28 from further access to the transmitter descriptor rings. no transmissions are attempted after finishing transmission of any frame in transmission at the time of dtx being set. even lmi frames normally generated automatically will not be transmitted if dtx=1. txon acknowledges changes to dtx, see below. dtx is read/write. 12 drx disable the receiver prevents the mk50h28 from further access to the receiver descriptor rings. no received frames are accepted after finishing reception of any frame in reception at the time of drx being set. setting drx will put the mk50h28 in the local busy phase. rxon acknowledges changes to drx, see description of rxon. drx is read/write. mk50h28 18/64
bit name description 11 txon transmitter on indicates that the transmit ring access is enabled. txon is set as the start primitive is issued if the dtx bit is o0o or afterward as dtx is cleared. txon is cleared upon recognition of dtx being set, by sending a stop primitive in csr1, or by a bus reset. if txon is clear, the host may modify the transmit descriptor rings entries regardless of the state of the owna bits. txon is read only; writing to this bit has no effect. 10 rxon receiver on indicates that the receive ring access is enabled. rxon is set as the start primitive is issued if the drx bit is o0o or afterward as drx is cleared. rxon is cleared upon recognition of drx being set, by sending a stop primitive in csr1, or by a bus reset. rxon is read only; writing to this bit has no effect. 09 inea interrupt enable allows the intr i/o pin to be driven low when the interrupt flag is set. if inea = 1 and intr = 1 the intr i/o pin will be low. if inea = 0 the intr i/o pin will be high, regardless of the state of the interrupt flag (tint, rint, or pint) or whether the interrupt desciptor ring has been updated. inea is read/write set by writing a o1o into this bit and is cleared by writing a o0o into this bit, by bus reset, or by issuing a stop primitive. inea may not be set while in the stopped phase. 08 intr interrupt flag indicates that one or more of the following interrupt causing conditions has occurred: miss, merr, rint, tint, pint. if inea = 1 and intr = 1 the intr i/o pin will be low. intr is read only, writing this bit has no effect. intr is cleared as the specific interrupting condition bits are cleared. intr is also cleared by bus reset or by issuing a stop primitive. 07 merr memory error is set when the mk50h28 is the bus master and ready has not been asserted within 256 sysclks (25.6 usec @ 10mhz) after asserting the address on the dal lines. when a memory error is detected, the mk50h28 releases the bus, the receiver and transmitter are turned off, and an interrupt is generated if inea = 1. merr is read/clear only and is set by the chip and cleared by writing a o1o into the bit. writing a o0o has no effect. it is cleared by bus reset or by issuing a stop primitive. 06 miss missed frame is set when the receiving channel loses a frame because it is either not ready or does not own a receive buffer indicating loss of data. the memory address for which miss occurred can be determined by issuing a status request primitive (see section 4.3.3 status buffer for additional details). when miss is set, an interrupt will be generated if inea = 1. miss is read/clear only and is set by mk50h28 and cleared by writing a o1o into the bit. writing a o0o has no effect. it is also cleared by bus reset or by issuing a stop primitive. 05 ror receiver overrun indicates that the receiver fifo was full when the receiver was ready to input data to the receiver fifo. the frame being received is lost, but is probably recoverable if an upper level protocol is used. when ror is set, an interrupt is generated if inea=1. ror is read/clear only and is set by mk50h28 and cleared by writing a o1o into the bit. writing a o0o has no effect. it is also cleared by bus reset or by issuing a stop primitive. 04 tur transmitter underrun indicates that the mk50h28 has aborted a frame since data was late from memory. this condition is reached when the transmitter and transmitter fifo both become empty while transmitting a frame. when tur is set, an interrupt is generated if inea = 1. tur is read/clear only and is set by mk50h28 and cleared by writing a o1o into the bit. writing a o0o has no effect. it is also cleared by bus reset or by issuing a stop primitive. 03 pint primitive interrupt is set after the chip updates the primitive register to issue a provider primitive. when pint is set, an interrupt is generated if inea =1. pint is read/clear only and is set by mk50h28 and cleared by writing a o1o into the bit. writing a o0o has no effect. it is also cleared by bus reset or by issuing a stop primitive. 02 tint transmitter interrupt is set after the chip updates an entry in the transmit descriptor ring. when tint is set, an interrupt is generated if inea = 1. tint is read/clear only and is set by the mk50h28 and cleared by writing a o1o into the bit. writing a o0o has no effect. it is also cleared by bus reset or by issuing a stop primitive. 01 rint receiver interrupt is set after the mk50h28 updates an entry in the receive descriptor ring (this is done once per received frame, not per received buffer). when rint is set, an interrupt is generated if inea = 1. rint is read/clear only and is set by the mk50h28 and cleared by writing a o1o into the bit. writing a o0o has no effect. it is cleared by bus reset or by issuing a stop primitive. 00 0 this bit is read only and will always read as zero. mk50h28 19/64
1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 uprim < 3:0 > pprim < 3:0 > u e r r u a v p a v p l o s t u p a r m : p p a r m 1 0 : 1 0 4.1.2.2 control and status register 1 (csr1) rap <3:1> = 133/ bit name description 15 uerr user primitive error is set by the mk50h28 when a primitive is issued by the user which is in conflict with the current status of the chip. uerr is read/clear only and is set by mk50h28 and cleared by writing a o1o into the bit. writing a o0o in this bit has no effect. it is also cleared by bus reset. 14 uav user primitive available is set by the user when a primitive is written into uprim. it is cleared by the mk50h28 after the primitive has been processed. this bit is also cleared by a bus reset. 13:12 uparm user parameter is written by the host in conjunction with the user primitives in uprim. this user parameter field provides information to the mk50h28 concerning the corresponding user primitive. note: for all primitives uparm = 0 unless otherwise indicated. 11:08 uprim user primitive is written by the user, in conjunction with setting uav, to control the mk50h28 link procedures. the following primitives are available: 0 stop : causes mk50h28 to enter the stopped phase. all link activity is terminated and the stop bit is set. all dma activity ceases. the transmitter outputs all ones, and all received data is ignored. 1 start : instructs the mk50h28 to exit the stopped phase and enter the information transfer phase. the context table and the descriptor rings are reset. the transmitter begins to output flags. the start primitive is valid only after the device is initialized (init request performed.) if the auto lmi primitive is not issued after a start primitive, then the only way to transmit lmi frames is through the use of lmi primitives (10, 11, 12, & 14), and processing is performed on received lmi frames, but no automatic response or action is taken. valid only in stopped phase. 2 init reques t: instructs the mk50h28 to read the initialization block from memory. this should be performed prior to the start primitive or transparent primitive after a bus reset or power-up. valid only in stopped phase. 3 transparent mode: instructs the device to exit the stopped phase, enter the transparent phase, and reset the context table and descriptor rings. no header stripping or pre-pending is done for any dlci channel, and no automatic lmi processing is possible in this mode. all frames are received to context table entry 0 associated descriptor ring and buffers, and the rtan bit in ct0 should be set so that the entire received frame will be written to the buffer. transmission of frames can occur from any context table entry, including ct0 , and the xtran bit should be set so that only the data in the buffer will be transmitted for the entire frame. this primitive is only valid after device initialization (init request performed). valid only in stopped phase. 4 status request : instructs the mk50h28 to write the current chip status into the status buffer. valid in all states, but only after the init primitive has been previously issued. 5 self-test request : instructs the mk50h28 to perform the built in internal self test. valid only in the stopped phase. see section 4.4.10 for the self test procedure. mk50h28 20/64
bit name description 7 auto lmi: instructs the device to enter the auto lmi mode of operation. auto lmi with uparm=0 causes the device to enter user mode of operation. auto lmi with uparm=1 causes the device to enter network mode of operation. auto lmi with uparm=2 causes the device to enter bi-directional mode of operation these modes are defined in sections 3.2.7 and 3.2.8 (modes of protocol operation) valid only in information transfer phase. see also start primitive. 8 start timer nt1(uparm=0) : instructs the mk50h28 to start the nt1 (user) timer. issuing this primitive while in the user mode of auto lmi operation may lead to erroneous results. not valid in transparent mode. enable lmi channel polling (uparm=2): instructs the mk50h28 to start polling the lmi channel (context table entry 0) for any lmi frames to be transmitted. the type of lmi frame to be transmitted will be determined by the frame type bits in the tmd0 (see section 4.3.2.2). the polling of the lmi channel will be interleaved between polling each other ct entry or channel, thus giving the lmi channel a high degree of priority. disable lmi channel polling (uparm=3): instructs the mk50h28 to stop polling of the lmi channel. the default initialization condition of the mk50h28 is for lmi channel polling to be disabled, so this primitive only need be issued if polling was enabled earlier. 9 start timer nt2 : instructs the mk50h28 to start the nt2 (network) timer. issuing this primitive while in the network mode of auto lmi operation may lead to erroneous results. not valid in transparent mode. 10 lmi status_enquiry request : instructs the mk50h28 to send a status_enquiry frame to the remote site (network). if uparm = 1 , will request sequence numbers only. otherwise, requests full status frame. not valid in transparent mode. 11 lmi status request : instructs the mk50h28 to send a status frameto the remote site (user). if uparm=0 , it will send a full status frame with the data in the associated lmi channel buffer (this is a typical response to a received status enquiry with report` type of full status). if uparm = 1 , it will send a sequence numbers only (liv only) frame. if uparm=2 , it will send an aysnchronous status frame with the data in the associated lmi channel buffer. not valid in transparent mode. 12 lmi update_status request : instructs mk50h28 to send update_status frame with the data in the associated lmi channel buffer. not valid in transparent mode. 13 receive lmi full status enquiry request (uprim =13, uparm=0); instructs the mk50h28 to cause the next received sequence number only (liv only) status enquiry frame to be received to a buffer, as if it were a full status enquiry frame. however, the statistics corresponding to the actual type of frame received wil be incremented no response frame will be automatically generated by the mk50h28. issueing uprim 13 with uparm =1 prior to receipt of the next liv only status enquiry frame will cancel the action originally requested by the receive lmi full status enquiry request primitive. 14 send lmi: instructs the chip to send a frame using the contents of the buffer(s) pointed to by the context table lmi channel (either 0 or 1023 based upon the setting of lmi ch bit in csr2). the frame will be transmitted using the header information from the context table lmi channel. valid in all phases of operation except for stopped mode. note: only one frame will be transmitted per send lmi primitive. 15 indicate protocol event: this primitive can be used by the host to inform the mk50h28 of errored events not monitored by the chip (such as a received pvc status ie with new bit=0 for a pvc not currently defined) if uparm=0 , it instructs the mk50h28 to add one good event to the n392/nn2 count. if uparm=1 , it instructs the mk50h28 to add one errored event to the n392/nn2 count. mk50h28 21/64
bit name description 07 plost provider primitive lost is set by the mk50h28 when a provider primitive cannot be issued because the pav bit is still set from the previous provider primitive. plost is cleared when pav is cleared or by a bus reset. writing to this bit has no effect. 06 pav provider primitive available is set by the mk50h28 when a new provider primitive has been placed in pprim. pav is read/clear only and is set by the chip and cleared by writing a o1o to the bit or by bus reset. under normal operation the host should clear the pav bit after pprim is read. 05:04 pparm provider parameter provides additional information about the reason for the receipt of certain primitives. the following table shows the parameters for the applicable provider primitives. this field is undefined for other provider primitives. 03:00 pprim provider primitive is written by the mk50h228, in conjunction with setting the pav bit, to inform the user of link control conditions. valid provider primitives are as follows: 2 init confirmation: indicates mk50h28 init block reading has completed. 3 watchdog timer expiry indication: indicates expiration of tclk or rclk watchdog timer as determined by the value of pparm (pparm=1 indicatestclk, pparm=2 indicates rclk. if plost is set it indicates both rclk and tclk watchdog timers expired). this primitive is issued only if enabled by setting csr5<15:12> bits to something other than 0. 4 alarm indication: nn2 of the last nn3 lmi events are corrupted in timing or content. 6 alarm clear indication: indicates reception of nn3 correct sequential lmi events after the alarm indication. the issueing of alarm clear indication and alarm indication primitives will be re-attempted if plost is set, and will be repeated until issued without plost set. 7 interrupt descriptor ring miss: indicates inability to write to the interrupt descriptor ring due to the srvc bit not being clear. with pparm = 0 it indicates a transmit interrupt ring miss. with pparm = 1 it indicates a receive interrupt ring miss. 8 timer nt1 expiration: indicates expiration of the timer nt1. 9 timer nt2 expiration: indicates expiration of the timer nt2. 10 counter nn1 overflow: indicates that the counter nn1 has overflowed. 11 clear new bit indicatiojn: this primitive is issued when the sequence number received in a status enquiry frame matches the sequence number sent in the last full status frame. 12 lmi frame transmitted: indicates that a lmi frame was just transmitted. 13 lmi frame received: indicates that a lmi frame was just received and stored in the buffer(s) corresponding to the lmi channel. the pparm field will indicate the type of frame received. in auto lmi mode , a required host response to a received status enquiry with report type of full status is to issue an lmi status request primitive with uparm = 0 (status request with report type of full status). the device will not automatically respond to a received status enquiry with report type of full status. note: if a lmi frame is received while the pav bit is still set (because a previously received primitive has not yet been processed by the host), the mk50h28 will set the plost bit and the received lmi frame will be discarded. no counters will be updated. 14 aysnchronous status frame received: indicates that an aysnchronous status frame was just received. received aysnchronous status frames are stored in the lmi channel buffer without the dlci header information. pparm lmi frame received 0 status enquiry with report type of sequence numbers exchange only 1 status enquiry with report type of full status 2 status frame received 3 svc or updated status frame received mk50h28 22/64
bit name description 15 cycle setting this bit selects a shorter dma cycle (5 vs 6 sysclk) 14 eiben extended initialization block enable. setting this bit causes the mk50h28 to use an extended initialization block which uses all of iadr+08 as a 16-bit scaler and moves nn1 to the upper byte of iadr+40. 13 dlci1k setting this bit causes the chip to recognize the 8192 possible dlcis.if this bit is cleared, the chip will ignore all received frames with dlci greater than 1023. 12 lmich chlmi channel select: setting this bit to 0 causes frames received on dlci 0 to be treated as lmi frames.. setting it to 1 causes frames received on dlci 1023 to be treated as lmi frames. note: regardless of the setting of this bit, only the first entry in the context table table (ct0) will be used for transmission and reception of lmi frames. 11 tran should be set only if frames need to be transmitted without protocol processing from the transmit buffers. with this bit set, the chip will not prepend an address field when transmitting data from the buffers, but rather, the buffers should have both address and data information for proper frame relay protocol. 10 0 reserved. must be written as zeroes. 09 anxd setting this bit enables operation in conformance with t1.617 annex d specifications. with anxd=0, the mk50h28 operates in conformance with ccittq.933 annex a. 08 tdmd transmit demand. setting this bit causes the mk50h28 to ignore the tp (transmit poll timer) and continuously poll all context table entries until tdmd is cleared by the host. 07:00 iadr the high order 8 bits of the address of the first word in the initialization block. iadr must be written by the host prior to issuing an init request primitive. 4.1.2.3 control and status register 2 (csr2) rap<3:1> = 2 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 iadr<23:16> t r a n a l m i c h d l c i 1 k 0 t d m d c y c l e e i b e n n x d 4.1.2.4 control and status register 3 (csr3) rap<3:1> =3 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 0 iadr <15:00> bit name description 15:00 iadr the low order 16 bits of the address of the first word in the initialization block. must be written by the host prior to issuing an init request primitive. the initialization block must begin on a word boundary. mk50h28 23/64
4.1.2.5 control and status register 4 (csr4) csr4 allows redefinition of the bus master interface. rap<3:1> = 4 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 b s w p c b u r s t 1 : 0 b s w p d a c o n b c o n f w m b a e b u s r x w d 1 x w d 0 r w d 1 r w d 0 x h o l d 0 bit name description 15:12 xwd0/1, rwd0/1 watchdog timers. these bits enable and determine the timer values for the transmit and receive watchdog timers. these timers are independently programmable and are reset by any transition on the tclk and rclk pins respectively. the watchdog timers will expire after approximately wn sysclk cycles (if not reset by transition on tclk/rclk) and provider primitive 3 will be issued. the following table shows the selections for wn: 11 0 reserved, must be written as zero. 10 xhold setting this bit enables the transmit fifo hold-off mechanism of the mk50h28. if xhold=1 and the transmit fifo is emplty, the mk50h28 transmitter will be oheld offo from transmitting a frame until the fifo has at least the xhold watermark (selected with fwm below) of data, or the entire frame , in the transmit fifo. 09:08 fwm these bits define the fifo watermarks. fifo watermarks prevent the mk50h28 from performing dma transfers to/from the data buffers until the fifos contain a minimum amount of data or space for data. for receive, data will only be transferred to the buffers after the receive fifo has at least n 16-bit words or end of frame has been received. conversely, for transmit, data will only be transferred from the data buffers when the transmit fifo has room for at least n words of data. the transmit hold-off watermark enabled by setting xhold=1 is also defined by these bits. n is defined as follows: * suggested setting 07 bae bus address enable: if bae is set then the a23-a20 pins are driven by the mk50h28 constantly providing the ability to use a23-a20 for memory bus selection. if clear, a23- a20 behave identically to a19- a16. 06 busr if this bit is set, pin 15 becomes input busrel. if this bit is clear then pin 15 is either bm0 or byte depending on bit 00. for more information see the description for pin 15 in this document. busr is read/write and cleared on bus reset. xwd1/rwd1 xwd0/rwd0 wn 0 0 disabled 012 18 102 19 112 20 fwm <1:0> fwm n xhold n 11 not allowed not allowed 10* 9 words 19 words 01 17 words 11 words 00 25 words 3 words mk50h28 24/64
bit name description 05 bswpc this bit determines the byte ordering of all onon-datao dma transfers. this transfers refers to any dma transfers that access memory other than the data buffers themselves. this includes the initialization block, descriptors, and status buffer. it has no effect on data dmatransfers. bswpc allows the mk50h28 to operate with memory organizations that have bits 07:00 at even addresses and with bits 15:08 at odd addressses or vice versa. bswpc is read/write and cleared by bus reset. with bswpc = 0: address address with bswpc = 1: address address 04:03 burst this field determines the maximum number of data transfers performed each time control of the host bus is obtained. burst is read/write and cleared on bus reset. *suggested setting 02 bswpd this bit determines the byte ordering of all data dma transfers. data transfers are those to or from a data buffer. bswpd has no effect on non-data transfers. the effect of bswpd on data transfers is the same as that of bswpc on non-data transfers (see above). for most applications, including most 68000 based systems, this bit should be set. 01 acon ale control defines the assertive state of pin 18 when the mk50h28 is a bus master. acon is read/ write and cleared by bus reset. 00 bcon byte control redefines the byte mask and hold i/o pins. bcon is read/write and cleared by bus reset. xx0 0 . . . 7 8...15 xx1 8...15 xx0 xx1 0 . . . 7 burst <1:0> 8 bit mode 16 bit mode 00 2 1 10* 16 8 01 unlimited unlimited acon pin18 name 0 asserted high ale 1 asserted low as bcon pin16 pin15 pin17 0 bm1 bm0 hold 1 busako byte busrq mk50h28 25/64
4.1.2.6 control and status register 5 (csr5) csr5 facilitates control and monitoring of modem controls. rap<3:1> = 5 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 000000000 d t r d d s r d d t r d s r r t s e n x e d g e 0 bit name description 15:06 0 reserved, must be written as zeroes. 5 xedge setting this bit causes the td output to change on the rising edge of tclk rather than on the falling edge as indicated in the pin 25 description. 4 rtsen rts/cts enable is a read/write bit used to configure pins 26 and 30. if this bit is set, pin 26 becomes rts and pin 30 becomes cts. rts is driven low whenever the mk50h28 has data to transmit and is kept low during transmission. rts will be driven high after the closing flag of a signal unit is transmited if either no other frames are in the fifo or if the minimum signal unit spacing is higher than 2 (see mode register). the mk50h28 will not begin transmission and td will remain high if cts is high. if rtsen = 0 then pins 26 and 30 become programmable i/o pins dtr and dsr. the direction and behavior of dsr and dtr are controlled by the following bits. 3 dtrd dtr direction is a read/write bit used to control the direction of the dtr/rts pin. if dtrd = 0, the dtr/rts pin becomes an input pin and the dtr bit reflects the current value of the pin; if dtrd = 1, the dtr/rts pin is an output pin controlled by the dtr bit below. 2 dsrd dsr direction is a read/write bit used to control the direction of the dsr/cts pin. if dsrd = 0, the dsr/cts pin becomes an input pin and the dsr bit reflects the current value of the pin; if dsrd = 1, the dsr/cts pin is an output pin controlled by the dsr bit below. 1 dtr data terminal ready is used to control or observe the dtr i/o pin depending on the value of dtrd. if dtrd = 0, this bit becomes read only and always equals the current value of the dtr/rts pin. if dtrd = 1, this bit becomes read/write and any value written to this bit appears on the dtr/rts pin. 0 dsr data set ready is used to control or observe the dsr i/o pin depending on the value of dsrd. if dsrd = 0, this bit becomes read only and always equals the current value of the dsr/cts pin. if dsrd = 1 this bit becomes read/write and any value written to this bit appears on the dsr/cts pin. mk50h28 26/64
4.2 initialization / priority dlci block mk50h28 initialization includes the reading of the initialization block in the off-chip memory to obtain the operating parameters. the initialization block is defined below. upon receiving an init primitive, the first 16 words of the initialization block are read by the mk50h28. the remainder of the initialization block will be read as needed by the mk50h28. memory at iadr+32 - iadr+38 should always be initialized with 0's prior to issuing the init primitive. any changes to iadr+00 - iadr+31 after initialization require that the device be stopped and init primitive be issued again in order to take effect. it is not necessary that the device be re-initialized after changes to bits in the csrs (control and status registers). mode base address higher addr iadr+00 iadr+02 iadr+04 iadr+06 iadr+08 iadr+10 iadr+12 iadr+14 reserved counter dn1 (max frame length) iadr+16 iadr+18 iadr+20 iadr+22 scaler timer nt1 / t391 timer nt2 / t392 timer tp ctadr <15:00> altadr <23:16> altadr <15:00> iadr+24 iadr+28 counter nn1/n391 ctadr <23:16> reserved tintadr<23:16> rintadr <23:16> reserved sba <15:00> iadr+40 iadr+44 error counters priority dlci iadr+96 thru iadr+xx block thru iadr+89 counter nn1 sba <15:00> (if eiben=1) iadr+42 tintadr <23:16> rintadr<23:16> reserved reserved ntwk n393 ntwk n392 user n393 / nn3 user n392 / nn2 and statistics reserved (256 entries maximum) reserved-must be written with 0's iadr+32-38 figure 8: initialization / priority dlci block mk50h28 27/64
4.2.1 mode register the mode register allows alteration of the mk50h28's operating parameters. 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 lback <2:0> mfs <4:0> iadr + 00 c s s f d r f c s d t f c s 00000 bit name description 15:11 mfs<4:0> minimum frame spacing defines the minimum number of flag sequences transmitted between adjacent frames transmitted by the mk50h28. this only affects frames transmitted by the mk50h28 and does not restrict the spacing of the frames received by the mk50h28. when using rts/cts control this field defines the number of flags transmitted at the beginning of the frame after cts is driven low (minus one for the trailing flag). see the following table for encoding of this field. 10:06 0 reserved. must be written as zeros. 05 drfcs disable receiver fcs (crc). when drfcs = 0, the receiver will extract and check the fcs field at the end of each frame. when drfcs = 1, the receiver continues to extract the last 16 or 32 bits of each frame, depending on fcss, but no check is performed to determine whether the fcs is correct. if the received frame is an even number of bytes, the first 16 bits of the fcs will be appended to the end (as indicated by mcnt) of the receive buffer data. 04 dtfcs disable transmitter fcs. when dtfcs=0, the transmitter will generate and append the fcs to each signal unit. when dtfcs = 1, the fcs logic is disabled, and no fcs is generated with transmitted frames. setting dtfcs = 1 is useful in loopback testing for checking the ability of the receiver to detect an incorrect fcs. 03 fcss fcs select. when fcss = 1, a 16-bit fcs is selected otherwise a 32-bit fcs is used. number of flags mfs<4:0> number of flags mfs<4:0> 1 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 1 0 2 4 9 18 5 11 22 12 25 19 7 15 31 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 28 24 17 3 6 13 27 23 14 29 26 21 10 20 8 16 mk50h28 28/64
bit name description 02:00 lback loopback control puts mk50h28 into one of several loopback configurations. lback description 0 normal operation. no loopback. 4 simple loopback. receive data and clock are driven internally by transmit data and clock. transmit clock must be supplied externally 5 clockless loopback. receive data is driven internally by transmit data. transmit and receive clocks are driven by sysclk divided by 8. 6 silent loopback. same as simple loopback with td pin forced to all ones. 7 silent clockless loopback. combination of silent and clockless loopbacks. receive data is driven internally by transmit data, transmit and receive clocks are driven by sysclk divided by 8. the td pin is forced to all ones. 4.2.2 timers/counters there are 8 independent counter-timers. the lower 8 bits of iadr+08 are used as a scaler for nt1, nt2 and tp. the scaler is driven by a clock which is 1/32 of sysclk. the dn1 is a 16 bit counter and is used to count the number of bytes in a frame. the counters nn1, nn2, and nn3 are used for the lmi frames. the host will write the periods of all the timers/counters into the initialization block. iadr + 08 scaler iadr + 10 timer nt1 / t391 iadr + 12 iadr + 14 timer tp iadr + 06 counter dn1 1 5 1 4 1 3 0 7 0 8 0 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 iadr + 04 user n393/nn3 counter nn1 / n391 timer nt2 / t392 user n392/nn2 ntwk n393 ntwk n392 mk50h28 29/64
timer description user n392 / nn2 number of errors occuring on the lmi channel before an alarm is declared. in non-auto lmi mode , timer time-outs are ignored and nn2 is only incremented when a status frame is received with bad sequence number. in auto lmi user & bi-directional mode this is the user n392. the range for n392/nn2 must be 1 - 10 events. user n393 / nn3 measurement interval for n392/nn2. an alarm will be declared if there are errors in nn2 of the last nn3 lmi events. in non-auto lmi mode , timer time-outs are ignored and nn3 window is only advanced when a status frame is received in auto lmi user & bi- directional mode this is the user n393. note: nn2 must be less than or equal to nn3 and the range of nn3 must be 1 - 10 events. ntwk n392 network n392. in auto lmi network & bi-directional mode, this is the number of errors occuring on the lmi channel before an alarm is declared. ntwk n393 network n393. in auto lmi network & bi-directional mode, this is the measurement interval for ntwk n392. note: ntwk n392 and n393 are updated for lmi frames received with second set of sequence numbers in bi-directional mode dn1 maximum frame length. this field must contain the two's complement of one less than the maximum allowable frame length, in bytes. any frame that exceeds this count will be discarded. note: the dlci header and crc are included in the maximum frame length count. nn1 / n391 the rate at which full status_enquiry frame is sent to the network by the mk50h28 upon hosts request. this field must contain the two's complement of one less than the desired value. if csr2<14> bit eiben =1, the mk50h28 will expect the value for nn1 counter to be located in the upper byte of iadr+40. scaler timer prescaler. timers nt1, nt2 and tp are scaled by this number. the prescaler is incremented once every 32 system clock pulses. when it reaches zero the timers are incremented and the prescaler is reset. this field is interpreted as the two's complement of the prescaler period. if csr2<14> bit eiben =1, the mk50h28 will use the entire 16-bit value at iadr+08 as the prescaler value. this may be required to achieve longer timer values when operating at high sysclk speeds. note: a prescale value of one gives the smallest amount of scaling to the timers (64 clock pulses), zero gives the largest (8224 clock pulses if eiben=0, or 2,097,184 clock pulses if eiben=1). nt1 / t391 user poll timer. in auto lmi mode , the nt1/t391 timer is started when a status enquiry frame is transmitted. following the expiration of this timer, the device transmits another status enquiry frame and increments the nt1/t391 timeout error counter if a status frame was not received within the polling interval. this is not valid for lmi frames with second set of sequence numbers. in non-auto lmi mode , the nt1/t391 timer is started by issuing a start timer nt1/t391 user primitive 8. only in this mode, does the device issue a timer expiration provider primitive 8 indicating that the nt1/t391 timer has expired. this field must contain the two's complement of the period of the timer nt1. note: nt1/t391 must be less than nt2/t392. nt2 / t392 network poll timer. in auto lmi mode , the nt2/t392 timer is started when a status frame is transmitted. following the expiration of this timer the device increments the nt2/t392 timeout error counter if a status enquiry frame was not received within the poll interval. this is not valid for lmi frames with second set of sequence numbers. in non-auto lmi mode the nt2/t392 timer is started by issuing a start timer nt2 user primitive 9. only in this mode, does the device issue a timer expiration provider primitive 9 indicating that the nt2 timer has expired. note: nt2/t392 must be greater than nt1/t391. tp transmit polling period. this scaled timer works on the context table on a per channel basis. no attempt to transmit a frame on a link is made until tp expires. when the tp expires the mk50h28 will first check to see whether the next channel is ready (i.e., txrdy = 1). if txrdy is set, it will service that channel. then it will either jump, based on enidx bit being set, or continue to the next sequential channel. the mk50h28 will continue this process until it finds a ct entry with the eor bit set, causing the device to go to the begining of the ct and service the first non-lmi channel. this field must contain two's complement of the period of the timer tp. note: once the mk50h28 finishes servicing a channel (transmitting frames), it waits for tp to expire before begining to poll for the next available channel that has frames to be transmitted. the mk50h28 continues its search from channel to channel, without waiting for tp to expire, until it finds the next available channel that has frames to be transmitted. setting the tdmd bit causes the mk50h28 to immediately begin polling without waiting for tp to expire. mk50h28 30/64
4.2.3 context table (ct) address 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 iadr + 16 iadr + 18 ctadr <15:00> 0 ctadr <23:16> 00000000 bit name description 15:08 0 reserved, must be written as a zero. 07:00/15:00 ctadr context table address. the ct address must begin on a word boundary. 4.2.4 context table (ct) the mk50h28 performs multi-tasking by means of a context table (ct). each entry in this table con- tains all the information relevant to one individual dlci channel. associated with each ctentry are a set of descriptor rings that are used for transmitting and receiving frames. through the use of the srip field in the ct, more than on ct entry (or dlci) may share the same receive rescriptor ring while still keeping the individual dlci statistics and error counters separately in each ct entry. all channel en- tries, except the lmi channel (ct0), have equal priority. each channel entry requires 16 words (or 32 bytes) of memory in the ct, and all channel entries in the context table are identical. the mk50h28 sequentially scans each entry in the ct for any available frames to be transmitted, unless the enidx bit is set or scanning is interrupted by setting ptdmd in csr2. if the mk50h28 finds the enidx bit set when scanning a ct entry, it unconditionally jumps to the ct entry pointed to by the idxptr field. finally, the end of ct is marked by setting the eoct bit in the last channel entry. in the information transfer phase, the mk50h28 is initialized to start transmission from the first non-lmi ct entry (the second ct entry: ct1). upon finding the txrdy bit set, it then reads the transmit descriptor ring entry determined by the transmit descriptorring address and the curxd index found in the ct. if the mk50h28 then finds the owna bit set in the transmit message descriptor 0, it will transmit a frame with a dlci found in the ct entry (at ctadr+06 & +08) and with data from the buffer pointed to by the transmit descriptor ring entry. the mk50h28 automatically calculates and appends the correct crc. the mk50h28 reception process uses an address lookup table (alt) mechanism further specified in 4.2.6. the alt contains a 1 word entry for each dlci (selectable between 1024 or 8192 dlcis) which consits of an index to the context table and an active bit to indicate whether frames received with the associated dlci should be processed or ignored. when a frame is received, its dlci is used as an off- set from the beginning of the alt (containing the index to the ct for dlci 0). if the active bit is set for the alt entry corresponding to the dlci of the received frame, then the mk50h28 will proceed to ac- cess the ct entry pointed to by that alt entry. the ct entry contains the address of the start of the corresponding received descriptor ring and an index to the current descriptor in that ring. each entry in the descriptor ring in turn points to a buffer into which the received frame is written. a received frame may span more than one buffer by use of the elf buffer chaining mechanism described in 4.3. therefore, the mk50h28 transmission process is similar to the reception process except that it does not use the alt (nor the actve bit therein), but rather the txrdy bit in the ct entry is used to determine what channels are active for transmission. in addition, both the actve bit in the alt and the rxrdy bit in ct must be set in order to receive frames. mk50h28 31/64
ctadr+00 ctadr+02 ctadr+04 ctadr+06 ctadr+08 ctadr+10 ctadr+12 ctadr+14 ctadr+16 ctadr+18 ctadr+20 ctadr+22 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 tx tx c o n g r d y 000 txmxfr [7:0] 0 curxd (0-127) active channel n (16 words) msb lsb a c t i v e c h a n n e l 1 en i d x tdra <23:16> c/r (0/1) ea (0) dlci (high order) ea (0) de becn fecn dlci ea (0) ea (1) dlci (low order) dlci rx rx c o n g r d y 0 rx m i s s 0 0 0 0 tdra <15:00> r i n d t f c s n e 0 0 0 0 e o c t x t r a n r t r a n rdra <23:16> rdra <15:00> currd (0-127) received fecns counter received becns counter received des counter discarded frames (de=1) counter rx congestion counter tx congestion counter received good frames counter reserved (ctadr+30 may be used by host for backward index pointer) idxptr [15:03] 0 0 0 srip (shared rdra index pointer) [15:03] 0 0 r b f s r s r i e p ctadr+24 ctadr+26 ctadr+28 thru ctadr+31 0 0 figure 8a: context table mk50h28 32/64
the contents of each ct entry block are described below: word name description ct+00 txrdy (15) the host sets this bit only if the channel is ready to transmit. if this bit is not set, the mk50h28 will not transmit data for that channel. txcong (14) the host sets this bit only if the channel is in congestion on the transmit path. if this bit is set, frames with the de bit set in tmd0 will be discarded and not transmitted. this is also valid even if xtran=1. during normal transmission (i.e., no congestion), the host should clear this bit. enidx (13) enable index pointer to next entry in ct. setting this bit, causes the device to jump and service the ct entry pointed to by the idxptr (ct+10) rather than servicing the next sequential ct entry. xtran (11) transmit transparent. setting this bit causes frames to be transmitted transparently from the corresponding tx descriptor ring and buffer without pre-pending any frame header. this bit should typically be set for transparent mode operation. eoct (8) end of context table. setting this bit indicates that this is the last entry in the ct. from here the device will advance to the begining of the ct and service the first non-lmi entry. txmxfr (7:0) maximum number of frames to be consecutively transmitted. the device uses this value to determine the maximum number of frames to be transmitted before advancing to the next channel. this field is only used if the number of frames queued in the descriptor ring are greater than txmxfr. this field must contain the two's complement number. ct+02 curxd (15:8) specifies the current transmit descriptor in the ring (0 - 127 in the upper 7 bits). this field should initially be written with zeroes. ct+02,+04 tdra starting address (must begin on a word boundary) of the transmit ring for channel. ct+06,+08 dlci field the mk50h28 can handle up to 4 octets of address field. for the lmi channel only, the mk50h28 transmits the entire address field as specified in the ct. for all other active channels, the explicit congestion bits (fecn, becn, and de) and the c/r bit are modified by the corresponding bits in the transmit message descriptor 0 (tmd0) and should be written as 0. during reception for all the non-lmi active channels, the explicit congestion bits and the c/r bit will be written in the receive message descriptor 0 (rmd0). for the lmi channel these bits are ignored. ct+10 idxptr (15:3) index pointer. the mk50h28 uses this field only when bit enidx is set. this field should contain the index pointer to the next ct entry to be serviced. all 13 bits of this field will be used as an index into the ct, regardless of the seting of dlci1k in csr2. ct+12 rxrdy (15) the host sets this bit only if the channel is ready to receive data. if the bit is not set, all received frames will be discarded for the channel. rxcong (14) the host sets this bit only if the channel is experiencing congestion on the receive path. when this bit is set the mk50h28 will discard only the received frames with discard eligibility (de) = 1 for that channel. a counter in the ct (see below for more information) keeps track of received frames with de = 1 that are discarded due to congestion. during normal reception (i.e., no congestion) & transparent mode this bit should be cleared to 0. rxmiss (13) this bit is set by the mk50h28 when during reception of a frame either the channel is not ready (i.e., rxrdy = 0) or the receiver does not own a buffer (i.e., owna = 0. see 4.3.1 receive message descriptor 0). also if inea = 1 in csr 0, a miss packet error interrupt will be generated under the above conditions. during normal reception the host should clear this bit. the address where the miss occured can be determined by issuing a status request primitive. for more information see under status buffer. rtran (11) receive transparent. when rtran=1, received frames will be written into the corresponding rx descriptor ring buffer without stripping any frame header, and fecn, becn & de bits in rmd0 will not be updated. ct counters and statistics will still be updated. this bit should be set for transparent mode operation. rintd (10) receive interrupt disable. setting this bit prevents the device from generating receive interrupts (rint) for this channel. rbfrs (9) receive bad frames. if set, the mk50h28 will receive both aborted and bad fcs frames. for such received frames the frer bit in the rmd0 will be set. fecsen (8) fcs pass-through enable. setting this bit allows the fcs or crc to be stored in the buffer along with the frame data. mk50h28 33/64
word name description ct+14 srip shared receive descriptro ring index pointer. this field contains the index pointer to the ct entry with the currd and rdra (ctadr+14, +16) to be used for received frames rather than the currd & rdra specified in the current ct entry, if sripe = 1. all 13 bits of this field will be used to index into the ct, regardless of dlci1k setting in csr2. sripe(00) srip enable. when set, this bit enables the sharing of one receive descriptor ring by many dlcis or ct entries . when sripe=1, the receive descriptor ring and buffer associated with the currd and rdra values in the ct entry pointed to by the srip index pointer will be used for the received frame rather than the currd and rdra values in the current ct entry associated with the dlci of the received frame. the rccnt & xccnt used will also be those in the ct entry pointed to by the srip. ct+16 currd (15:8) specifies the current receive descriptor in the ring (0 - 127 in the upper 7 bits). this field should initially be written with zeroes. ct+16,+18 rdra starting address of the receive descriptor ring for a channel. it must be word aligned. ct+20 rcv fecns counter for keeping track of the fecns received when a channel is ready. rcv becns counter for keeping track of the becns received when a channel is ready. ct+22 rcv des counter for keeping track of the des received when a channel is ready. discard frames counter for keeping track of received frames with de = 1 that are discarded due to congestion on a channel. incremented for lmi frames is received on ct0 inconsistent with the operating mode. (stop or re-initialization will not reset this nor any ct counter.) ct+24 rccnt rx congestion counter. this counter is incremented each time a received frame is placed into the rx descriptor ring for that channel. the mk50h28 does this just prior to clearing the owna bit(s) for the descriptor(s) corresponding to each received frame. note: this counter should be programmed with an initial value of 00. it is the responsibility of the host processor to decrement and/or reset this counter as needed to do receive descriptor ring congestion monitoring xccnt tx congestion counter. this counter is incremented each time a frame is transmitted from the tx descriptor ring for that channel. the mk50h28 does this just prior to clearing the owna bit(s) for the descriptor(s) corresponding to each tranmitted frame. note: it is the responsibility of the host processor to program this counter with the 2's complement value of the number of descriptors that it filled with frame data to be transmitted, if transmit descriptor ring congestion monitoring is needed. ct+26 rgf cnt received good frames counter. (stop or re-init will not reset this nor any ct counter.) ct+28 - 31 0 reserved. must be written as zeros. 4.2.5 interrupt descriptor ring addresses 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 1 5 iadr + 24 iadr + 26 tintadr <15:00> 0 tintadr <23:16> reserved iadr + 28 iadr + 30 rintadr <15:0 0> 0 rintadr <23:16> reserved bit name description 15:08 0 reserved, must be written as a zero. 07:00/15:00 tintadr transmit interrupt descriptor ring address. (must begin on a word boundary). 07:00/15:00 rintadr receive interrupt descriptor ring address. (must begin on a word boundary). mk50h28 34/64
4.2.5a transmit and receive interrupt descriptor rings the mk50h28 has two descriptor ring structures for the purpose of queuing transmit and receive inter- rupts. the pointers to these two descriptor rings are located at iadr+24 through iadr+30. these de- scriptor rings consist of 128 entries. each entry consists of two 16-bit words containing the 24-bit ad- dress of the contest table entry (xctadr, rctadr)corresponding to the interrupt, a 7-bit field for the descriptor index (curxd, currd) into the associated descriptor ring, and a srvc bit to indicate whether the interrupt has been serviced. no entry will be made in the receive interrupt descriptor ring (nor will interrupt be generated) if bit rintd (ctadr+12 <10>) is set; likewise for tintd (tmd0<08>). 4.2.5a.1 transmit interrupt descriptor ring entry bit name description 15 srvc this bit is set by the mk50h28 when it writes an interrupt to the interrupt descriptor ring and should be cleared by the host when it services the interrupt. if it attempts to write tx interrupt information to a transmit interrupt ring entry for which srvc is not clear , the mk50h28 will issue pprim 7 with pparm=0 (tx int miss) in addition to giving tint. 14:08 curxd specifies the current transmit descriptor (0-127) at the time the interrupt ocurred. 07:00/15:00 xctadr transmit context table address. indicates address of the ct entry at the time the interrupt ocurred. note: xctadr specifies which ct entry, and curxd specifies the descriptor within the tx ring associated with the ct entry for which the interrupt ocurred. 4.2.5a.2 receive interrupt descriptor ring entry bit name description 15 srvc this bit is set by the mk50h28 when it writes an interrupt to the interrupt descriptor ring and should be cleared by the host when it services the interrupt. the mk50h28 will issue pprim 7 with pparm=1(rx int miss) in addition to rint, and it will discard the received frame if it is unable to write to the rececive interrupt ring due to srvc not being clear. 14:08 currd specifies the current receive descriptor (0-127) at the time the interrupt ocurred. 07:00/15:00 rctadr receive context table address. indicates address of the ct entry at the time the interrupt ocurred. note: rctadr specifies the ct entry, and currd specifies the descriptor within the rx ring associated with the ct entry for which the interrupt ocurred. 1 5 1 4 1 3 0 7 0 8 0 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 tintmd0 tintmd1 xctadr<15:00> xctadr<23:16> 0 curxd (0-127) s r v c 1 5 1 4 1 3 0 7 0 8 0 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 rintmd0 rintmd1 rctadr<15:00> rctadr<23:16> 0 currd (0-127) s r v c mk50h28 35/64
4.2.6a address lookup table (alt) the alt can support a maximum of 1024 or 8192 active dlcis depending upon the setting of the dlci1k bit in csr2. each channel needs a word (= 2 bytes) in the alt. (note: the alt is only used by the receive process) 1 5 1 4 1 3 0 7 0 8 0 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 00 index to context table 00 index to context table dlci = 0 dlci = 1 msb lsb dlci = max 00 index to context table 00 index to context table dlci = 1024 a c t v e a c t v e a c t v e a c t v e bit name description 0 active this bit is set by the host if the corresponding dlci is active. if this bit is not set, the data received for the dlci will be ignored by the mk50h28. this bit is only used by the receive process. 14:13 0 reserved. must be written as zeros. 15:03 index to ct 13-bit index to context table. 4.2.6 address lookup table (alt) address 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 iadr + 20 iadr + 22 altadr <15:00> 0 altadr <23:16> 1 5 reserved bit name description 15:08 0 reserved, must be written as a zero. 07:00/15:00 altadr address lookup table address. the alt address must begin on a word boundary. mk50h28 36/64
4.2.7 status buffer address 1 5 1 4 1 3 0 7 0 8 0 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 iadr + 40 iadr + 42 sba<15:00> sba<23:16> 0 nn1 (if eiben = 1) bit name description 15:08 0 must be written as zeroe if csr2<14> bit eiben = 0 07:00/15:00 sba status buffer address points to a 9 word status buffer into which status information is placed upon the issuance of the status request primitive by the host. the status buffer must begin on a word boundary. 4.2.8 error counters twenty two words in the initialization block are reserved for use as error count- ers and statistics which the mk50h28 will increment as required. these counters are intended for use by the host cpu for statistical analysis on the lmi channel. the error counters at iadr+44, 46,48,64, and 66 are applicable to all the active channels (i.e., both lmi and non-lmi). if rbfrs bit (in context table ctadr+12, bit 09) = 0, bad frames are ignored by the mk50h28. however, if rbfrs = 1 even the bad frames will be received by the mk50h28. for such received bad frames the frer bit will be set in the receive message descriptor 0. the mk50h28 will only increment the error counters; it is up to the user to clear, reset, or preset them (stop or re-initialization will not reset them). the error counters are: memory address error counter iadr+44 bad frames received (bad fcs or non-octet aligned) iadr+46 short frames (less than: 2 bytes non-lmi, 3 bytes annex a/d, 4 bytes other lmi frame) iadr+48 aborted frames received iadr+50 liv/lmi frames with missing or incorrect report type ie received. (the appropriate corresponding ie identifiers were not received). (annex a) iadr+52 liv/lmi frames with incorrect report type format received. (annex a or annex d) iadr+54 liv/lmi frames with incorrect report type format received. (annex a) iadr+56 number of nt1/t391 timeouts for liv/lmi frames. this error counter is only incremented when nt1 expires without having received a status frame. iadr+58 number of nt2/t392 timeouts for liv/lmi frames. this error counter is only incremented when nt2 expires without having received a status enquiry frame. iadr+60 frames received with bad sequence errors. iadr+62 number of annex d frames received with bad format. iadr+64 number of good frames received on unknown or inactive dlcis. iadr+66 number of received frames exceeding the maximum frame length dn1. iadr+68 liv status enquiry messages received iadr+70 liv status messages received iadr+72 liv full status enquiry messages received iadr+74 liv full status messages received iadr+76 asynchronous messages received iadr+78 liv status enquiry messages transmitted iadr+80 liv status messages transmitted iadr+82 liv full status enquiry messages transmitted iadr+84 liv full status messages transmitted mk50h28 37/64
4.2.9 priority dlci block the priority dlci block (pdb) is a mechanism through which the host can demand the mk50h28 to im- mediately service certain desired dlcis. the host should first set up entries in the pdb before setting the ptdmd bit in csr2. in response to that, the mk50h28, after completing transmission service of its current dlci, will jump to the pdb rather than advancing to the next entry in the context table. after servicing all active entries in the pdb, the mk50h28 will return to the context table and resume the transmission service that was in progress before it was interrupted. (note: a maximum of 256 entries are allowed in the pdb.) the following is the format of the priority dlci block. 1 5 1 4 1 3 0 7 0 8 0 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 0 index to context table 0 index to context table msb lsb 0 index to context table a c t v e a c t v e a c t v e iadr + 96 iadr + 98 iadr + xx e o p c h (0) e o p c h (0) e o p c h (1) 4.3 receive and transmit descriptor rings each active channel has an associated transmit and receive ring (figure 3). each ring can have a maxi- mum of 128 descriptors, and each descriptor in the ring is a 4 word entry. each ring is terminated by set- ting the eor bit in the last descriptor. except for the first word (see below for rmd0 or tmd0), all the descriptors are identical for both lmi and non-lmi channels. note: the buffer byte count (bmct) for lmi channels should be greater than 14 bytes. the following is the format of the receive and transmit de- scriptors. bit name description 15 index to ct 13-bit index into context table 02 0 reserved. must be written as zeros. 01 eopch end of pdb. setting this bit to 1 indicates that this is the last entry in the pdb 00 active this bit is set by the host if the corresponding index into the context table is active. the mk50h28 ignores the entry if this bit is not set. mk50h28 38/64
bit name description 15 owna when this bit is a zero the host owns this descriptor. when this bit is a one the mk50h28 owns this descriptor. the chip clears the owna bit after filling the buffer pointed to by the descriptor entry provided a valid frame has been received. the host sets the owna bit after emptying the buffer. once the mk50h28 or the host has relinquished ownership of a buffer, it may not change any field in the four words that comprise the descriptor entry. 14 eor end of ring. this bit is set by the host to indicate that this is the last descriptor in the ring. 13 c/r command/response indication bit. this bit equals the state of the c/r bit for the received frame. 12 elf end of long frame indicates that this is the last buffer used by the mk50h28 for this frame. elf is used for data chaining buffers and is set by the mk50h28. elf=0 indicates that this buffer is one in a chain. when not chaining, elf will always be one. 11 fecn forward explicit congestion notification bit. this bit equals the state of the fecn bit for the received frame. 10 becn backward explicit congestion notification bit. this bit equals the state of the becn bit for the received frame. 09 de discard eligibility bit. this bit equals the state of the de bit for the received frame. 08 frer frame in error bit. this bit is valid only if rbfrs is set in ctadr+12. this bit will be set by the mk50h28 only if an aborted or a bad fcs frame is received. 07:00 rbadr the high order 8 address bits of the buffer pointed to by this descriptor. this field is written by the host and unchanged by mk50h28. 4.3.1 receive message descriptor entry 4.3.1.1 receive message descriptor 0 (rmd0) for non-lmi channel 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 rbadr<23:16> o w n a e o r e l f c/r e f c n e b c n de r f e r 4.3.1.2 receive message descriptor 0 (rmd0) for lmi channel 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 rbadr<23:16> o w n a e o r e l f 0 r f e r frame type bit name description 15 owna when this bit is a zero, the host owns this descriptor. when this bit is a one the mk50h28 owns this descriptor. the chip clears the owna bit after filling the buffer pointed to by the descriptor entry, provided a valid frame has been received. the host should set the owna bit after emptying the buffer. once the mk50h28 or host relinquishes ownership of a buffer, it may not change any field in the descriptor entry. mk50h28 39/64
4.3.1.2 receive message descriptor 0 (rmd0) for lmi channel (contimued) bit name description 14 eor end of ring. setting this bit to 1 indicates that this is the last descriptor in the ring. 13 0 reserved. must be written as zero. 12 elf end of long frame indicates that this is the last buffer used by the mk50h28 for this frame. elf=0 indicates that this buffer is one in a chain. elf=1 indicates the end of the buffer chain. elf is set by the mk50h28. when not chaining, elf will always be one. 11:09 lmi frame type received these bits define the type of frame received, as detailed in the following table: bit encoding (msb - lsb) frame type 000 svc frame or transparent mode frame 001 reserved 010 full status enquiry frame 011 status enquiry frame (liv only) 100 asynchronous status frame 101 update status frame 110 full status frame 111 status frame (liv only) 08 frer frame in error bit. this bit is valid only if rbfrs is set in csr 2. this bit will be set by the mk50h28 only if an aborted or a bad fcs frame is received. 07:00 rbadr the high order 8 address bits of the buffer pointed to by this descriptor. this field is written by the host and unchanged by mk50h28. 4.3.1.3 receive message descriptor 1 (rmd1) 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 rbadr<15:00> 0 bit name description 15:01 rbadr the low order 16 address bits of the receive buffer pointed to by this descriptor. rbadr is written by the host cpu and unchanged by mk50h28. the receive buffers must be word aligned. mk50h28 40/64
4.3.1.4 receive message descriptor 2 (rmd2) 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 bcnt<15:00> 0 bit name description 15:00 bcnt buffer byte count is the length of the buffer pointed to by this descriptor expressed in two's complement. this field is written to by the host and unchanged by mk50h28. the value of bcnt must be an even number. for lmi channels this field should be set to greater than 14 bytes. 4.3.1.5 receive message descriptor 3 (rmd3) 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 mcnt<15:00> bit name description 15:00 mcnt message byte count is the length, in bytes, of the received signal unit. mcnt is valid only when elf is set to a one. mcnt is written by mk50h28 and read by the host. if elf is set to a zero the entire buffer has been utilized and the message byte count is given in bcnt above. the value of this field is expressed in two's complement. 4.3.2 transmit message descriptor entry 4.3.2.1 transmit message descriptor 0 (tmd0) for non-lmi channel 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 tbadr<23:16> o w n a e o r e l f c/r f e c n b e c n de t i n t d mk50h28 41/64
bit name description 15 owna when this bit is a zero, the host owns this descriptor. when this bit is a one the mk50h28 owns this descriptor. the host sets the owna bit after filling the buffer pointed to by the descriptor entry. the mk50h28 releases the descriptor after transmitting the buffer. after the mk50h28 or the host has relinquished ownership of a buffer, it may not change any field in the four words that comprise the descriptor entry. 14 eor end of ring. setting this bit to 1 indicates that this is the last descriptor in the ring. 13 c/r command/response indication bit. this bit determines the state of the c/r bit for the transmitted frame. 12 elf end of long frame indicates that this is the last buffer used by the mk50h28 for this frame. it is used for data chaining buffers. elf is set by the host. when not chaining, elf should be set to a one. 11 fecn forward explicit congestion notification bit. this bit determines the state of the fecn bit for the transmitted frame. 10 becn backward explicit congestion notification bit. this bit determines the state of the becn bit for the transmitted frame. 09 de discard eligibility bit. this bit determines the state of the de bit for the transmitted frame. if in the ct entry txcong=1, any frame with de=1 will not be transmitted, but discarded. 08 tintd transmit interrupt disable. if this bit is set, no transmit interrupt is generated when ownership of this descriptor is released back to the host. 07:00 tbadr the high order 8 address bits of the buffer pointed to by this descriptor. this field is written by the host and unchanged by mk50h28. 4.3.2.2 transmit message descriptor 0 (tmd0) for lmi channel 1 5 1 0 1 4 0 9 1 2 1 1 0 8 0 3 0 7 0 2 0 6 0 5 0 4 0 1 0 0 1 3 tbadr<23:16> o w n a e o r e l f t i n t d 0 frame type bit name description 15 owna when this bit is a zero, the host owns this descriptor. when this bit is a one the mk50h28 owns this descriptor. the host sets the owna bit after filling the buffer pointed to by the descriptor entry. the mk50h28 releases the descriptor after transmitting the buffer. after the mk50h28 or the host has relinquished ownership of a buffer, it may not change any field in the four words that comprise the descriptor entry. 14 eor end of ring. setting this bit to 1 indicates that this is the last descriptor in the ring. 13 0 reserved. must be written as zero 12 elf end of long frame indicates that this is the last buffer used by the mk50h28 for this frame. it is used for data chaining buffers. elf is set by the host. when not chaining, elf should be set to a one. mk50h28 42/64
4.3.2.3 transmit message descriptor 1 (tmd1) 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 tbadr<15:00> 0 bit name description 15:00 tbadr the low order 16 address bits of the buffer pointed to by this descriptor. tbadr is written by the host and unchanged by mk50h28. the least significant bit is zero since the descriptor must be word aligned. 4.3.2.4 transmit message descriptor 2 (tmd2) bit name description 15:00 bcnt buffer byte count is the usable lenght of the buffer pointed to by this descriptor expressed in two's complement. thiis field is not used by the mk50h28. 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 bcnt<15:00> bit name description 11:09 lmi frame type to be transmitted these bits define the type of frame to be transmitted when transmission occurs due to lmi polling (enabled by uprim 8 with uparm=2 - see 4.1.2.2). bit encoding (msb - lsb) frame type 000 svc frame or transparent mode frame 001 reserved 010 full status enquiry frame 011 status enquiry frame (liv only) 100 asynchronous status frame 101 update status frame 110 full status frame 111 status frame (liv only) 11:09 0 reserved. must be written as zero. 08 tintd transmit interrupt disable. if this bit is set, no transmit interrupt is generated when ownership of this descriptor is released back to the host. 07:00 tbadr the high order 8 address bits of the buffer pointed to by this descriptor. this field is written by the host and unchanged by mk50h28. mk50h28 43/64
4.3.2.5 transmit message descriptor 3 (tmd3) 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 mcnt<15:00> bit name description 15:00 mcnt message byte count is the length, in octets, of the data contained in the corresponding buffer. the value of this field is expressed in two's complement. 1 5 1 4 1 3 0 7 0 8 1 0 1 1 1 2 0 1 0 2 0 3 0 4 0 5 0 0 0 9 0 6 rctadr<23:16> part number phase sba + 00 sba + 02 sba + 04 sba + 06 sba + 08 reserved rctadr<15:00> revision indicator sba + 10 sba + 12 sba + 14 sba + 16 reserved prmisa<23:16> prmisa<15:00> xctadr<23:16> xctadr<15:00> xmit seq number recv seq number bi-directional xmit seq no bi-directional recv seq no 4.3.3 status buffer mk50h28 44/64
field description part number indicates the part number (28 hex) for the mk50h28. rev indicator indicates the current revision of the part. phase indicates the current phase of operation. 0: stopped, td is held at 1's, rd is ignored 10: information transfer only 11: information transfer + auto lmi transmission - user mode 12: information transfer + auto lmi transmission - network mode 13: information transfer + auto lmi transmission - bi-directional mode 20: transparent mode (all channels are treated as data channels) 30: initialization complete xctadr:<23:00> current transmit context table address. this pointer indicates the address of the entry in context table memory structure corresponding to the descriptor ring from which frames are currently being transmitted. rctadr:<23:00> current receive context table address. this pointer indicates the address of the entry in context table memory structure corresponding to the descriptor ring into which received frames are currently being placed. xmit seq number transmit sequence number. the current sequence number used by the most recently transmitted lmi frame. recv seq number receive sequence number. the current sequence number used by the most recently received lmi frame by-directional xmit seq by-directional transmit sequence number. the current sequence number used by the most recently transmitted lmi frame using the optional bi-directional procedures by-directional recv seq by-directional receive sequence number. the current sequence number used by the most recently received lmi frame using the optional bi-directional procedures prmisa:<23:00> previous miss address. this pointer indicates the address in the context table for the most current receive miss. this value is updated by the mk50h28 whenever a miss condition occurs and does not require issuing a status request primitive to update it, as do all the other fields in the status buffer. 4.4 detailed programming procedures 4.4.1 initialization (reading of initializationblock) the following procedure should be followed to initialize the mk50h28: 1. setup bus control information in csr4. 2. setup the initialization block, address lookup table, context table, and descriptor rings. 3. load the address of the initialization block information into csr's 2 and 3. 4. issue the init primitive through csr1 (write 4200h to csr1) instructing the mk50h28 to read the initialization block pointed to by csr's 2 and 3. 5. wait for the init confirmation primitive (csr1 = 0242h) from the mk50h28. then clear the pav bit in csr1 (write 0040h to csr1). 6. issue the start primitive through csr1 (write 4300h to csr1). the mk50h28 will now be in information transfer phaseand the mk50h28 will begin to continuously transmit flags. 7. enable interrupts in csr0 if desired. 4.4.2 link setup 4.4.2.1 user mode (auto lmi mode) the following procedure should be followed for establishing a link. 1. make sure that the active bit in the address lookup table is set for the lmi channel. 2. issue the auto lmi primitive 7 with uparm = 0 through csr1 (write 4700h) to place the device in auto lmi user mode. mk50h28 45/64
4.4.2.1 user mode (auto lmi mode) - continued in user mode the mk50h28 will perform the following functions: 1. transmit status enquiry frames at an interval determined by the nt1 timer. 2. after every nn1 transmissions of status enquiry with report type of oliv onlyo the mk50h28 transmits a status enquiry with report type of ofull statuso. 3. when a status frame is received in response to a status enquiry, the receive sequence number received from the network side is checked against the user send sequence number. 4. a received full status frame will be stored into the lmi channel buffer, the sequence number checking will be performed, and its reception will be indicated via provider primitive 13. 5. a received asynchronous status frame will be stored into the lmi channel buffer and its recep- tion will be indicated via provider primitive 14. 6. an available transmit or receive buffer is not required for the mk50h28 automatic processing of oliv onlyo frames. 7. a status enquiry frame (full or liv only) received in user mode will be discarded and the discarded frames counter in context table entry 0 will be incremented. 4.4.2.2 network mode (auto lmi mode) the following procedure should be followed for establishing a link. 1. make sure that the active bit in the alt is set for the lmi channel. 2. issue the auto lmi primitive 7 with uparm = 1 through csr1 (write 5700h) to place the device in auto lmi network mode. in network mode the mk50h28 will perform the following functions: 1. automatically responds to status enquiry with report type of oliv onlyo by transmitting a status frame with report type of oliv onlyo along with restarting the nt2 timer. 2. when a status enquiry with report type of ofull statuso is received, the device issues the lmi received primitive 13 (with pparm=1) and expects the host to respond with an lmi status request primitive 11 with uparm=0 (when ready to transmit the full status frame). 3. an available transmit or receive buffer is not required for the mk50h28 automatic processing of oliv onlyo frames. 4. asynchronous status frames may be transmitted by placing the data to be transmitted into the appropriate buffer and issueing primtive 11 with uparm=2. 5. a status frame (full, liv only, or asynchronous) received in network mode will be discarded and the discarded frames counter in context table entry 0 will be incremented. 4.4.2.3 bi-directional procedures (auto lmi mode) the following procedure should be followed to implement the optional bi-directional procedures 1. make sure that the active bit in the alt and txrdy in the ct are set for the lmi channel. 2. make sure that the transmit ring pointer, current transmit descriptor and address field informa- tion in the ct is valid. this is necessary for transmission of full status frame. 3. issue the auto lmi primitive with uparm = 2 through csr1 (write 6700h) to place the device in bi-directional mode. in bi-directional mode the mk50h28 will transmit status enquiry frames with one set of sequence numbers and use a separate set of sequence numbers to proc- ess received status enquiry frames. status frames will be sent with the separate set of sequence numbers differing from those used in the processing of recived status frames. in bi-directional mode the mk50h28 will perform the following functions: 1. the mk50h28 supports this operation using separate user and network sequence numbers and n392 and n393 counters. 2. the mk50h28 transmits status enquiry messages with a user set of sequence numbers at an interval determined by the nt1/t391 timer. the expected response is a status frame with corresponding sequence numbers. mk50h28 46/64
4.4.2.3 bi-directional procedures (auto lmi mode) - continued 3. after every nn1/n391 transmissions of status enquiry with report type of oliv onlyo, the mk50h28 transmits a status enquiry with report type of ofull statuso. 4. a received full status frame will be stored into the lmi channel buffer, the sequence number checking will be performed, and its reception will be indicated to the host via provider primitive 13. a received asynchronous status frame will be stored into the lmi channel buffer and its reception will be indicated to the host via provider primitive 14. 5. the mk50h28 also automatically responds to a status enquiry (oliv onlyo) frame received by transmitting a status (oliv onlyo) frame along with restarting the nt2 timer. when a ofull statuso status enquiry is received, the device issues the lmi received primitive 13 (with pparm=1) and expects the host to respond with lmi status request primitive 11 with uparm=0 (when ready to transmit the full status frame). 6. asynchronous status frames may be transmitted by placing the data to be transmitted into the appropriate buffer and issueing primtive 11 with uparm=2. 4.4.3 sending data on a link use the following procedure to send a frame: 1. make sure that active bit in the alt and txrdy bit in the ct are set for that channel. 2. make sure that the transmit ring pointer, current transmit descriptor and address field infor- mation in the ct is valid. 3. wait for the owna bit of the current transmit descriptor to be cleared, if it is not already. 4. fill the buffer associated with the current transmit descriptor with the data to be sent, or set the descriptor buffer address to any already filled buffer. 5. repeat steps 3 & 4 for next buffer if chaining is necessary, setting elf & mcnt appropriately. 6. set the owna bit for each descriptor to be used in sending the frame. 7. go on to next descriptor. the mk50h28 will clear owna bits when the frame has been transmitted. 4.4.4 receiving data on a link the following procedure should be followed when receiving a frame: 1. make sure that active bit in the alt and rxrdy bit in the ct are set for that channel. 2. make sure that the index to ct in the alt points to appropriate ct entry for that channel. 3. also make sure that the receive ring pointer, current receive descriptor information in the ct is valid. 4. make sure the owna bit of the current receive descriptor is clear. 5. a receive interrupt (rint) will indicate reception of a frame. 6. read the entry or entries in the receive interrupt descriptor ring that have the srvc bit set. the receive context table address and current receive descriptor index available here indi- cate the ct entry and the descriptor within the rx ring associated with the received frame. 6. read data out of the buffer associated with the current receive descriptor. 8. set the owna bit of the current receive descriptor to return ownership to the mk50h28. 9. if the elf bit of the current receive descriptor is clear, then go on to the next descriptor and re- peat from step 4 appending data from each buffer until a descriptor with elf=1 is reached. 10. lmi frames received in any mode will not cause receive interrupts (rint) to be generated, nor will the receive interrupt ring be updated. instead, the mk50h28 will issue primitives corre- sponding to the received lmi frames which are not automatically processed by the mk50h28 (i.e. non oliv onlyo frames). see the description of primitives in section 4.1.2.2. 11. for frames received on the lmi channel (typically dlci 0), bits 09-11 of the receive message descriptor 0 (rmd0) for the lmi channel will indicate the type of frame received. a setting of 000 indicates a received svc frame or transparent mode frame. see section 4.3.1.2 for details. mk50h28 47/64
4.4.5 receiving lmi frames the following procedure should be performed to receive the lmi frames: 1. whenever a lmi frame is received the mk50h28 issues a pprim of 13. in response to that the host may look at the pparm field to identify the frame type received 2. except for the dlci header field all of the data field will be placed in the receive buffer(s). 3. for lmi frames received, bits 9-11 in rmd0 of the receive descriptor will indicate the type of lmi frame received. a setting of 000 indicates a received svc frame or transparent mode frame. 4. in non-auto-lmi mode of operation, lmi frames received on the lmi channel (typically dlci 0) will be written into the receive buffer as transparent or svc frames. 4.4.6 link congestion 1. the host determines congestion on a link. one way it can do is through the congestion statistics and counters in the ct. 2. the host will set txcong and/or rxcong for transmit and receive congestions. 3. if txcong is set the mk50h28 will not transmit any frames with de=1 for that link. 4. if rxcong is set any frames received with de = 1 will be discarded. the frame discarded counter in the ct will keep track of the frames with de = 1 discarded during congestion. if this still does not help congestion, the host can clear the rxrdy bit. then all the frames received on that link will be discarded. the mk50h28 will set rxmiss bit in the ct and will generate a miss interrupt if inea = 1 in the csr 0. 5. when a channel comes out of congestion, the host should clear txcong, rxcong and rxmiss bits in the ct. 4.4.7 transmitting the lmi frames (non-auto lmi) the following procedure should be performed to transmit the lmi frames: 1. the mk50h28 (user) sends the status_enquiry frame to the network using uprim = 10. a uprim of 10 with uparm of 0 should be issued by the user to request full status frame from the network. for sequence numbers exchange only a uprim of 10 with uparm of 1 should be issued by the user. 2. the mk50h28 (network) sends the update_status frame to the user using uprim of 12 with uparm of 0. in order to transmit optional information elements (multicast_status and pvc_status), the host should place this information in the lmi transmit buffer(s). 3. the mk50h28 (network) will send the status frame to the user when a uprim of 11 is issued. a uprim of 12 with uparm of 0 causes the transmission of a full status frame. the optional information elements (pvc_status and may be multicast_status) should be placed in the lmi transmit buffer(s). a uprim of 12 with uparm of 1 sends only the sequence number information to the user. note: the host can use lmi frame transmission provider primitive 12 to start nt1/t391 or nt2/t392 timers. 4.4.8 transparent transmission of frames from lmi buffer the following procedure should be performed to transmit the lmi frames: 1. follow the steps outlined in programming procedure 4.4.3 for sending data from any dlci. 1. set the bit xtran=1 in the context table 0 entry (the lmi ct entry). 2. issue the send lmi primitive 14. (see uprim14 and xtran descriptions for more details). 4.4.9 transmission of frames from higher priority dlci(s) 1. set up the priority dlci block contiguous with the end of the initialization block. 2. input appropriate index (indices) to the desired context table entry and set the active bit. 3. set the ptdmd bit in csr0 (bit 15). see section 4.2.9 for more details. mk50h28 48/64
4.4.10 disabling the mk50h28 the following procedure should be followed to disable the mk50h28: 1. issue the stop primitive through csr1. this will disable the mk50h28 from receiving or trans- mitting. the td pin will be held high while the mk50h28 is in the stopped mode. the stop bit in csr0 will be set and interrupts will be disabled. if reception or transmission of a frame is in progress, then received data may be lost, and the transmitted frame will be aborted. 4.4.11 re-enabling the mk50h28 the same procedure should be followed for re-enabling the mk50h28 as was used to initialize upon power up. if the initialization block and the hardware configuration have not changed, then steps 1,2,3, 4 and 5 of the initialization sequence may be omitted. 4.4.12 mk50h28 internal self test the mk50h28 contains an easy to use internal self test designed to test, with a high fault coverage, all of the major blocks of the device except the dma controller. it is suggested that a loopback test also be performed to more completely test the dma controller. the following procedure should be followed to execute the internal self test: 1. reset the device using the reset pin. 2. set bit 04 of csr4. 3. issue a self test request through csr1. 4. poll csr1, waiting for the pav bit in csr1 to be set by the mk50h28. 5. after the pav bit is set, read csr1. the success or failure of the test is indicated in the pparm and pprim fields as follows: pparm pprim result 0 0 passed self test. 1 1 failed the reset test of the self test. 1 2 failed the self test in the micro controller ram. 1 3 failed the self test in the alu. 1 4 failed the self test in the timers. 1 5 failed the self test in the transmitter and/or receiver. 1 6 failed the self test in the csr's and/or bus master. otherwise failed device. 6. if the pav bit is not set within 75 msec (sysclk = 10mhz), then the mk50h28 is unable to re- spond to the self test request and will not complete successfully. if the self test passes, then it may be immediately re-executed from step 3, otherwise re-execution should proceed from step 1. mk50h28 49/64
section 5 electrical specifications absolute maximum ratings symbol parameter value unit t ub temperature under bias -25 to +100 c t stg storage temperature -65 to +150 c v g voltage on any pin with respect to ground -0.5 to v cc +0.5 v p tot power dissipation 0.5 w stresses above those listed under oabsolute maximum ratingo may cause permanent damage to the above device. this is a stress rating only and functional operation of the device at these or any other condition above those indicated in the operational sections of this specification is not implied. exposure dc characteristics t a =0 cto70 c, v cc =+5v 5 percent unless otherwise specified. symbol parameter min. typ. max. units v il -0.5 +0.8 v v ih +2.0 v cc +0.5 v v ol @ iol = 3.2 ma +0.5 v v oh @ ioh= -0.4 ma +2.4 v i il @ vin = 0.4 to v cc +10 ma i cc @ tsct = 100 ns 50 m a capacitance f = 1mhz symbol parameter min. typ. max. units c in capacitance on input pins 10 pf c out capacitance on output pins 10 pf c io capacitance on i/o pins 20 pf ac timing specifications t a =0 cto70 c, v cc =+5v 5 percent, unless otherwise specified. no signal symbol parameter test condition min. typ. max. units 1 sysclk t sct sysclk period 40 10000 ns 2 sysclk t scl sysclk low time 16 ns 3 sysclk t sch sysclk high time 16 ns 4 sysclk t scr rise time of sysclk 0 8 ns 5 sysclk t scf fall time of sysclk 0 8 ns 6 tclk t tct tclk period 20 ns 7 tclk t tcl tclk low time 8 ns 8 tclk t tch tclk high time 8 ns 9 tclk t tcr rise time of tclk cl = 50 pf 0 8 ns 10 tclk t tcf fall time of tclk 0 8 ns 11 td t tdp td data propagation delay after the falling edge of tclk cl = 50 pf 13 ns 12 td t tdh td data hold time after the falling edge of tclk 5ns mk50h28 50/64
ac timing specifications continued t a =0 cto70 c, v cc =+5v 5 percent, unless otherwise specified. no signal symbol parameter notes min. typ. max. units 13 rclk t rct rclk period 20 ns 14 rclk t rch rclk high time 8 ns 15 rclk t rcl rclk low time 8 ns 16 rclk t rcr rise time of rclk 0 8 ns 17 rclk t rcf fall time of rclk 0 8 ns 18 rd t rdr rd data rise time 0 8 ns 19 rd t rdf rd data fall time 0 8 ns 20 rd t rdh rd hold time after rising edge of rclk 2 ns 21 rd t rds rd setup time prior to rising edge of rclk 8ns 22 ale/das t doff bus master driver disable output delay 0 20 ns 23 ale/das t don bus master driver enable after rising edge t1 sysclk output delay 0 20 ns 24 hlda t hha delay to falling edge of hlda from falling edge of hold (bus master) 0ns 25 hlda t hlah hlda input setup time 10 ns 26 hlda t hlas delay to rising edge hlda from rising edge hold 10 ns 27 a t xas address setup time output delay 30 ns 28 a t xah address hold time output delay 20 ns 29 dal t as address setup time output delay 35 ns 30 dal t ah address hold time output delay 0 20 ns 31 dal t rdas data setup time (bus master read) 15 ns 32 dal t rdah data hold time (bus master read) 10 ns 33 dal t wah address hold time (bus master write) output delay 15 ns 34 dal t wds data setup time (bus master write) output delay 25 ns 35 dal t wdh data hold time (bus master write) output delay 25 ns 36 dal t srds data setup time (bus slave read) 25 ns 37 dal t srdh data hold time (bus slave read) 25 ns 38 dal t swdh data hold time (bus slave write) 10 ns 39 dal t swds data setup time (bus slave write) 10 ns 40 ale t ales ale setup time output delay 30 ns 41 ale t alhb ale hold time (asserted to de- asserted) (dma burst) output delay 15 ns 42 ale t alhs ale hold time (asserted to 3-state) (single dma cycle) output delay 20 ns 43 das t dass das setup time from falling edge of t2 sysclk (bus master) output delay 25 ns 44 das t dash das hold time from rising edge of sysclk (bus master) output delay 5 15 ns 45 dali /dalo bm)/bm1 t bmde bus master driver enable (from 3- state to driven) (bus master) output delay 25 ns 46 dali t ris dali setup time (bus master read) output delay 15 ns 47 dali t rih dali hold time (bus master read) output delay 25 ns 48 dali t bmdd bus master driver disable (from driven to 3-state) (bus master) output delay 20 ns mk50h28 51/64
ac timing specifications continued t a =0 cto70 c, v cc =+5v 5 percent, unless otherwise specified. no signal symbol parameter notes min. typ. max. units 49 dalo t ros dalo setup time (bus master read) output delay 30 ns 50 dalo t roh dalo hold time (bus master read) output delay 30 ns 52 cs t csh cs hold time 10 ns 53 cs t css cs setup time 10 ns 54 adr t sah adr hold time 10 ns 55 adr t sas adr setup time 10 ns 56 das t sdas das input setup time (bus slave) 10 ns 57 das t sdsh das input hold time (bus slave) 10 ns 58 ready t rdys ready setup time (bus slave) output delay 15 ns 59 ready t sryh ready hold time after rising edge of das (bus slave read) 15 ns 60 ready t rsh ready setup time (bus master) 10 ns 61 ready t srs ready hold time (bus master) 10 ns 62 read t reds read setup time (bus slave) 10 ns 63 read t redh read hold time (bus slave) 10 ns 64 hold t hlds hold setup time (bus master) output delay 15 ns 65 hold t hldh hold hold time (bus master) output delay 35 ns mk50h28 52/64
c l 0.4 ma cr cr cr cr 1 2 3 4 r1 = 1.2 k cr1 - cr4 = 1n914 or equiv test point from output under test r1 = 1.4 k c l vcc vcc c = 50pf min @ 1 mhz l from output under test note: this load is used on all outputs except intr, hold, ready. note: this load is used on open drain outputs intr, hold, ready. figure 9a: ttl output load diagram figure 9b: open drain output load diagram rclk 13 15 14 16 17 21 20 19 18 rd 12 6 87 10 11 9 td tclk o0o o.8 v o.8 v 90 % o1o 2.0 v 2.0 v 10 % output input float timing measurements are made at the following voltages, unless otherwise specified: figure 10: mk50h28 serial link timing diagram mk50h28 53/64
a 16-23 ale sysclk address bm0,1 ready das hlda hold notes: 2. output delay times are the maximum delay from the specifed edge to a valid output. 3. the bus master cycle time will increase from a minimum, in 1 sysclk increments until the slave device returns ready. 64 24 25 65 26 27 40 23 23 43 44 41 42 28 22 60 61 t0 t1 t2 t3 t4 t5 t6 dal0-15 read dalo dali 29 30 50 32 45 data in addr 31 49 48 47 46 48 1. the shaded sysclk periods t0 and t5 will be removed when setting csr2 bit 15, cycle =1 to select the shorter dma cycle as shown in figure 7a. figure 11: mk50h28 bus master timing (read) (for cycle = 0, csr2<15>) mk50h28 54/64
a 16-23 ale sysclk bm0,1 ready das hlda hold 64 24 25 65 26 27 40 23 23 44 41 42 28 22 t1 t2 t3 t4 t5 dal0-15 read dalo dali 29 30 50 32 45 data in addr 31 49 48 47 46 48 address 60 61 43 notes: 2. output delay times are the maximum delay from the specifed edge to a valid output. 3. the bus master cycle time will increase from a minimum, in 1 sysclk increments until the slave device returns ready. 1. this reduced dma cycle time is selected by setting csr2 bit 15, cycle =1. figure 11a: mk50h28 reduced cycle bus master timing (read) (for cycle = 1, csr2<15>) mk50h28 55/64
a 16-23 ale sysclk address bm0,1 ready das hlda hold notes: 2. output delay times are the maximum delay from the specifed edge to a valid output. 3. the bus master cycle time will increase from a minimum, in 1 sysclk increments until the slave device returns ready. 64 24 25 65 26 27 40 23 23 43 44 41 42 28 22 60 61 48 48 t0 t1 t2 t3 t4 t5 t6 data addr dal0-15 read dalo dali 29 34 33 35 45 1. the shaded sysclk periods t0 and t5 will be removed when setting csr2 bit 15, cycle =1 to select the shorter dma cycle as shown in figure 8a. figure 12: mk50h28 bus master timing diagram (write) (for cycle = 0, csr2<15>) mk50h28 56/64
a 16-23 ale sysclk bm0,1 ready das hlda hold 25 65 26 27 40 23 23 43 44 41 42 28 22 60 61 48 48 t1 t2 t3 t4 t5 data addr dal0-15 read dalo dali 29 34 33 35 45 address 64 24 notes: 2. output delay times are the maximum delay from the specifed edge to a valid output. 3. the bus master cycle time will increase from a minimum, in 1 sysclk increments until the slave device returns ready. 1. this reduced dma cycle time is selected by setting csr2 bit 15, cycle = 1. times t0 and t5 from the standard dma cycle are removed for this reduced timing. figure 12a: mk50h28 reduced cycle bus master timing (write) (for cycle = 1, csr2<15>) mk50h28 57/64
a 16-23 ale sysclk bm0,1 ready das hlda hold 25 27 40 23 23 43 44 27 t1 t2 t3 t4 t5 dal0-15 read dalo dali 29 45 address 64 24 65 26 41 42 22 61 48 t1 t2 t3 t4 t5 address 40 41 43 44 60 data addr 34 33 48 35 34 data addr 29 61 60 28 figure 12b: bus master burst timing (reduced cycle - write) mk50h28 58/64
sysclk adr ready dal data out cs das read (read) 0-15 1. input setup and hold times are in minimum values required to or from the particular edge specified in order to be recognized in that cycle. 2. output delay times are from the specified edge to a valid output. notes: 53 52 55 54 56 57 58 59 62 63 36 37 figure 13: mk50h28 bus slave timing diagram (read) mk50h28 59/64
sysclk adr das read (write) dal0-15 data in cs ready 1. input setup and hold times are the minimum values required to or from the particular edge specified in order to be recognized in that cycle. 2. output delay times are from the specified edge to a valid output. notes: 53 52 54 55 56 57 58 59 62 63 39 38 figure 14: mk50h28 bus slave timing diagram (write) mk50h28 60/64
mk50h28 n 25 / xx revision code (contact factory representative for current revision) speed sort (25 = 25mhz sysclk) n = plastic dip (48 pins) q = plastic j-leaded chip carrier (52 pins) part # protocol 50h28 = frame relay package ordering information: mk50h28 61/64
dim. mm inch min. typ. max. min. typ. max. a1 0.63 0.025 b 0.45 0.018 b1 0.23 0.31 0.009 0.012 b2 1.27 0.050 d 62.74 2.470 e 15.2 16.68 0.598 0.657 e 2.54 0.100 e3 58.42 2.300 f 14.1 0.555 i 4.445 0.175 l 3.3 0.130 dip48 outline and mechanical data mk50h28 62/64
plcc52 dim. mm inch min. typ. max. min. typ. max. a 4.20 5.08 0.165 0.20 a1 0.51 0.020 a3 2.29 3.30 0.090 0.13 b 0.33 0.53 0.013 0.021 b1 0.66 0.81 0.026 0.032 c 0.25 0.01 d 19.94 20.19 0.785 0.795 d1 19.05 19.20 0.750 0.756 d2 17.53 18.54 0.690 0.730 d3 15.24 0.60 e 19.94 20.19 0.785 0.795 e1 19.05 19.20 0.750 0.756 e2 17.53 18.54 0.690 0.730 e3 15.24 0.60 e 1.27 0.05 l 0.64 0.025 l1 1.53 0.060 m 1.07 1.22 0.042 0.048 m1 1.07 1.42 0.042 0.056 outline and mechanical data mk50h28 63/64
information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of stmicroelectronics. specification mentioned in this publication are subject to change without notice. this publication supersedes and replaces all information previously supplied. stmicroelectronics products are not authorized for use as critical components in life support devices or systems without express written approval of stmicroelectronics. the st logo is a registered trademark of stmicroelectronics ? 2000 stmicroelectronics printed in italy all rights reserved stmicroelectronics group of companies australia - brazil - china - finland - france - germany - hong kong - india - italy - japan - malaysia - malta - morocco - singapore - spain - sweden - switzerland - united kingdom - u.s.a. http://www.st.com mk50h28 64/64


▲Up To Search▲   

 
Price & Availability of MK50H28DIP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X