SLAA202B February   2005  – December 2018 MSP430F149 , MSP430F149 , MSP430F2252-Q1 , MSP430F2252-Q1 , MSP430F2272-Q1 , MSP430F2272-Q1 , MSP430F2274 , MSP430F2274 , MSP430FG4619 , MSP430FG4619

 

  1.   Implementing IrDA With MSP430™ MCUs
    1.     Trademarks
    2. 1 Introduction
    3. 2 Hardware Description
      1. 2.1 Hardware Overview
      2. 2.2 Circuit Description
    4. 3 Software Description
      1. 3.1 Implementing IrPHY Layer Using Timer_A
        1. 3.1.1 Transmission
        2. 3.1.2 Reception
      2. 3.2 Implementing IrPHY Layer using USCI_A0
      3. 3.3 Implementing IrLAP
        1. 3.3.1 Discovery Services
        2. 3.3.2 Connect Services
        3. 3.3.3 Data Services
        4. 3.3.4 Disconnect Services
      4. 3.4 Implementing IrLMP
        1. 3.4.1 Discovery Services
        2. 3.4.2 Link Connect and Connect Services
        3. 3.4.3 Data Services
        4. 3.4.4 Disconnect Services
      5. 3.5 IAS Implementation
      6. 3.6 TTP Implementation
      7. 3.7 IrCOMM Implementation
      8. 3.8 Application Layer
    5. 4 PC Demonstration Application
    6. 5 IrDA Protocol Basics
      1. 5.1 Physical (IrPHY) Layer
      2. 5.2 Link Access Protocol (IrLAP) Layer
      3. 5.3 Link Management Protocol (IrLMP) Layer
      4. 5.4 Information Access Services (IAS)
      5. 5.5 Tiny Transfer Protocol (TTP)
      6. 5.6 IrCOMM
    7. 6 IrDA Communication Diagram
    8. 7 Frame Exchange Log
    9. 8 References
  2.   Revision History

Connect Services

After the exchange identification frames have been handled, it is time to negotiate the connection parameters. For the negotiation procedure, accepted connection parameters are established using constants. For the purpose of this application, the constants defined in the IrDA Lite specification are used as the default transmission parameters (for example, 9.6 kbps, 64 bytes, and 1 frame). Then, the primary device produces a set of parameters which it supports and sends it as soon as the discovery process is completed successfully. The other important value introduced by the set normal response mode (SNRM) frame is the connection address (CA). The CA is the byte which is used to contact the specific peer by the primary device instead of the broadcast address.

The format of this SNRM frame is the IrLAP unnumbered type (see Figure 9). An SNRM frame can be easily identified by its control field 093h at byte 2 of the frame (IrLAP control byte). The only bit that is necessary to check is bit 7 because this bit is not set for any other control field of an unnumbered format frame.

snrm-frame-format.gifFigure 9. SNRM Frame Format

When entering the connection process, the UA response to the SNRM command is issued. The routine responsible for issuing this response verifies that the frame is coming from the device with the same address as the one which caused the discovery sequence to take place. It also includes in the response frame the parameters supported by the secondary for the connection. As part of the routine responsible for assembling the UA response frame to the SNRM command, the counters for amount of sent and received frames (Ns and Nr, respectively) are reset, and the connected flag is set high to let other services know that a connection has been successfully established. On the success of the connection process, NRM is entered.