AnsweredAssumed Answered

trying to RS485 example on k60 tower kit having some issue in fread

Question asked by vallinath s on Dec 8, 2013
Latest reply on Dec 9, 2013 by CHANDRASEKAR KANNIAPPAN

using the rs485 example code

void rs485_read_task

   (

      uint_32 initial_data

   )

{

   MQX_FILE_PTR rs485_dev = NULL;

   char  data_buffer[256];

 

 

   rs485_dev  = fopen( RS485_CHANNEL, NULL );                    

   if( rs485_dev == NULL )

   {

      /* device could not be opened */

      _task_block();

   } 

 

   /* wait for data */

   fread(data_buffer, 1, 18, rs485_dev);

 

   while(1)

   {   

    printf("\n - Buffer_DAta              = %s Hz", &data_buffer);

   };

}

 

 

 

The write task is printing the "RS485 example " in the serial terminal ,so write routine is working sine  , but the read task is not reading the character typed on serial terminal . if anybody has tried this program please support anything to be modified .

Outcomes