Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Sam3x new SD driver

Posted by Neuromancer2701 on November 26, 2012
I have been working with a SAM3X-ek and the new SD card driver that was just released in asf 3.5. The included demo works fine but I am receiving "CMD55 Fail" errors when I try to use the sd card in Free RTOS.(timing error, my thought) None of the Atmel guys have done any testing with FreeRTOS and the sd card driver so I was just wondering if anyone in the FreeRTOS community had tried this?

Thanks,
Seth

RE: Sam3x new SD driver

Posted by Richard on November 26, 2012
Not yet, but it is currently second on the list to do so.

Regards.

RE: Sam3x new SD driver

Posted by Neuromancer2701 on December 5, 2012
I am new to FreeRTOS but is there anyway I can help?
Thanks,
Seth

RE: Sam3x new SD driver

Posted by Neuromancer2701 on December 7, 2012
I have done some testing with getting creating a sd card program from scratch similar to the demo. I figured out all of the various sd/fatfs compiler flags then I moved on to importing FreeRTOS. Once the FreeRTOS_used flag is enabled, f_open fails and throws a 3(FR_NOT_READY) error. If the SD card debug flag is turned on then you can see that CMD 55 is failing. I think this has to do with the Freertos timers that get enabled in the sd card driver once the flag is used but that is the extent of my knowledge/troubleshooting.

Hope that helps.
Seth

RE: Sam3x new SD driver

Posted by Richard on December 8, 2012
On the SAM4X-EK I have been able to use the ASF wizard inside Atmel Studio 6 to create the FreeRTOS peripheral control demo, then use the ASF Wizard to bring in the MMC driver and file system server. I had to uncomment a couple of items in the generated conf_example.h header file (generated by the ASF wizard) to enable the MMC if I recall correctly. After that I was able to successfully read and write to an SD card from a task.

The project will get released eventually, but I am adding a few other things to it first. I think all you need is in the ASF already though. If you are using Atmel Studio 6 then you can use the wizards in the IDE if you have the latest ASF version (the latest version can be downloaded from http://gallery.atmel.com).

Regards.

RE: Sam3x new SD driver

Posted by Neuromancer2701 on December 8, 2012
I think I figured out the issue at least academically. I haven't verified it yet. In the FreeRTOS PC demo, the FREERTOS_USED flag is not defined. So my guess is that is why it works. I am trying to integrate the sd card functionality into the lwip demo and it does have the flag defined. I am going to try to create a demo and modifiy the flag in the sdcard files and see if it works. That might be a temporary solution but at least it will allow me to move on to the next step.

Thanks for the help.
Seth

RE: Sam3x new SD driver

Posted by Neuromancer2701 on December 11, 2012
So I have made positive progress over the weekend. I was able to create a project from scratch with the asf wizard. I added FreeRTOS 7.3 and ported a simplified version of the basic example. I added the sd card/fatfs drivers with the wizard and set the correct flags in the configuration files.

I created a task that detects the sd card, writes a string to the card then reads it back out. I think this is solid progress The next big task I think will be adding ethernet functionality. Is there a plan to add this to the asf wizard in the future?

Thanks,
Seth


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists