bpastorkia
Posts: 2
Joined: Fri Dec 21, 2018 9:16 am

impossible update a file on SD (rpidmx512 fork)

Mon Jan 14, 2019 4:12 pm

Hi all!, first of all sorry for my english

I'm developing an Arjan project called "rpidmx512 - dmxMonitor" (Excellent Job Arjan!!!) , and i want to write a file with the current values on DMX signal.

The problem is that i can't write in the SD card... i can read from any file, but imposible update/write.

i'm working with fast fat 12c library, and all the commands (f_mount, f_open, f_stat, f_write, f_sync and f_close) returns 0 value (FR_OK), but nothing change on the SD card. I read here a lot about this in the forum, but i have nothing clear... and i'm also new to the Bare metal programing.

anyone can help me please?

Thanks a lot!


P.S. i'm using RPi 2B & 3B and Sandisk 16GB SD A1 HCI class 10.

bzt
Posts: 246
Joined: Sat Oct 14, 2017 9:57 pm

Re: impossible update a file on SD (rpidmx512 fork)

Tue Jan 15, 2019 12:56 pm

Hi,

I'm not familiar with the fat 12c library, but the exictance of the f_sync function suggests that all write operations are made in the memory only and you have to call f_sync to flush the modifications to actually write the SD card. (Just a tip.)

Cheers,
bzt

bpastorkia
Posts: 2
Joined: Fri Dec 21, 2018 9:16 am

Re: impossible update a file on SD (rpidmx512 fork)

Tue Jan 15, 2019 3:41 pm

Hi bzt!,

f_sync function makes same as f_close but leave the file opened... and of course i've tried it and does the same... :'(

I think you're right to think that it's working on memory, because the SD card is not working while the system is running.. but i don't know how to continue :'(

any ideas?

thanks again!

Return to “Bare metal, Assembly language”