C55XX CSL EXAMPLE
CSL SAR EXAMPLE DOCUMENTATION

SAR EXAMPLE1 - POLL MODE TEST

TEST DESCRIPTION:

This test verifies the functionality of CSL SAR(Successive Approximation Register) in polled mode. SAR module on C5505/C5515 DSP is used to convert the voltage generated by the key pad available on the C5505/C5515 EVM to digital values. This key pad is having 10 button with each button having a different digital value corresponding to the voltage generated when it is pressed.

This test is having two parts. In the first part of the test C5505/C5515 key pad button voltage is read and the converted digital value is displayed on the CCS "stdout". This digital value corresponds to the voltage of the button pressed while running the test. SAR module is having six channels to read the data. This test configures channel four for reading the button voltage in polled mode. After successful configuration of the SAR, voltage conversion is started using the CSL API SAR_startConversion(). Digital value of the button voltage is read for 40 times and is displayed in the CCS "stdout" window. After reading 40 digital values SAR data conversion is stopped and CSL SAR module will be closed.

In the second part of the test SAR is configured using SAR_chanConfig() API. Configured values are read back using SAR_getConfig() API and are compared with the original values. This part of the test also verifies setting the GPO direction using SAR_GPODirSet() API. Success of this API call can be verified using the SAR GPO control register(SARGPOCTRL) value displayed in the CCS "stdout" window.

   Digital values corresponding to the button voltage will vary slightly
   depending on the system clock value. Below are the range of values for
   each button available on the C5505/C5515 EVM key pad.

    No button pushed: 0x3fb - 0x3ff
    SHIFT:    0x230 - 0x238
    STOP:     0x0
    RWD:      0x20f - 0x216
    MENU:     0x367 - 0x374
    DN:       0x2bc - 0x2c6
    SEL/PLAY: 0x1d3 - 0x1d8
    UP:       0x24f - 0x258
    REC:      0xd5  - 0xd8
    FWD:      0x163 - 0x167
    MODE:     0x30b - 0x316

   

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:

TEST RESULT:

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

SAR EXAMPLE2 - DMA MODE TEST

TEST DESCRIPTION:

This test verifies the functionality of CSL SAR(Successive Approximation Register) in DMA mode. SAR module on C5505/C5515 DSP is used to convert the voltage generated by the key pad available on the C5505/C5515 EVM to digital values. This key pad is having 10 button with each button having a different digital value corresponding to the voltage generated when it is pressed.

During the test C5505/C5515 key pad button voltage is read and the converted digital value is displayed in the CCS "stdout" window. This digital value corresponds to the voltage of the button pressed while running the test. SAR module is having six channels to read the data. This test configures channel four for reading the button voltage in DMA mode. DMA channel should configured for SAR data read before starting the SAR data conversion. DMA module in this test uses interrupt to indicate the completion of DMA data transfer. CSL INTC module should be configured and DMA ISR should registered before starting the SAR data conversion. After successful configuration of the SAR, DMA data transfer is started using DMA_start() API and SAR voltage conversion is started using the CSL API SAR_startConversion(). Digital value of the button voltage is read by the DMA module and is copied to the data buffer 'readBuffer'. Even though the digital value generated by SAR is maximum 10 bits, DMA reads 32 bits from the SAR. Due to word swap nature of the DMA, value read from the SAR will be stored in the upper word of the data buffer. This value will be displayed in the CCS "stdout" window. Digital value is read from SAR and is displayed on CCS "stdout" window only one time.

   Digital values corresponding to the button voltage will vary slightly
   depending on the system clock value. Below are the range of values for
   each button available on the C5505/C5515 EVM key pad.

    No button pushed: 0x3fb - 0x3ff
    SHIFT:    0x230 - 0x238
    STOP:     0x0
    RWD:      0x20f - 0x216
    MENU:     0x367 - 0x374
    DN:       0x2bc - 0x2c6
    SEL/PLAY: 0x1d3 - 0x1d8
    UP:       0x24f - 0x258
    REC:      0xd5  - 0xd8
    FWD:      0x163 - 0x167
    MODE:     0x30b - 0x316

   

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:

TEST RESULT:

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

SAR EXAMPLE3 - INTERRUPT MODE TEST

TEST DESCRIPTION:

This test verifies the functionality of CSL SAR(Successive Approximation Register) in interrupt mode. SAR module on C5505 DSP is used to convert the voltage generated by the key pad available on the C5505 EVM to digital values. This key pad is having 10 button with each button having a different digital value corresponding to the voltage generated when it is pressed.

During the test C5505 key pad button voltage is read and the converted digital value is displayed in the CCS "stdout" window. This digital value corresponds to the voltage of the button pressed while running the test. SAR module is having six channels to read the data. This test configures channel four for reading the button voltage in interrupt mode. CSL INTC module should be configured and SAR ISR should registered before starting the SAR data conversion. After successful configuration of the SAR, voltage conversion is started using the CSL API SAR_startConversion(). Digital value of the button voltage is read in the ISR for 40 times and is displayed in the CCS "stdout" window. After reading 40 digital values SAR data conversion is stopped and CSL SAR module will be closed.

   Digital values corresponding to the button voltage will vary slightly
   depending on the system clock value. Below are the range of values for
   each button available on the C5505 EVM key pad.

    No button pushed: 0x3fb - 0x3ff
    SHIFT:    0x230 - 0x238
    STOP:     0x0
    RWD:      0x20f - 0x216
    MENU:     0x367 - 0x374
    DN:       0x2bc - 0x2c6
    SEL/PLAY: 0x1d3 - 0x1d8
    UP:       0x24f - 0x258
    REC:      0xd5  - 0xd8
    FWD:      0x163 - 0x167
    MODE:     0x30b - 0x316

   

NOTE: TEST SHOULD NOT BE RUN BY SINGLE STEPPING AFTER ENABLING THE SAR INTERRUPTS. DOING SO WILL LEAD TO IMPROPER HANDLING OF THE INTERRUPTS AND TEST FAILURE.

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:

TEST RESULT: