SLDU019B December   2015  – March 2016 PGA450-Q1

 

  1.   PGA450Q1EVM-S User's Guide and TIDA-00151 UART Demo Instructional
    1.     Trademarks
    2. 1 Introduction
    3. 2 Setup and Operation
      1. 2.1 Input and Output Connectors
      2. 2.2 Basic Operation
        1. 2.2.1 Programming the PGA450-Q1 DEVRAM or OTP Memory
        2. 2.2.2 Programming the PGA450-Q1 EEPROM
        3. 2.2.3 Testing the UART Connection With the TI GER Board
      3. 2.3 UART Command Listing
    4. 3 Software
      1. 3.1 IDE Output File Configuration
        1. 3.1.1 Setup for DEVRAM Output File
        2. 3.1.2 Setup for OTP Output File
      2. 3.2 Interface Descriptions
        1. 3.2.1 UART Interface
        2. 3.2.2 LIN Interface
        3. 3.2.3 Serial-Peripheral Interface
    5. 4 Schematic, Bill of Materials, and Layout
      1. 4.1 Schematic
      2. 4.2 Bill of Materials
        1. 4.2.1 BOM
      3. 4.3 Board Layout and Component Placement
    6. 5 References
  2.   Revision History

Testing the UART Connection With the TI GER Board

Use the steps that follow to test the UART connection with the TI GER board.

  1. If the user has not disconnected the system power, ensure that the MCU is activated again by clicking the ON (MicroActive) on the ESFR tab.
  2. In the top-right of the PGA450Q1EVM GUI, click the Direct TI GER Control button. This button does not contain text; it is just an image (see the red circle in Figure 4).
  3. tiger_control_button_sldu019.pngFigure 4. Direct TI GER Control Button
  4. Under the GPIO tab, clicking the IO-8 = IN and IO-9 = IN buttons to ensure that IO-8 and IO-9 are set as IN HIGH (see Figure 5).
  5. gpio_tab_sldu019.pngFigure 5. GPIO Tab
  6. Connect the UART pins of the sensor to the UART pins of the TI GER board (see Figure 3)
    • Pin 10 (TxD) on the TI GER board goes to RXD on the Sensor.
    • Pin 20 (RxD) on the TI GER board goes to TXD on the Sensor.
  7. On the UART tab, under the UART CONTROL SETTING section, select SETUP #9.
  8. In the BAUD RATE box in the lower right corner of the GUI, enter 19200.
  9. On the UART TEST tab, Select SETUP #9
  10. Click the OPEN UART MODULE button.
  11. Click the CHANGE BAUD RATE button, which should display 19200 and 1-bit = 52.1 μs.
  12. Click the CHECK FOR ERRORS to ensure there no errors occurred. If an error occurred, one of the boxes will be red, at which point the user must click the CLOSE MODULE IMMEDIATELY and CLOSE UART MODULE buttons. Then repeat the setup, beginning at Step 8 in Section 2.2.3.
  13. Write the values shown in Figure 6 in the TX box. Each byte must be typed on a separate row.
  14. data_packet_sldu019.pngFigure 6. User Submitted Data Packet in TX Box and Valid RX Response

    The description of the TX data packet is as follows:

    • 00: is the break field
    • 55: is the synchronization field
    • 01: 0 is the command and 1 is the sensor address. Ensure that the sensor address matches what was programmed in the EEPROM address 0x07 from the previous steps.
    • 00: is the checksum field; however, this data is discarded, so the user may enter any value here.

  15. Click the RX button to display the response of the sensor.
  16. The description of the RX data packet is as follows:

    • 12: is dummy byte 1 and has no special meaning.
    • 34: is dummy byte 2 and has no special meaning.
    • B9: is the checksum from byte 1 and byte 2.

The function that calculates the checksum is described as follows:

Table 4 provides a checksum calculation of four bytes shown. If the frame has four data bytes of the protected identifier and three data bytes, the calculation is the same. The data = 0x4A, 0x55, 0x93, 0xE5.

Table 4. Example of Checksum Calculation

Action Hex Carry D7 D6 D5 D4 D3 D2 D1 D0
0x4A 0x4A 0 1 0 0 1 0 1 0
+0x55 = Add Carry 0x9F
0x9F
0 1
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
+0x93 = Add Carry 0x132
0x33
1 0
0
0
0
1
1
1
1
0
0
0
0
1
1
0
1
+0xE5 = Add Carry 0x118
0x19
1 0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
1
Invert 0xE6 1 1 1 0 0 1 1 0
0x19 + 0.xE6 = 0xFF 1 1 1 1 1 1 1 1

The resulting sum is 0x19. Inversion yields the final result of: checksum = 0xE6. The receiving node can check the consistency of the received frame by using the same addition mechanism. When the received checksum (0xE6) is added to the intermediate result (0x19) the sum is 0xFF.

The previously described TX command is called command0 – Sensor Check Command. If the sensor is address 0x01 and the user attempts to communicate with a sensor using a different address, sensor 0x01 gives no response. In the following TX example shown in Figure 7, no response was received as displayed in the RX box because, in this example, command0 was sent to sensor address 0x02.

no_response_sldu019.pngFigure 7. No Response in the RX Box