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.

Compiler/LAUNCHXL-CC3235SF: Project Example Fatsd : fopen problem

Part Number: LAUNCHXL-CC3235SF
Other Parts Discussed in Thread: CC3235SF, SYSCONFIG, BOOSTXL-SHARP128

Tool/software: TI C/C++ Compiler

Hi,

I would like to run the project example fatsd from the sdk on my CC3235SF to write/read on the sd card with my Boostxl-sharp 128 LCD & SD Card Boosterpack. My code stop in the fopen and return a File Null and I don't understand the reason. The SDFatfsopen happens well an return a correct  handle. I checked my assembly and my GPIO are correct. I think it's not a soft problem because I didn't modify the project example so he should be correct even if I checked the differents steps.

I use an SD card 16Go formated to exFat(I tested with Fat32 too). I let the default configure for SD in the sysconfig of the project which is fatfs : enabled and Interface Type : SD Host.

For the hardware, I saw that the SD_DET* pin is not properly connected so I put a resistor of 0Ω like the SD_DET pin which is connected. I know I could use SD_DET but I figured it out after made my assembly with SD_DET* pin.

I will post later my assembly, I can't do it right now but I attache to the post my sysconfig. 

If anyone could help me that would be nice, thanks !

Paul-Emile Perrin

  • Hi Paul-Emile,

    To clarify, does the SDFatFS_open() call work without errors? That function should initialize and mount the SD card, so if there was a hardware issue it would cause an error at SDFatFS_open.

    Where exactly does your code stop in fopen? If you use the debugger to step through the fopen, there should an underlying reason why your code halts or returns an error. Knowing that error would be very helpful for debug.

    Regards,

    Michael

  • Hi Michael,

    SDFatFs_open() work well because he returns a handle but I tested runing the project example without the boosterpack and this function returns too an handle. So he detects the SD card while it's not connected. That means it's obviously an hardware issue. But I connected the GPIO correcly, the jumper are well so I don't understand the reason.

    I keep to checking my assembly but If you have an idea could you tell me thanks !

    Paul-Emile 

  • Hi Paul-Emile,

    Looking a bit closer at the SDFatFS library, it looks like SDFatFs_open() doesn't mount the SD card. So it makes sense that you can get a valid handle even if the physical connections are not correct.

    In addition to verifying the connections and jumpers, I advise you use wires as short as possible when connecting the sharp128 boosterpack to the CC3235 launchpad. Having especially the clock wire be as short as possible is essential to ensure signal integrity.

    Regards,
    Michael

  • Hello,

    Thanks for the answer.

    We tried with the same BoostXL-Sharp128 directly plugged (no wire) on a CC26x2 Launchpad and got the same issue.

    Kind regards.

  • Hi,

    Have you tried your SD card with another device as a sanity check?

    Regards,

    Michael

  • Hi Michel,

    As a matter of fact we realised that the SD Card was not properly formated it was exFat formatted instead of FAT32.

    It solved the issue on the CC26x2 Launchpad but not on the CC3235 Launchpad.

    It took us several days to realise that the wiring given in the project description on TiRex was wrong !

    Regards.

    Frederic

     

  • Hi Frederic,

    I am glad you have resolved your issue. Thank you for coming back and explaining the resolution to your issue.

    Regards,

    Michael