Power safe file systems for NuttX

2024-10-18 Thread Matteo Golin
Hello everyone,

Matteo from InSpace again with more questions.

We are currently in the process of selecting some non-volatile memory for our 
telemetry system so that we can log our
flight data while our rocket is in the air. We're having some trouble settling 
on an option because of a few uncommonly
encountered events that happen in our rocket.

Typically our rockets hit around Mach 1.8 and they can experience a ton of 
vibrations while in the air. To circumvent
any write interruptions, we wanted to use flash memory that can be soldered 
directly to the board. Unfortunately the NOR
flash packages we've found are pretty small in terms of capacity, and it 
appears from our research that NuttX's support
for NAND flash has not been tested on real hardware yet, only simulated NAND 
memory.

The goal was to have some kind of very reliably connected (soldered) non 
volatile memory for in-flight logging, and then
copy all the logs to the SD card upon landing for easy removal and placement 
into a laptop, etc.

We've now found a microSD card slot which locks in the card so that it doesn't 
easily lose connection during vibration
(though still not perfect). I am wondering if it may be possible to just log 
directly to the SD card to avoid having to
consider another type of memory. The SD card is also quite cheap memory.

For this setup, I would want to have two equal partitions on the SD card (which 
would be around 32GB in total
capacity). One partition a FAT file system, and one a power-safe file system. 
The power safe partition would be used for
logging in flight to avoid corruption on power loss/discontinuity, and the FAT 
file system would be copied to upon
landing so that data is easily accessible from a laptop.

I'm not sure if this is possible within NuttX as I'm not familiar with how the 
OS handles SD card/memory partitions. In
addition, I was hoping to use littlefs for the power-safe file system but I am 
not sure that it works with SD devices.
I've found evidence online of some people using it with SD cards, but not sure 
about how that may interact with using it
through NuttX.

If anyone has used littlefs on an SD card, or knows of a different power-safe 
file system we could use (I couldn't find
any in the file system listings) that would be great. Or if there are any 
suggestions for memory options (we're still
investigating) supported by NuttX that could contain at least around 200MB of 
data.

Thank you,
Matteo


signature.asc
Description: PGP signature


Re: Power safe file systems for NuttX

2024-10-18 Thread Tim Hardisty


GigaDevice GD55 NOR flash, up to 4Gbit. I use a 1Gbit variant and am just 
writing the driver for it.

Would expect LittleFS will work on it, and I can try it once driver is working, 
next week hopefully.

> On 18 Oct 2024, at 15:19, Matteo Golin  wrote:
> 
> Hello everyone,
> 
> Matteo from InSpace again with more questions.
> 
> We are currently in the process of selecting some non-volatile memory for our 
> telemetry system so that we can log our
> flight data while our rocket is in the air. We're having some trouble 
> settling on an option because of a few uncommonly
> encountered events that happen in our rocket.
> 
> Typically our rockets hit around Mach 1.8 and they can experience a ton of 
> vibrations while in the air. To circumvent
> any write interruptions, we wanted to use flash memory that can be soldered 
> directly to the board. Unfortunately the NOR
> flash packages we've found are pretty small in terms of capacity, and it 
> appears from our research that NuttX's support
> for NAND flash has not been tested on real hardware yet, only simulated NAND 
> memory.
> 
> The goal was to have some kind of very reliably connected (soldered) non 
> volatile memory for in-flight logging, and then
> copy all the logs to the SD card upon landing for easy removal and placement 
> into a laptop, etc.
> 
> We've now found a microSD card slot which locks in the card so that it 
> doesn't easily lose connection during vibration
> (though still not perfect). I am wondering if it may be possible to just log 
> directly to the SD card to avoid having to
> consider another type of memory. The SD card is also quite cheap memory.
> 
> For this setup, I would want to have two equal partitions on the SD card 
> (which would be around 32GB in total
> capacity). One partition a FAT file system, and one a power-safe file system. 
> The power safe partition would be used for
> logging in flight to avoid corruption on power loss/discontinuity, and the 
> FAT file system would be copied to upon
> landing so that data is easily accessible from a laptop.
> 
> I'm not sure if this is possible within NuttX as I'm not familiar with how 
> the OS handles SD card/memory partitions. In
> addition, I was hoping to use littlefs for the power-safe file system but I 
> am not sure that it works with SD devices.
> I've found evidence online of some people using it with SD cards, but not 
> sure about how that may interact with using it
> through NuttX.
> 
> If anyone has used littlefs on an SD card, or knows of a different power-safe 
> file system we could use (I couldn't find
> any in the file system listings) that would be great. Or if there are any 
> suggestions for memory options (we're still
> investigating) supported by NuttX that could contain at least around 200MB of 
> data.
> 
> Thank you,
> Matteo
> 


eMMC Support in NuttX

2024-10-18 Thread Angus Jull
Hey everyone,

This is my first email to this forum in case you haven’t seen my name
before - I work with Matteo on CUInspace and we’re just sorting out the
choice of non-volatile storage for the rocket.

I was trying to figure out if eMMC 4.5/5.1 is supported by NuttX. In
particular I was interested in the STM32H743 which has SDMMC ports that
support SDIO/eMMC and use them in basically the same way, seemingly just
with a difference in some configuration. That chip is marked as having
support for the SDMMC peripheral in NuttX so that makes me think it should
just work as is. I'm pretty new to SD and eMMCs and mostly new to NuttX as
well so I thought I would double check my understanding.

Something that's confused me is the note in the "OS Components" -> "Device
Drivers" docs about MMCSD that says that only SDIO/MCI and SPI are
supported, though there's clearly been support for eMMCs in old PRs and
multiple boards. From my understanding, SDIO & the SD card protocols are
distinct from the eMMC protocol which makes me wonder if there’s
intricacies in integrating an eMMC chip. If anyone knows more about how
eMMCs fit into this driver I would be really interested in learning more.

Best wishes,

Angus