This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use sw1, sw2 on 5535 ezDSP USB in a BIOS project?

Hi,

There are two switches on 5535 ezDSP USB kit. I want to use these two switches in a small BIOS project. I do not find a direct example using sw1, sw2 from CSL example projects. If you know an example project using sw1, sw2, please give me that information.

Then, I find that there is a project "CSL_GPIO_InputPinExample" from C55XX CSL LP EXAMPLE 3.03. I hope that these GPIO switch project may use sw1 or sw2.

I have modified several lines in c55xx_csl\inc\csl_general.h for 5535 chip.

I compile project: CSL_GPIO_InputPinExample, and load it to 5535 ezDSP. It echos:

C55xx: GEL Output: Configure PLL (100.00 MHz).
C55xx: GEL Output: Wait until TESTLOCKMON is high...
C55xx: GEL Output: After checking TESTLOCKMON bit...
C55xx: GEL Output: PLL Init Done (100.00 MHz).
C55xx: GEL Output: Target Connection Complete.
When I run the GPIO project, it shows:
CSL GPIO Input Pin Test!
 
Make Sure that Pin 1 and 2 of J13 on C5515 EVM or J14 on C5517 EVM are connected with Jumper
 
GPIO_open Successful
Waiting...
GPIO PIN4 is configured as Output Pin
GPIO PIN11 is configured as Input Pin
I check the html doc on this project. It said:
  • Set the PLL frequency to 12.288MHz 

My questions are:

1. This PLL frequency (12.288 MHz) is different from GEL echos: 100 MHz. I have to change the PLL frequency? And if yes, how to change it?

2. There is Jumper J3 on 5535 ezDSP. Is J3 for the GPIO test?

3. I am interested in sw1, sw2 in a BIOS project. Could you tell me how to access sw1, sw2 ? I guess it uses GPIO. Maybe I am wrong about it.

Thanks,

  • Hi,

    We are working on it and we will let you know the update as soon as we can.

    Thanks & regards,

    Sivaraj K

     

  • 1. The test will run fine at both 100MHz and 12.288MHz. You need not switch to 12.288MHz. But if you intend to change the PLL freq, change the gel file accordingly. In the GEL file, change the highlighted function:

    OnTargetConnect()
    {
        GEL_Reset();
        C5517_MapInit();
        ProgramPLL_100MHz_clksel0();  
        GEL_TextOut("Target Connection Complete.\n");
    }

    Add a function, say, ProgramPLL_12_288MHz_clksel0() which will program PLL_M, RD, OD2 and OD to values accordingly as required, which are in turn held in registers 0x1c20, 0x1c21,0x1c23, #defined as PLL_CNTL1,2,4 in the GEL file. OR, you may simply bypass the PLL by programming 0x1c1f(#defined as CLKCFGMSW) and 0x1c22 (#defined as PLL_CNTL3) accordingly.

    2. JP3 is for I2C headers.

    3. You would have to use SAR module, not GPIO, to make use of SW1 and SW2 as both drive it's GPAIN1 analog input. You may visit the SAR examples in c55xx_csl\ccs_v5.0_examples\sar.

    Best Regards.

  • Thanks for the information. I remember that there should be key debouncing function either in hardware or software, but I do not find one in the example code. Could you confirm about key debouncing solution in the example and CAF (USB audio example project)?

  • There is an example code on C5535 eZDSP SW1 and SW2 usage in test codes provided by Spectrum Digital. You can get it here.

    Download the Test Code package under 'eZdsp5535 Software Resources' and check the example 'ezdsp5535_BSL_RevC\ezdsp5535_v1\tests\switch'

    - Pratap.

  • Thanks. I run it, but no key is detected by the program. Please see my post: http://e2e.ti.com/support/dsp/c5000/f/109/p/358407/1258197.aspx#1258197

  • Could you try following the order, testing each led and switch as standalone experiments:

    1) Connect target and Load the test, wait for the test to pause at main()
    2) Press SW1
    3) Then Run the test
    or
    1) Connect target and Load the test, wait for the test to pause at main()
    2) Press SW2
    3) Then Run the test
    or
    1) Connect target and Load the test, wait for the test to pause at main()
    2) Press SW1 and SW2
    3) Then Run the test

    Best Regards.

  • Also, please ignore DS2 for the test. Instead observe DS3-DS6.

    Pressing SW1 should affect DS3.

    SW2 should affect DS6.

    Both SW1&SW2: DS4 and DS5.

    Hope the same helps.

    Best Regards.