u/Kuba0040

Hello,

I’d like to ask if it’s possible to use an Arduino R4 (Renesas RA4M1 microcontroller) as a mass storage device to receive and show files to an ordinary computer.

A bit of explanation:

I am currently working on a ROM burner project that, necessarily, will both need to receive and send binary data in large chunks (multiple kilobytes at a time, and single-digit megabytes in the worst case) to and from a regular PC.

I envision the workflow with this burner as follows

  1. We send the burner a large chunk of data as big as the ROM is (multiple kilobytes)
  2. The ROM burner sequentially writes this data to the ROM.

When we then go to read the ROM:

  1. We push a button on the project
  2. We receive a sequentially read chunk of data with the ROM’s contents.

The sequential nature of this workflow is crucial here. We never need to see all of the data at once, we work with it on a byte-per-byte basis. That’s how a microcontroller with 32KB of memory can process megabytes worth of data, because it never has to store more than one byte.

The “obvious” solution:

The easiest way to handle communication like this is Serial, however I am not keen on using it. Serial requires specialised software on the PC to work as well as special drivers. For the people I want to build this project for, I’d really like something simpler, more reliable and more friendly.

What everyone universally knows how to do is save and read files from a pen drive.

My idea is then as follows:

When we want to burn a ROM we simply connect the burner to our PC where it appears as an empty mass storage device, we grab our binary file containing what we’d like to burn to the ROM and simply paste it onto the mass storage device.

While the file is “copying” the microcontroller is busy reading it byte after byte and writing this data to the ROM. The speed of the “copying” is equal to how fast the microcontroller can write data to the ROM.

After the file transfer is complete, the mass storage device appears as empty, ready to accept a new file.

When we want to read a ROM, we simply push a button on the burner and soon after a file appears on the mass storage device, we can then copy it to our computer, after which it gets automatically “deleted” and the burner is ready to accept new orders.

I’d like to ask if there are any projects or libraries that have achieved this kind of mass storage functionality. I am not confined to the Arduino IDE as I am using the MCU bare. If you know something that could fit this use case please let me know.

Thank You for your help,

Kuba.

reddit.com
u/Kuba0040 — 11 days ago