Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner