## page was renamed from M-Link Link Layer = M-Link Link Layer = <> == Control Codes == ||RX_DV/TX_EN||RX_ER/TX_ER||description|| ||0||0||IDLE (< K28.5, D5.6 >, < K28.5, D16.2 >)|| ||0||1||CE, Carrier extend (K23.7, K23.7)|| ||1||0||ND, Normal data character (DX.Y)|| ||1||1||ER, Data error or Error propagation (K30.7, K30.7)|| IFG (inter-frame gap) should be 2 or more IDLE characters between consecutive frames. Reset frame: IDLE, CE, CE, CE, CE, CE, IDLE. Link Control frame: IDLE, CE, CE, CE, ND|ER, ND|ER, IDLE. Data frame: IDLE, CE, ND|ER repeated even times, IDLE. Any other sequence should not be decoded. It should not block the connection. Erroneous character sequences are recommended to be counted and reported. <> == Link Control Frame == Link Control frame data is transferred in two 16-bit words, first is control word, second is the bit inversion of the control word for error protection. On receive side, the control word should be analyzed only if the second word is the exact bit inversion of the first word. ||'''bit'''||'''description (send)'''||'''action on receive side'''|| ||0||Suspend (receive buffer is full)||Stop transmitting data|| ||1||--(Enable remote data loopback **)--||--(Enable loopback mode)--|| ||2||Local Spill signal||Remote Spill state|| ||3||Local Error state||Remote Error state|| ||4||Local Ready state||Remote Ready state|| ||5||Local RX symbol error||Remote RX symbol error|| ||6||Local RX CRC error||Remote RX CRC error|| ||7||Local RX link up||Remote RX link up|| ||15:8||user defined||user defined|| ||31:16||Inverted 15:0||Must be equal to inverted 15:0|| Link Control Frame (LCF) must be sent continuously every T μs (*) after reset independently on any other frames. LCF has highest priority. If no LCF is received after 5*T time, link is considered down. (*) – repetition interval may be programmed. Default is 1000 μs. (**) – in remote loopback mode the endpoint should return back all data frames. Link control frame behavior should not be changed. == Reset Frame == When Reset Frame is received, perform full reset (control and data). Endpoint must be ready to receive next frame immediately after reset. == Status Indicators == Two LEDs are recommended for status display: green and orange. ||green||orange||state|| ||{{attachment:led_off.gif}}||{{attachment:led_off.gif}}||link disabled|| ||{{attachment:led_green.gif}}||{{attachment:led_off.gif}}||link up|| ||{{attachment:led_off.gif}}||{{attachment:led_orange.gif}}||link down|| ||{{attachment:led_green_blink.gif}}||{{attachment:led_off.gif}}||sending data|| ||{{attachment:led_green_blink.gif}}||{{attachment:led_orange.gif}}||sending data, permanent receive error|| ||{{attachment:led_green.gif}}||{{attachment:led_orange.gif}}||permanent receive error|| ||{{attachment:led_green.gif}}||{{attachment:led_orange_blink.gif}}||error in received data|| ||{{attachment:led_off.gif}}||{{attachment:led_orange_blink.gif}}||-|| ||{{attachment:led_green_blink.gif}}||{{attachment:led_orange_blink.gif}}||sending data, receive errors|| ---- [[CategoryMlink|MLink]]