AnsweredAssumed Answered

Problem with FreeRTOS, FatFS on FRDM-K22F

Question asked by Vishal Girisagar on Jul 31, 2015
Latest reply on Aug 3, 2015 by Vishal Girisagar

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?

Outcomes