Problem in applying configuration data to UART

Status
Not open for further replies.

tkvenki

New Member
Hi all,

I'm using VS2000 on a VS2000TCM-ETH1 module.

I have an issue regarding the UART.
I'm able to open the device successfully, But not able to wrte configuration data to it.

Please find below the procedure I followed to open the device:
------------------------------------------------------------------------
hUART[0]=DCT_DevOpen("uart",DCT_CONST_APP_DIAG_INST,NO_FLAGS);
hUART[0]==NULL?printf("UART not opened")rintf("UART opened");

/*I'm getting the handle value in hUART[0], it means i have successfully opened the device according to the API*/
------------------------------------------------------------------------



Please find my problem below:
------------------------------------------------------------------------
DCT_UARTConfig_t Config_t //definition


/*Now i determine the UART configurations*/
Config_t.i32BaudRate=BAUDRATE;
Config_t.dataBits = DCT_CONST_UART_DATABITS_8;
Config_t.stopBits = DCT_CONST_UART_STOPBITS_1_5;
Config_t.parity = DCT_CONST_UART_PARITY_NONE;


/*I will apply the settings to my UART*/
ret_setConfig = DCT_UARTSetConfig(hUART[INSTANCE(0)],&Config_t); printf("\n THe return value for ret_setConfig is %d", ret_setConfig);

/*Here i'm getting "-1" as return value for ret_setConfig.*/
------------------------------------------------------------------------

Please let me know where i might have gone wrong.
Will there be anything wrong in my software???
Or is it a hardware problem?

Thanking you,
Venkatesh
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…