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.

DCP for the connection between TMS320C6416T and ADS1256EVM

Other Parts Discussed in Thread: ADS1256

Hi,
   I applied DCP to generate the source code driver for the connection. When I ran the program, I found out my program always be blocked by TTIDCSTATUS WaitDrdy(TADS1256 *pADS). It is on the line 1909 of t1256_ob.c. It is the function call from the dc_configure() in my main.c.

   The possible one is I didn't follow the action in the page 15 of the SLAA210A, Getting Started with Data Converter Plug-in. I can not find the prototype of the ISR. If it is not the reason, what causes my program blocked.  

  Assume I find out the prototype of the ISR in the t1256_fn.h, where i should put the name of the ISR?

Chun-ming (Tony)   

  • Tony,

    Sorry, there is a mistake in the SLAA210A getting started guide. The prototype for the ISR is given in the tidc_api.h file and reads

    interrupt void DCPDISP_dispatchEdmaIsr(void);

    So in the .cdb file, you need to set this function for the HWI_INT8 (i.e. set it to _DCPDISP_dispatchEdmaIsr  , note the leading underscore).

    But, this should not get the program to hang in the WaitDrdy() function. If this is the case, please check that you selected the correct interrupt number for the DRDY\  line in the GUI. It must match the physical connection. If it does not match, the code will never catch the changing edge of the signal and wait there forever.

    Regards,

    Richard

  • Hi TI,

       After reconfigure my board, my program is still be blocked by the TTIDCSTATUS WaitDrdy(TADS1256 *pADS). It is the function call from the dc_configure() in my main.c.

       I am wondering What else I should do in addition to configuring DCP generator and modify the .cdb file by adding _DCPDISP_dispatchEdmaIsr? I mean, do I need to add any function to configure the External Interrupt #5 for ADC board or configure the timer?

       I wanna upload my project file to any TI engineers. Could any one give me your email, tonylou.tw@gmail.com.Hope TI engineers can take a look on my program and test it. This simple program directly copied from the DCP tutorials is supposed to work.

       Thanks for your help.

    Following is the hardware setting and DCP software setting.   
     
    --- DCP Software Setting
    Default Setting except one: I choose Intertupt as Ext Int 5.
    Because the DC_INTb (5-6k) ---(Pin 48)--- DC_EINT5 (6416T)

    --- Hardware Setting on the ADC board

    Top position on the 5-6K Interface Board, which means connection with J16.

    S1 ( AIN0-1 Input Select Switch ) -  Middle position of the switch, which makes AIN0 connected to +2.5V and AIN1 connected to Ground.
    S2 ( AIN2-3 Input Select Switch ) -  Middle position of the switch, which makes AIN2 connected to +2.5V and AIN3 connected to Ground.
    S3 ( Reference Input Select ) - Up position of the switch, which makes VRP connected to +2.5V and VRN connected to AGND.
    S5 ( System Clock Select ) - Left position of the switch, which means digital power supply is onboard 7.68MHz crystal.
    J4 - default setting - Short the pin #1 and the pin #2. Short the pin #3 and the pin #4.
    J6 - SYNC'/PWDN' - Short SYNC'/PWDN' with DVDD
    J7 - RESET - Short RESET' with DVDD
    J8 - CS - Short CS with GND
    J9 - default setting - Don't short any pins.
    J10 - default setting - Short the pin #1 and the pin #2. Short the pin #3 and the pin #4. Short the pin #5 and the pin #6.

    Chun-ming (Tony)

  • Tony,

    The settings for the EVM are OK, but the interrupt used is interrupt EINT6. If you look at the schematic, EVM_INTb goes to W9 and has the signal name DC_INTc afterwards, which connects to pin 67 of the J19. Pin 67 is DC_EINT6 on the C6416 DSK.

    I'm going to send you an example project to your e-mail address, which should work for you. Please have a look at the main.c file, as the header describes the correct jumper settings on the 5-6K interface card as well.

     

    Richard

  • Hi Richard,

      I run the program you sended me and follow the hardware setting on the interface board. However, I get the TIDC_ERR_REGS, which is

    /* send and verify the register values                      */
        /* IO register                                              */
        uiParam = ADS1256_REG_IO;
        (void)ADS1256_control(pADS, ADS1256_CMD_WREG, (void *)&uiParam);
        (void)ADS1256_control(pADS, ADS1256_CMD_RREG, (void *)&uiParam);
        if ((uiParam & 0x00F0u) != (pADS->regs.io.value & 0x00F0u))
           return TIDC_ERR_REGS;

    Tony

  • Hi TI,

      I found out that NO CLKX, on the J16 serial digital header, is fed into the SCLK of the ADS1256. (which is SCLK not CLKIN) ,even when I ran the project package Richard send to me and followed all hardware setting in the beginning of the main.c.

       Is there any error in the program generated by the DCP? Such as McBSP setting. Or, My board version is different from yours. ADS1256EVM purchased this month on DigiKey. 5-6K interface for DAP EVM's Rev.B 2004 purchased last year. TMS3206416T DSK 1GHz purchase last year.

       I trace the SCLK from ADC1256EVM back to DSP6416T.

    SCLK on ADC1256.
    CLKX on the J2 serial digital header on ADC1256EVM.
    DC_CLKXb on the J16 of 5-6K interface, also the pin #21 on the J19 of the 5-6K interface.
    DC_CLKX0 on the 6416T, which is connected to the McBSP channel 0.

       No jumper and switch is within the connection path from ADC1256EVM to DSP6416T. It seems no hardware setting mistake happened.

       DCP software code is hard for me to dubug. Could you check the DCP software code for me.

       Thanks.

    Tony

  • Richard and Tony worked this issue out:

     

    Tony,

       Actually, the code you created is what it should be. You only need to wait for the first transfers to complete before you re-configure the channels by inserting a while() statement, otherwise those transfers will not work properly.  I have modified the code below and also attached the modified code as a C-source file, which you can use as a reference. One additional comment: The last while() statement in your program has no semicolon, which is syntactically correct, but renders the statement useless.