<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Kinetis Software Development KitのトピックRe: FATFS on FRDM-K64F with FreeRTOS</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620613#M6473</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for posting this question Thomas. I ran into this same problem although I'm using a custom board with SDK_2.0_MK24FN1M0xxx12. I've been wrestling with this for a few days now with no success. I'll let you know when I get this figured out and will also&amp;nbsp;keep tabs on this thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Oct 2016 19:23:05 GMT</pubDate>
    <dc:creator>peterfurey</dc:creator>
    <dc:date>2016-10-26T19:23:05Z</dc:date>
    <item>
      <title>FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620608#M6468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Howdy all!&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp;project running FreeRTOS and I've used a customized version of the sdcard_fatfs driver demo&amp;nbsp;on the FRDM-K64F. Both work well independently. I am trying to bring them together, and running into issues I thought I would share with the community. There may be a better way.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started with my FreeRTOS project which is using SDK 2.0 drivers. It is simple and has just three tasks so far including the "Hello World" task that is generated when creating the project. The others blink an LED and perform CAN communications once per second with an external CAN transceiver. It works perfectly on its own.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to write data&amp;nbsp;to the mircoSD card on the FRDM-K64F I imported files from the sdcard_fatfs demo which I had working correctly independently as well. Maybe there is a better way.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, they don't work together. I have traced the problem to the event.c file that is included in the sdcard_fatfs demo. This file is redefining a new SysTick_Handler. Here is what happens.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If I comment out all code in my main.c associate with the fatfs and comment out only the &lt;SPAN&gt;SysTick_Handler in event.c, then everything else works with the FreeRTOS application. &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;If I then uncomment&amp;nbsp;SysTick_Handler each task runs once and stops.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;If I then uncomment the fatfs code, the fatfs code runs, but then FreeRTOS tasks all run just once then stop.&lt;/LI&gt;&lt;LI&gt;If I comment out the&amp;nbsp;&lt;SPAN&gt;SysTick_Handler again, the fatfs code goes into hard fault.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my task now is to rework this so that the fatfs and freeRTOS code are using the same system tick handler. What I don't know yet is where/how to find the sections of code in the fatfs files to change and what to change them to. Perhaps there is another approach that would be better as well. I will post again if I figure it out, but in the mean time, maybe someone has a solution to share with the community. I think I have an idea already, but I'm done writing. So might as well share.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Kinetis Design Studio 3.2.0.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom Olenik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2016 14:16:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620608#M6468</guid>
      <dc:creator>thomasolenik</dc:creator>
      <dc:date>2016-10-09T14:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620609#M6469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update 1. I did confirm the issue is there is something in the fatfs code that is killing the xTickCount.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to edit code in the event.c file to use xTaskGetTickCount() instead of it's own tick counter. That got me to the point where I could create a logging task to write to the sd card. However, after writing to the sd card the first time, the xTickCounter stops updating. I confirmed that data did successfully write to the card once, but something about calling those functions crashes the tick counter or scheduler. When I watch the xTickCount variable in debug, it reads 0 after the crash. The system seems to be in the HardFault_Handler when this happens. If I comment out the section of the logging task that writes to the card, everything runs fine, and the xTickCount variable increments. The only functions called in that section of code are f_printf() and f_sync(). I've confirmed that both execute and return without error, and the data is on the sd card after.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2016 17:36:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620609#M6469</guid>
      <dc:creator>thomasolenik</dc:creator>
      <dc:date>2016-10-09T17:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620610#M6470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update 2. If I open then close the file that I'm writing to on each execution of the logging task, the program runs and the xTickCounter increments, but my CAN communication task does not execute after the first time. I'm now thinking that maybe the fatfs and CAN code are clashing somewhere. Again, if I comment out the function calls to work with the fatfs, the CAN works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2016 19:47:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620610#M6470</guid>
      <dc:creator>thomasolenik</dc:creator>
      <dc:date>2016-10-09T19:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620611#M6471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Out of the box, by default (unless you explicitly override it, which is simple to do), FreeRTOS needs exclusive access to the SysTick peripheral and associated interrupt service routine. &amp;nbsp;If the FatFS code is wanting to just use a tick count, then it is possible to update the FatFS code to use the&amp;nbsp;&lt;A href="http://www.freertos.org/a00021.html#xTaskGetTickCount"&gt;xTaskGetTickCount()&lt;/A&gt;&amp;nbsp;function to get the RTOSs tick value. &amp;nbsp;If the FatFS code wants to perform processing in the SysTick interrupt then it is possible to add this processing into the &lt;A href="http://www.freertos.org/a00016.html"&gt;tick hook function&lt;/A&gt;. &amp;nbsp;What the FatFS code must NOT do is meddle with (start, stop, or change the period of) the SysTick peripheral itself. &amp;nbsp;So look for anywhere that the FatFS code that might be touching the SysTick peripheral (not really a peripheral, but part of the Cortex-M core) and update that as appropriate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2016 02:40:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620611#M6471</guid>
      <dc:creator>FreeRTOS_org</dc:creator>
      <dc:date>2016-10-10T02:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620612#M6472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;I don't know why in your case FatFS would use the SysTick. FatFs as I know it does not depend or use the SysTick. It could be that you use the SysTick as part of the SDK as 'mini scheduler'? As Richard wrote, FreeRTOS should be the one (and only one) using the SysTick (or should us its tick counter, whatever it is, like the LPTMR).&lt;/P&gt;&lt;P&gt;There is one important thing to check: that the interrupt priorities are set correctly, see &lt;A class="link-titled" href="https://mcuoneclipse.com/2016/08/28/arm-cortex-m-interrupts-and-freertos-part-3/" title="https://mcuoneclipse.com/2016/08/28/arm-cortex-m-interrupts-and-freertos-part-3/"&gt;https://mcuoneclipse.com/2016/08/28/arm-cortex-m-interrupts-and-freertos-part-3/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2016 06:12:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620612#M6472</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2016-10-10T06:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620613#M6473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for posting this question Thomas. I ran into this same problem although I'm using a custom board with SDK_2.0_MK24FN1M0xxx12. I've been wrestling with this for a few days now with no success. I'll let you know when I get this figured out and will also&amp;nbsp;keep tabs on this thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 19:23:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620613#M6473</guid>
      <dc:creator>peterfurey</dc:creator>
      <dc:date>2016-10-26T19:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620614#M6474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again, My code appears to work fine after&amp;nbsp;I comment out&amp;nbsp; EVENT_InitTimer() and SysTick_Handler() functions in event.c. The SysTick_Handler() configured through FreeRTOS seems to work&amp;nbsp;fine with my sdcard_fatfs modules (using default FreeRTOSConfig.h). Doubt this gives you any new information but will share my code if you think it might help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2016 20:37:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620614#M6474</guid>
      <dc:creator>peterfurey</dc:creator>
      <dc:date>2016-11-28T20:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620615#M6475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share your code?&amp;nbsp; I am running problems integrating FATFS with FreeRTOS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 21:45:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/620615#M6475</guid>
      <dc:creator>raymondchin</dc:creator>
      <dc:date>2017-12-14T21:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/1368009#M8114</link>
      <description>&lt;P&gt;Hi Thomas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know whether you remember 4 years ago &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt; , but I'm having the same problem.&lt;/P&gt;&lt;P&gt;Could you please tell me how you solved this problem?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 17:33:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/1368009#M8114</guid>
      <dc:creator>MehmetKirgozoglu</dc:creator>
      <dc:date>2021-11-08T17:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: FATFS on FRDM-K64F with FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/1388625#M8120</link>
      <description>&lt;P&gt;The business analyst is one of the most important members of a software development team&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://mlsdev.com/services/mobile-app-development" target="_blank" rel="noopener"&gt;mlsdev.com/services/mobile-app-development&lt;/A&gt;&lt;/SPAN&gt;. This individual is responsible for the technical aspect of a project, such as the underlying architecture of the program. They work closely with the client to determine the requirements and vision of the product. The software architect can be of varying skill levels, and the team will need to be composed of people with diverse backgrounds and skills. The role of the UI designer is to ensure that the final product will be intuitive and user-friendly.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 12:27:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FATFS-on-FRDM-K64F-with-FreeRTOS/m-p/1388625#M8120</guid>
      <dc:creator>mikesores</dc:creator>
      <dc:date>2021-12-24T12:27:51Z</dc:date>
    </item>
  </channel>
</rss>

