AnsweredAssumed Answered

Problem with MQX FFS on Kinetis K70

Question asked by Stephen Chorlton on Mar 25, 2015
Latest reply on Apr 16, 2015 by Marcelo Varanda

Kinetis K70 running MQX 4.1 using NAND flash for file system.

 

Problem occurs occasionally on attempt to write to FLASH.

System locks up because of deadly embrace between Mutex for media buffer manager and associated semaphore for

timeout timer.

 

The following screen captures show the state of the system after the lock up and the sequence that caused the lock

up.

 

Scenario:

NOVt claims Mutex in function media_buffer_aquire() media_buffer_manager.cpp (Cap2)

Timer Task claims semaphore in function timer_task() timer.c (Cap1)

Timer Task is waiting on Mutex in function media_buffer_dispose_temporary() media_buffer_manager.cpp (Cap4)

NOVt waits on semaphore in function timer_cancel() timer.c (Cap3)

 

NOVt is our task which is using MFS and FFS to run a FAT file system for storing non volatile data.

MFS is set with WRITE_THROUGH_CACHE for the FAT and files.

 

NOTE: After discovering this problem I saw the same issue reported in Sharing several issues with NAND FFS in MQX4.1.1

This offers a solution using priority inheritance, but I believe this will not resolve the issue as NOVt task still can not run as the Timer Task still has the semaphore.

 

Are MQX/Freescale aware of this issue and when are they going to provide a solution?

Attachments

Outcomes