C55XX CSL EXAMPLE

- Main Page
- Related Pages
- Data Structures

CSL UART EXAMPLE DOCUMENTATION

## UART EXAMPLE1 - POLL MODE TEST

### TEST DESCRIPTION:

This test is to verify the CSL UART module operation in polled mode. This test code communicates with the HyperTerminal on the host PC through UART module on C5505/C5515 DSP operating in polled mode. UART peripheral is configured by the test code to the following values Baud Rate - 2400. Data bits - 8. Parity - None. Stop bits - 1. Flow control - None. HyperTerminal on the host PC should be configured with the same values to to proper communication with the C5505/C5515 EVM. C5505/C5515 EVM should be connected to the host PC using an RS232 cable and HyperTerminal on the host PC should be opened and connected.This test works at all the PLL frequencies.

Upon running the test, a message prompting to enter the string size will be displayed on HyperTerminal.Enter the string size which is greater than 1 and less than 99. String length should be two characters and the numbers below 10 should be preceded by 0(01,02,03...). After reading the string size a message prompting to enter the string will be displayed on HyperTerminal. Enter the string which is exactly of the length specified in the previous query. Once the string of the specified size is entered, test code will stop reading from the HyperTerminal and send message to inform that the reading from HyperTerminal has been stopped. After reading the string test code will send the same string back to the HyperTerminal.

       Messages displayed on the HyperTerminal when entered a string
       "CSL UART TESTING" will be as shown below.

         ====================================================================
         ==                                                                ==
         ==  Enter the size of the string(min 01 to max 99)                ==
         ==  >> 16                                                         ==
         ==                                                                ==
         ==  Enter the string:                                             ==
         ==  >> CSL UART TESTING                                           ==
         ==                                                                ==
         ==  Please stop typing, reading already stopped...!!!             ==
         ==                                                                ==
         ==  YOU HAVE ENTERED: CSL UART TESTING                            ==
         ==                                                                ==
         ====================================================================

Manual inspection is required to verify the success of each step. All the communication between UART and HyperTerminal will be displayed on the CCS "stdout" window.

NOTE: THIS TEST HAS BEEN DEVELOPED TO WORK WITH CHIP VERSIONS C5505 AND C5515. MAKE SURE THAT PROPER CHIP VERSION MACRO IS DEFINED IN THE FILE c55xx_csl\inc\csl_general.h.

### TEST PROCEDURE:

- Connect the RS232 cable; One end to the UART port on the C5505/C5515 EVM(J13) and other to the COM port of the Windows Xp PC.
- Open the HyperTerminal on the Host PC. To open the HyperTerminal click on 'Start->Programs->Accessories->Communications->HyperTerminal’
- Disconnect the HyperTerminal by selecting menu Call->Disconnect
- Select Menu 'File->Properties' and click on the Button 'Configure'
  Set 'Bits Per Second(Baud Rate)' to 2400.
  Set 'Data bits' to 8.
  Set 'Parity' to None.
  Set 'Stop bits' to 1.
  Set 'Flow control' to None.
  Click on 'OK' button.
  HyperTerminal is configured and ready for communication
- Connect the HyperTerminal by selecting menu Call->Call.
- Open the CCS and connect the target (C5505/C5515 EVM)
- Open the project "CSL_UART_pollExample.pjt" and build it
- Load the program on to the target
- Set the PLL frequency to 12.288MHz
- Run the program and observe the test result
- Repeat the test at PLL frequencies 40, 60, 75 and 100MHz
- Repeat the test in Release mode

### TEST RESULT:

- All the CSL APIs should return success
- Data sent from the HyperTerminal should be read by the UART properly
- Data sent by the UART should be displayed on the HyperTerminal properly

============================================================================

## UART EXAMPLE2 - DMA MODE TEST

### TEST DESCRIPTION:

This test is to verify the CSL UART module operation in DMA mode. This test code communicates with the HyperTerminal on the host PC through UART module on C5505/C5515 DSP operating in DMA mode. UART peripheral is configured by the test code to the following values Baud Rate - 2400. Data bits - 8. Parity - None. Stop bits - 1. Flow control - None. HyperTerminal on the host PC should be configured with the same values to to proper communication with the C5505/C5515 EVM. C5505/C5515 EVM should be connected to the host PC using an RS232 cable and HyperTerminal on the host PC should be opened and connected. This test works at all the PLL frequencies.

Upon running the test, a message prompting to ENTER TEXT OF SIZE 30 will be displayed on HyperTerminal. Enter the text which is of the length 30 characters. Once the text is entered, test code will stop reading from the HyperTerminal and sends a message to inform that the reading from HyperTerminal has been stopped. After reading the text test code displays it on the CCS "stdout" window. Data read from the HyperTerminal will not be sent back to the HyperTerminal. It should be verified by the message displayed on the CCS "stdout" window.

Manual inspection is required to verify the success of each step.

NOTE: THIS TEST HAS BEEN DEVELOPED TO WORK WITH CHIP VERSIONS C5505 AND C5515. MAKE SURE THAT PROPER CHIP VERSION MACRO IS DEFINED IN THE FILE c55xx_csl\inc\csl_general.h.

