SAM3x8e / Embedded design questions - Page 1
Forum section: electronics / general

author: Rerouter
author_rank: Super Contributor
timestamp: June 14, 2017, 12:46:36 pm
content: Hello, currently building my first ARM based project, in this case on an AtmelSAM3x8e, as such i am throwing a number of new to me things in so i can play and learn (this project is purely a learning experience, and hopefully giving me a well made tool once i learn from my mistakes)As such, i am asking for some insight or knowledge for the following.1. I'm hoping to use a 4gbit SPI nand flash as LCD image storage and bulk buffering for logging for the space after that. (low latency provided the blocks are already erased),TC58CVG2S0HRAIG,- I plan to use it like a fifo for the logging, just writing up, until it reaches the end then wrapping back to after the LCD area, so as time goes on i hope to keep wear leveling predictable- my main understanding is ideally i will want my driver to have a bad block table. internally the chip has a bad block flag that can be set per block. so likely read before each write.Does this sound like fair use for a nand flash? ideally i want the device to still function without an SD card installed (i will be using one, but want it optional), the thought being if a bad block is found it marks it, and automatically skips it on write. the logging data rate is ~ 16 - 32KByte / s, and would be running for an hour at most.2. I would like to allow usb mass storage access to these memory's, (SD card via 4 bit SDIO, and NAND),- I imagine the SD card via USB would not be too hard, but could use pointers as to the how.- For the NAND, as the LCD image stuff only needs to be written to by a PC, i was thinking creating a FAT partition for part of the NAND, and ignore the logging area.Am I in the right ballpark, or attacking it the wrong way? I will be likely programming on both these memory's a hundred times during development, and feel programming a nand via the same USB i load the program in on, should make it easier to develop on. for the NAND, can i fake a FAT file system? The image sizes will always be the exact same size (same resolution and bit depth), so i cannot foresee fragmentation issues?3. ESD protection, for the USB i was thinking of using something like thisDM1231-02SOas the usb spec ones on digikey have too high a capacitance for high speed usb, and for an SD card, with the terminals buried away inside a socket, is it something i need to worry about?4. Peripheral power switching, Ideally i would like to depower external peripherals when they are not in use, e.g. the LCD / backlight, an SD card with poor idle power, etc, (lets say 150mA loads), is the common choice to use a Pfet that gets pulled low to enable (this micro resets as input with pullup), or is there some chip solution that is prefered?5. I have been thinking about using buttons on my devices front panel, with thecheap ebay matrix keypads, 1. do they tend to last, and 2. could a sticker be overlaid on top of these style keypads to make a cheap 1 off custom? (or do the bumps make this a nightmare)Thank you for reading this far.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: June 17, 2017, 11:52:45 am
content: You are biting off quite a big chunk to chew on there. You say it's a first ARM project, is it also your first go with NAND, USB mass storage?It seems that NOR Flash would be a simpler option, it seems like it would meet your data requirements easily. Doing NAND properly is quite a chunk of work by itself.USB mass storage is straightforward, I am sure there are examples for that. Note that if you are logging to a FAT partition AND providing access via USB, there are severe synchronisation issues to address, it is generally not advised.I think probably each of your queries warrants a separate post in an appropriate forum. I doubt there is much advice you can get about cheap ebay products, just try using them.

author: Rerouter
author_rank: Super Contributor
timestamp: June 17, 2017, 01:11:22 pm
content: Thank you for replying.Yeah It felt i was diving a bit deeper than i could swim in, but figure it will be a fast way for me to learn these higher level functions.Nor is 4 times the price for 1 quarter of the capacity, but it certainly looks like it would still meet my requirements, has roughly the same write endurance, but is guaranteed all blocks are good out of the factory, so i'll defiantly add the footprint.Glad to hear the mass storage will not be too hard, My plans for the mass storage via USB was that the usb would be the only thing with access for that time period, with the device only having to handle the USB pass through, i suppose the next sub question is will accessing both memories at the same time make my life harder, or is it still within the norm (Multiple LUN's is what the USB spec describes them as)Quite likely true about a post each, I was hunting for ballpark answers as its the old case of what appears easy may not be easy. That and it might have been seen as cross posting if i fired off 5 similar threads within a few minutes.As for the ebay product, I think i have solve my way around it, I was not keen on a $1200 setup fee for a custom print membrane keypad, so was looking for any way around that cost, I've now found a european kit of laser printed labels that accomplishes the same task (Its intended for membrane overlays) for ~$35 posted, As its so cheap, i am going to see about using it directly on SMD dome switches on my front panel.