Extra partition is getting created while writing data on SD card.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extra partition is getting created while writing data on SD card.

768 Views
rrm_rahul07
Contributor I

Hi All,

My issue is,

While writing data on SD card using FATfs and usdhc module of component library, another partition is  getting created.

I am using MPC5748G DEV-KIT (NXP) board. I have configured freeRtos, FATfs and FlexCan modules for my system.

In task one, System gets data on CAN.

And in second task, I am writing data on SD card.

But after some data write operations, I have observed data is not getting written on SD card.

To check data, When i connected SD card to laptop.And there are two different partitions on SD card.Both the partitions are not accessible. So a File in which data is written also missing.

So please help me to solve this problem.

Thanks,

Rahul

Tags (4)
0 Kudos
1 Reply

666 Views
ToHoangLinh
NXP Employee
NXP Employee

Hi Rahul

First thing: (multiple partitions)

In case of two different partitions, please make sure that you are not using f_disk with multiple partitions. Could you please confirm again?

You can refer the process of writing data on SD card using FreeRTOS task as following:
- f_mount
- createTextFile
f_open
f_write
f_close
- f_unmount

The above steps are working fine with me currently. Note that you can refer to function createTextFile in task_fatfs_f_open_f_write.c. After that you can make your own function to write custom data.

Second thing in your question:

- You said that "After some data write operations", so how do you know it works and not works later without looking into SD card content. Is there any IRQ trigger? I asked it because that might due to FlexCan interrupt issue.

0 Kudos