Problem with FreeRTOS, FatFS on FRDM-K22F

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem with FreeRTOS, FatFS on FRDM-K22F

ソリューションへジャンプ
1,131件の閲覧回数
vishalgirisagar
Contributor II

Hi All,

   I am trying to get a simple data logger up on FRDM-K22F. I am using KDS and Processor components. I have tried to simplify the problem to the best I can. Below are three scenarios.

1. FatFS with SDcard, HW en, Utility, Timeout, CS1, SPIMaster_Ldd, Generic Time Date.
These are the components.

During Fat1Init, SD1_init(), Below function is called.

void SD1_SPI_WRITE(unsigned char write) {
unsigned char dummy;
SD1_DataReceivedFlag = FALSE;
(void)SM1_ReceiveBlock(SM1_DeviceData, &dummy, sizeof(dummy));
(void)SM1_SendBlock(SM1_DeviceData, &write, sizeof(write));
while(!SD1_DataReceivedFlag){}
}

After that, I see the interrupt getting triggered. I have put break point in SM1_Interrupt.

Everything in this scenario works fine. I can write, read to SD card.

2. Adding FreeRTOS component to the existing project.

Interrupt does not get triggered at all.

Everything gets screwed up as soon as I add FreeRTOS component.

3. Remove FreeRTOS component.

ISR is called.

Again Everything starts working.

This is weird. I do not have any clue what is happening. Can someone please please help me?

ラベル(2)
タグ(4)
0 件の賞賛
1 解決策
810件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Interrupts are disabled until you start the operating system. Therefore calling anything like FAT1_Init() which depends on interrupts will not work.

You need to call FAT1_Init from a task context.

I hope this helps,

Erich

元の投稿で解決策を見る

2 返答(返信)
811件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Interrupts are disabled until you start the operating system. Therefore calling anything like FAT1_Init() which depends on interrupts will not work.

You need to call FAT1_Init from a task context.

I hope this helps,

Erich

810件の閲覧回数
vishalgirisagar
Contributor II

Hi Erich,

  Thank you for the answer. Thanks a ton.

0 件の賞賛