### TEST PROCEDURE:

- Connect the RS232 cable; One end to the UART port on the C5505/C5515 EVM(J13) and other to the COM port of the Windows Xp PC.
- Open the HyperTerminal on the Host PC. To open the HyperTerminal click on 'Start->Programs->Accessories->Communications->HyperTerminal’
- Disconnect the HyperTerminal by selecting menu Call->Disconnect
- Select Menu 'File->Properties' and click on the Button 'Configure'
  Set 'Bits Per Second(Baud Rate)' to 2400.
  Set 'Data bits' to 8.
  Set 'Parity' to None.
  Set 'Stop bits' to 1.
  Set 'Flow control' to None.
  Click on 'OK' button.
  HyperTerminal is configured and ready for communication
- Connect the HyperTerminal by selecting menu Call->Call.
- Open the CCS and connect the target (C5505/C5515 EVM)
- Open the project "CSL_UART_dmaExample.pjt" and build it
- Load the program on to the target
- Set the PLL frequency to 12.288MHz
- Run the program and observe the test result
- Repeat the test at PLL frequencies 40, 60, 75 and 100MHz
- Repeat the test in Release mode

### TEST RESULT:

- All the CSL APIs should return success
- Text entered on the HyperTerminal should be received and displayed properly in the CCS "stdout" window.
- Data sent by the UART should be displayed on the HyperTerminal properly

============================================================================

## UART EXAMPLE3 - INTERRUPT MODE TEST

### TEST DESCRIPTION:

This test is to verify the CSL UART module operation in interrupt mode. This test code communicates with the HyperTerminal on the host PC through UART module on C5505 DSP operating in interrupt mode. UART peripheral is configured by the test code to the following values. Baud Rate - 2400. Data bits - 8. Parity - None. Stop bits - 1. Flow control - None. HyperTerminal on the host PC should be configured with the same values to to proper communication with the C5505/C5515 EVM. C5505/C5515 EVM should be connected to the host PC using an RS232 cable and HyperTerminal on the host PC should be opened and connected.This test works at all the PLL frequencies.

This test code reads characters entered by the user on the HypeTerminal continuously one character at a time. For each character entered on the HyperTerminal, URAT generates a receive interrupt and the character is read in the Rx ISR. Symbol '$' needs to be entered on the HyperTerminal to terminate the test. Upon running the test, details of the test will be displayed on the HyperTerminal. A message will be displayed prompting to enter a character. Character entered on the HyperTerminal will be read by the test code and and echoed back to the HyperTerminal until the symbol '$' is entered on the HyperTerminal. Messages displayed to direct the user will be transmitted to the HyperTerminal using Polled mode.

       Messages displayed on the HyperTerminal during this test will be as shown
       below.

          ====================================================================
          ==                                                                ==
          ==  UART INTERRUPT TEST!                                          ==
          ==  TEST READS A CHARACTER FROM HYPERTERMINAL CONTINUOUSLY        ==
          ==  ENTER '$' TO END THE TEST                                     ==
          ==                                                                ==
          ==  Enter char:C                                                  ==
          ==  C                                                             ==
          ==  Enter char:S                                                  ==
          ==  S                                                             ==
          ==  Enter char:L                                                  ==
          ==  L                                                             ==
          ==  Enter char:$                                                  ==
          ==  $                                                             ==
          ==                                                                ==
          ==  YOU HAVE ENTERED '$'.                                         ==
          ==  END OF THE TEST!!                                             ==
          ==                                                                ==
          ====================================================================

Manual inspection is required to verify the success of each step.

NOTE: THIS TEST HAS BEEN DEVELOPED TO WORK WITH CHIP VERSIONS C5505 AND C5515. MAKE SURE THAT PROPER CHIP VERSION MACRO IS DEFINED IN THE FILE c55xx_csl\inc\csl_general.h.

### TEST PROCEDURE:

- Connect the RS232 cable; One end to the UART port on the C5505 EVM(J13) and other to the COM port of the Windows Xp PC.
- Open the HyperTerminal on the Host PC. To open the HyperTerminal click on 'Start->Programs->Accessories->Communications->HyperTerminal’
- Disconnect the HyperTerminal by selecting menu Call->Disconnect
- Select Menu 'File->Properties' and click on the Button 'Configure'
  Set 'Bits Per Second(Baud Rate)' to 2400.
  Set 'Data bits' to 8.
  Set 'Parity' to None.
  Set 'Stop bits' to 1.
  Set 'Flow control' to None.
  Click on 'OK' button.
  HyperTerminal is configured and ready for communication
- Connect the HyperTerminal by selecting menu Call->Call.
- Open the CCS and connect the target (C5505 EVM)
- Open the project "CSL_UART_IntExample.pjt" and build it
- Load the program on to the target
- Set the PLL frequency to 12.288MHz
- Run the program and observe the test result
- Repeat the test at PLL frequencies 40, 60, 75 and 100MHz
- Repeat the test in Release mode

### TEST RESULT:

- All the CSL APIs should return success
- Characters entered on the HyperTerminal should be read and echoed back to the HyperTerminal properly.
- Data sent by the UART should be displayed on the HyperTerminal properly