Reply by kiran_krishna_choudhary November 30, 20032003-11-30
Hi,
I am trying to interface TLV2548 ADC(12 bit 200KSPS, 8 channel)
with C5402 DSK. After some trouble in finding the documents for
adapter card and pin mapping, I completed the hardware integration.
-------
For the SW integration,I started with a working example of
blink_bios project in C:\ti\examples\dsk5402\dsp\. The program works
and it toggles the three LEDS on the board.
Now
I used the data converter plugin to add the files "automatically"
(t254x_ob.c and tidc_api.c and assciated header files )for TLV2548. I defined in blink_b.c
TTIDC pDC;
TTIDCSTATUS tlv2548_status;
long adc_data;

I am using these API functions to configure and read from ADC
tlv2548_status= dc_configure(&pDC);
//dc_configure maps to tlv254x_configure function
adc_data=tlv254x_read(&pDC);

I used a CDB file from C:\ti\examples\dsk5402\dsp\blink_bios. I
placed _tlv254x_isr in the function field of HWI_SINT6.

-------
However I am not able to read any thing correctly.
When the ADC is not connected, tlv2548_status should be -1
indicating that there is no device connected.The fuction is checking
the data convertor object for the null pointer and since I am
passing a pointer ,it is assuming that the device is connected and
tlv2548 is set to 0 even when TLV2544 ADC is not connected.

I am thinking that I am not using the correct defintions for the
void pointer passed to be for dc_configure function. Could you
please let me know how to call these API functions properly?

Thank you for your time.

Regards,
Choudhary

Some relevant parts of TIDC_API.h
/****************************************************************/
/* common DC structure */
/****************************************************************/
typedef struct
{
TTIDCSTATUS (*configure) (void *pDc);
void (*power) (void *pDc, int bDown);
long (*read) (void *pDc);
void (*write) (void *pDc, long lData);
void (*rblock) (void *pDC, void *pData,
unsigned long ulCount, void (*callback) (void *));
void (*wblock) (void *pDC, void *pData,
unsigned long ulCount, void (*callback) (void *));
void* reserved[4];
} TTIDC;
DCPAPI TTIDCSTATUS dc_configure(void *pDC);