0
\$\begingroup\$

I am facing a problem how to implement parameters management in an embedded software. Parameters management means that I have some subset of variables which values should be persistent but they will be changed time to time by user. These variables are for example compare levels for some protections, time constants of some digital filters or PI controller gains. My control board contains besides MCU also external eMMC memory. The problem is that I have no experiences how to work with the eMMC memory from software point of view. I have spent several hours with looking for some application notes but it wasn't successful. Please can anybody recommend me any resource where I can obtain some basic information how to work with eMMC in software. Thank you for any suggestions.

\$\endgroup\$
1
  • \$\begingroup\$ This is unanswerable without more details of the unidentified system in question. eMMC is most often found in phones, tablets, and single board industrial or entertainment computers built with re-purposed phone/tablet SoC's. What's key about that is that all of these are designed to run operating systems with file system drivers. How you would go about working with the eMMC in that likely case would be very different from how you would go about working with it in the much less likely case that an eMMC is connected to a smaller microcontroller running bare-metal code. \$\endgroup\$ Commented Aug 9, 2018 at 14:06

1 Answer 1

2
\$\begingroup\$

eMMC is basically an SD card packaged as a chip, so all SD card tutorials apply, however you can't use SPI, you need an SDIO controller in your MCU (or bit-banging). I would suggest to look at FatFS or FreeRTOS+FAT.

Keep in mind that (depending on the size of the settings) it may be much easier to just devote one-two flash sectors of the MCU to keep the settings.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ you'll need a dedicated MMC/SD card controller; eMMC afaik doesn't support the (slower but free) SPI communication protocol that SD cards support (aside from the "native" but proprietary SD protocol) Usually, you'd only use an eMMC with a MCU/SoC that has such a controller built in, so you'll have to figure out how to drive that controller, so that your file system can use it to store data. \$\endgroup\$ Commented Aug 9, 2018 at 9:23
  • \$\begingroup\$ Indeed stackoverflow.com/a/34430746/6085739 you need an SDIO controller or bit-banging. \$\endgroup\$
    – filo
    Commented Aug 9, 2018 at 9:29
  • 1
    \$\begingroup\$ yep, but unless you have specialized hardware logic driving those bit-banging GPIO pins, things are going to be sloooooooow. (and that specialized hardware logic would in effect be an SDIO controller) \$\endgroup\$ Commented Aug 9, 2018 at 9:30
  • \$\begingroup\$ Also, not sure there's no timing requirements that would make bit-banging the SDIO interface of an SD/eMMC hard (aside from the licensing problem) \$\endgroup\$ Commented Aug 9, 2018 at 9:31
  • \$\begingroup\$ @filo Thank you for your reaction. Could you recommend me any concrete resource which helped you? \$\endgroup\$
    – Steve
    Commented Aug 9, 2018 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.