Notifications
Clear all

Cant flash card for pi 4

35 Posts
9 Users
12 Likes
3,252 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@inq In library SdFat is example SdFormatter that might work.

Screen Shot 2022 08 02 at 13.42.26
Screen Shot 2022 08 02 at 13.43.27

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

@will - Yes, I have those available.

@zander - I have both of those, but I don't see where they'll do a simple wipe to format.  All I see is they put an image on the SD card.

Posted by: @davee

 Sorry I am not following the story, and don't know anything about your project, nor have I checked this out experimentally, so apologies for any rabbit holes or man traps I am accidentally pointing you to...

I've never used an SD card with an MCU before.  I was just helping a member out on his project recording servos.  https://forum.dronebotworkshop.com/motors/revisit-using-sd-cards-with-arduino-record-servo-motor-movements/ and found I needed some help with the SD card aspects.  Apparently the SD has to pre-formatted by something else.  It looks like it has to be either FAT16 or FAT32.  Some verbiage seems to indicated the block size has to be 512 and Windows won't do that even if I a non boot partition on it.  Your picture sounds promising and I'll try downloading rufus.

Thanks all.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6983
 

@inq RaspberryPi Imager, choose OS, scroll to bottom.

Screen Shot 2022 08 02 at 16.12.58

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @zander

@inq RaspberryPi Imager, choose OS, scroll to bottom.

Screen Shot 2022 08 02 at 16.12.58

 

Way to go Ron!  I never would have guessed.

Tried it with a 2GB Micro SD, plugged it into the ESP8266 and got...

Ralph Recorder is recording!
Can store 253550592 samples

Let's see... that equates to recording 49 days strait on @hinobot project.

I can see some serious potential...

An 80 MHz, 32 bit processor with 2GB hard drive about one sq-in in size.  Puts my first PC to shame.

Thanks!

VBR,

Inq

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Ron reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1689
 

Hi @inq,

I am not sure that 'block size' is a very specific concept ... rotating discs have 'sectors' and (traditionally at least) Windows has 'clusters', etc.

A 'sector' is a 'block' of continuous data on a disc, and is the smallest 'group' of data that can read or written. That is a whole physical sector consists of a bit more than 512 bytes, since it has a few bytes at the start to say which sector on the disk it is, and a few more at the end, for checking that the data hasn't been corrupted, etc. But from a user point of view, it is 512 bytes long, as the rest of the bytes are usually managed within the drive.

While physical sectors on rotating discs may well have expanded beyond 512 bytes  a decade or more ago, it looks like Windows probably still thinks they are 512 bytes long. The drive probably hides the difference.

How can we find out Windows view?

e.g https://stackoverflow.com/questions/9465451/how-can-i-determine-the-sector-size-in-windows

And to check, I tried running in a 'Run as Administrator" cmd window the following fsutil command:

C:\Windows\system32>fsutil fsinfo sectorInfo c:
LogicalBytesPerSector : 512
PhysicalBytesPerSectorForAtomicity : 512
PhysicalBytesPerSectorForPerformance : 512
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 512
Device Alignment : Aligned (0x000)
Partition alignment on device : Aligned (0x000)
No Seek Penalty
Trim Supported
Not DAX capable
Not Thinly-Provisioned

C:\Windows\system32>

And this is on Solid State Drive .. SSD ... and NTFS volume

Of course, a 'sector' is fairly meaningless, from a physical point of view on any solid state based drive, although there data will be written and read in some form of blocks, as writing individual bytes would be far too inefficient.

-----------------

So I would be 'gently surprised' ... (but not amazed) if an SD card or USB memory stick was any different with any version of FAT you decide to use.

In short, until you hit a definite 'block size' problem, I would assume any solution you are likely to try, will have 512 byte 'blocks'.

Good luck, Dave


   
Inq reacted
ReplyQuote
Page 3 / 3