microSD support in MOD5441X and NANO54415

Discussion to talk about hardware related topics only.
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: microSD support in MOD5441X and NANO54415

Post by Ridgeglider »

My 1st guess was that the format string you're using may include a format specifier parameter that may be inappropriate for the type you're trying to format. However f_getfreespace() just returns and int. Looking at C:\nburn\docs\EFFS\fat_331.pdf the FAT Implementation guide, section 4.18 on page 49 reveals: "Note: if a drive size of greater than 4GB is being used then the high elements of the returned structure should also be read to get the upper 32 bits of each of the numbers i.e pspace.total_high etc" Maybe the NB folks can chime in on how to do this...? Page 50 offers this hint:
F_SPACE.png
F_SPACE.png (20.46 KiB) Viewed 3371 times
joshuaberry
Posts: 8
Joined: Mon Feb 10, 2014 4:53 pm

Re: microSD support in MOD5441X and NANO54415

Post by joshuaberry »

Thanks Ridgeglider, that was exactly what I was looking for, I didn't venture far enough in the docs folder... :S

I ended up needing to use an unsigned long long to compile the space using: (space.total_high << 32) + space.total which worked ok.

cheers for the help!
Post Reply