AnsweredAssumed Answered

MQX4.1.1 I2C example program ran into problem,need help.

Question asked by Jianwu Tong on Mar 2, 2015
Latest reply on Mar 4, 2015 by Jianwu Tong

Hello everyone,

 

When I use the example program for I2C located in <install_dir>\Freescale\Freescale_MQX_4_1\mqx\examples\i2c,I found the program stop at "result = fwrite (mem, 1, 1, fd);"

The E2PROM type is 24C02.

 

   mem[0] = (uint8_t)addr;
   printf ("  Write to address 0x%02x ... ", mem[0]);
   do 
   {
      result = fwrite (mem, 1, 1, fd);
      printf("\r\n Hello World \r\n");
   } while (result < 1)

 

Need help,thks!

Outcomes