Home arrow Support arrow Forums

Luminary Micro Forums

wella

Platinum Boarder

2008/11/19 12:54

fatfs - FreeRTOS help

Hi all,

has anyone played with SD-card and rewrote third-party/fatfs under FreeRTOS? "rewrote" I mean use vTaskDelayUntil() instead of while (... timer50), use interrupt for reading/writing, use semaphores to lock simul. access, etc.

Thank you in advance

Martin

login or register to reply

ravaz

Platinum Boarder

2008/11/20 02:26

Re:fatfs - FreeRTOS help

Hi wella,

you can have a look at this post:

http://www.luminarymicro.com/component/option,com_joomlaboard/Itemid,/func,view/catid,5/id,2306/ #2306


Hope can help

Ravaz

Post edited by: ravaz, at: 2008/11/20 08:03

login or register to reply

wella

Platinum Boarder

2008/11/20 04:50

Re:fatfs - FreeRTOS help

Thanks, super.

I will try to update your code to avoid calling SSIDataPut() because inside is a formula
// Wait until there is space.
while(!(HWREG(ulBase + SSI_O_SR) & SSI_SR_TNF))
if you give me a permission.

Martin

login or register to reply

ravaz

Platinum Boarder

2008/11/20 08:02

Re:fatfs - FreeRTOS help

no prob, you can do whatever you want with the code...but if you do something useful please don't forget to share (as you usually do)... ;-)

Post edited by: ravaz, at: 2008/11/20 08:20

login or register to reply

wella

Platinum Boarder

2008/11/21 04:02

Re:fatfs - FreeRTOS help

One hint, mainly for me :)

According to timing diagram in 8962 datasheet, when FreeScale SPO=0, SPH=0, mode is selected

#define SSI_CLK GPIO_PIN_2
#define SSI_TX GPIO_PIN_5
#define SSI_RX GPIO_PIN_4
#define SSI_FSS GPIO_PIN_3

GPIOPinTypeSSI(GPIO_PORTA_BASE, SSI_CLK | SSI_TX | SSI_RX | SSI_FSS);

should be called.

login or register to reply