AVR32 SD Card Writer Embedded Software

Closed Posted Aug 14, 2010 Paid on delivery
Closed Paid on delivery

We are building an SD Card datastorage system that takes data from an SPI slave port and stores it on an SDCard in a standard PC-readable format. The system is constructed around an Atmel UC3A3256 AVR32 processor. We are using an Atmel EVK1104 board as a development board, and our final design duplicates the 4-bit SD Card interface on that board.

During development, we plan to use the EVK1104 USB Virtual Comm Port as a debug console; our board will use the same comm. Port (USART1 -- TXD/RXD only), but will attach to the PC using a different USB bridge part. The SD card interface on our board matches the“SD/SDIO/MMC 4 BITS?? connector on the EVK1104.

We are using an AVR ONE! emulator and AVR Studio version 2.5.0 for development.?

## Deliverables

**Project Overview**

We are building an SD Card datastorage system that takes data from an SPI slave port and stores it on an SD Card in a standard PC-readable format. The system is constructed around an Atmel UC3A3256 AVR32 processor. We are using an Atmel EVK1104 board as a development board, and our final design duplicates the 4-bit SD Card interface on that board.

During development, we plan to usethe EVK1104 USB Virtual Comm Port as a debug console; our board will use the same comm. Port (USART1 -- TXD/RXD only), but will attach to the PC using a different USB bridge part. The SD card interface on our board matches the“SD/SDIO/MMC 4 BITS?? connector on the EVK1104.

We are using an AVR ONE! emulator and AVR Studio version 2.5.0 for development.?

**Assistance Required**

We have encountered difficulties creating a project from a template using the AVR32 Studio. When we try to customize this to meet our requirements, we encounter repeated compile-time errors. We have successfully built and loaded sample projects, such as the SDMMC sample, but when we make changes to these projects, we encounter compile errors. Also, the SDMMC project has so much USB interface structure built into it that it's very difficult to understand how the SD card interface works. We need assistance in simplifying the project structure and eliminating unused functionality.

? At a minimum, we are looking to create a simplified demonstration project with a main() that calls the necessary initialization code, creates a buffer, then writes it to an SD [url removed, login to view] this is in place, we would like to expand the project to include an SPI slave interface that allows us to receive incoming data (and send out response data). This software would include:

* SD card access on 4 BITS connector

* ? FAT file system support for SD card (functions in file.c)

* ? SPI slave interface that allows us to receive incoming data (and send out response data) -- same pins as "SPIO & Misc extension" except for CS pin

* USART asynchronous port access (usart_putc/usart_getc/usart_tstc) to implement a debug console

The code should ideally be implemented in such a way as to preserve the Atmel code set’s high speed SDCard write capability (e.g., 3-7 Mbytes/second), but, for the initial release,we could tolerate a reduced speed of as little as 0.5 Mbytes/second. We need to support both standard and SDHC Cards, although initially supporting standard cards is sufficient.?

? **Milestones**

The following are only suggested milestones; we are amenable to open to other milestones, so long as they are scheduled in such a way as to demonstrate regular progress:

[url removed, login to view] set that creates a dataset in real time and writes it to an SD Card in PC-readable format. This software should include a simple text-only command interface, and should be capable of displaying an approximate SD Card write speed on the console port. Note: if a large enough file is created, we could instead make a reasonable estimation of the write speed usinga stop-watch.

[url removed, login to view] specification summarizing (a) a minimal command interface that would allow us to get to the point of writing a single filestream over the SPI bus to the card in the shortest possible time, (b) an expanded command set that would include the ability to write multiple filestreams to the SD Card using file handles.

[url removed, login to view] that can receive simple commands over the SPI port to open a file, receive data and close a file. This software should include a simple “watchdog?? function that closes the file if data stops arriving or if an on-board power supervisory circuit indicates the possibility of a power failure. We will provide a board and test bench to create the SPI command and data stream for testing. At a first cut, it may be useful for the contractor to implement this stream using a PC and an asynchronous port.

[url removed, login to view] software that includes SDHC card support (e.g., SD cards >2GByte), if the original software did not already include this support.

[url removed, login to view] software that includes the expanded command set. If the original deliverable has a write speed of less than1MByte/second, getting this sped up as part of this deliverable would be helpful as well.

**Project Timing**

We are interested in getting to milestone #3 quickly, within 2 weeks if possible. We believe that the Atmel AVR32 studio includes almost everything necessary to get to that point.

**SPI Interface to Main Board**

Our SPI interface for commands and data is set up for SPI0 using the following pins:

* MISO PA11

* SPCK? ? PA8

* MOSI? ? PA10

* CS0n PA9? ? (rather than PX33 as on the EVK1104)

**Suggested Contractor Experience**

We believe that the contractor should have some or all of the following experience:

* Familiarity with the Atmel AVR32 Studio software

* Experience with FAT file systems

* Experience with SD Cards

* Experience with SPI Bus operation

* ? Experience working with embedded systems, close to the hardware level

* Contractor should have an oscilloscope or logic analyzer available to them

<!-- -->

Any proposal submitted must indicate with which of these the contractor has experience and should summarize projects in which the contractor has gained or used this experience.

**Required in Proposal**

* Summary of Contractor Experience.

* Notes detailing any differences in approach or scope between the proposal and this document

* Milestone Timing and Costs.

? **Supplied by Us**

* Evaluation Board and, if required, Emulator

* When required: board that creates SPI command and data stream.

Assembly C Programming Electronics Engineering Linux Project Management Software Architecture Software Testing UNIX

Project ID: #3649635

About the project

Remote project Active Aug 28, 2010