This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

66AK2G12: FAT File System Status

Part Number: 66AK2G12
Other Parts Discussed in Thread: SYSBIOS

I have been using the FAT file system (FatFS) to run some software validation codes.  I've found some issues and I wonder if anyone on the list knows more about this code.  I'm running on the K2G EVM using CCS 9.3 and PDK 1.0.16.  I'm using the packages that CCS 9.3 chooses and GCC 7.2.1.

My validation code has to read from a command file, read a source file and write a destination file for thousands of iterations.  I've written a small wrapper so that the standard fread functions can be directed to the FAT file system.

I've found that the MMCSD example (MMCSD_FatfsConsole_evmK2G_DMA_armExampleProject) is serviceable, but on the ARM it's prone to errors that hint at unreliable access to the hardware.  I see file names read incorrectly, files fail to open, and occasionally " A hard error occurred in the low level disk".  All of these are very occasional.  I can run through hundreds of files without an error and then suddenly as string of such errors, and then it recovers and continues.  Run again and I do not get the same errors.  I've also run thousands of tests like this on the DSP using the corresponding example.  I have not seen a single failure on the DSP.

I've also tried the USB example, USB_HostMsc_evmK2G_armExampleProject.  While I am able to run basic tests using this, it persistently throws exceptions when I include my test codes.

Has anyone else had experience with these codes?  Have any insights to share?  Would it help to use the non-DMA code?  

As an aside, I find the "nano" libraries installed via GCC on the ARM to be really annoying.  I need full printf to work via the serial port.  I eventually got it working but I had to gut the nano.specs in the compiler’s directory.  This doesn't seem like standard GCC, and while I find the E2E discussions noting that I have to use the Sys/Bios libraries, I don't find documented the rationale for such a non-standard thing. 

The file system behaves the same either way, but my validation code needs to support more complex printf() constructions like %f.

  • An update:  I disabled DMA and the ARM version is much more stable.  Hence I'm not blocked, but this is a bug report:

    - Using DMA in the ARM SD examples of TI RTOS PDK 1.0.16 results in unreliable access to the medium.  The DSP examples seem OK.

    - The USB example is even worse.  I thought I tried turning off the DMA there with no effect, but I'm not sure.  Doing much complicated file system access causes it to die.

    - The use of standard C libraries on the ARM is confusing with SysBios and a white paper explaining it would go a long way.

  • Hi Chuck,

    Thanks for reporting this issue. We will try to improve these examples in future releases.

    Regards,

    Jianzhong