AnsweredAssumed Answered

SPI IO_IOCTL_SPI_CLEAR_STATS not working on K60 in MQX4.1

Question asked by Angelo Quattrociocchi on Oct 13, 2014
Latest reply on Oct 31, 2014 by Radek Sestak

I was using the SPI example code with a Flash chip running on both an MCF52254 and K21 device, and they work fine.  For some reason when testing this on a K60 device, there is an error when calling the IO_IOCTL_SPI_CLEAR_STATS command.  This is the part of the code in the SPI example that gives the error.


  /* Clear statistics */
   printf ("Clearing statistics ... ");
   if (SPI_OK == ioctl (spifd, IO_IOCTL_SPI_CLEAR_STATS, NULL))
   {
      printf ("OK\n");
   } else {
      printf ("ERROR\n");
   }


I checked the result of that call and I get a value of 44 (dec).  I'm not sure what this error means.  I was expecting something like (DRIVER_ERROR_BASE | 0x0700 | 0x0n), or 0x0001070n.


Is there some reason I can't clear stats on this device?

Outcomes