<?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>topic Re: Accessing the FLASH causing BUS fault ?? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216906#M3810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have the same issue both on K22 and K24.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Aug 2017 08:19:18 GMT</pubDate>
    <dc:creator>alexx_88</dc:creator>
    <dc:date>2017-08-04T08:19:18Z</dc:date>
    <item>
      <title>Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216897#M3801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using CW 10.1 and Kinetis MK10N512VMD100.&lt;/P&gt;&lt;P&gt;Processor is running at 40MHz and flash is running at 20MHz.&lt;/P&gt;&lt;P&gt;I have written a simple program that will erase and program the flash.&lt;/P&gt;&lt;P&gt;After programming the flash once it has been erased I have reviewed the memory of the programmed flash space using the memory browser and it does contain the written information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have declared in the .lfc file not to include the area of the flash that I am rewriting, so&lt;/P&gt;&lt;P&gt;the linker will not put information there. I have verified in the project map file that indeed the sections&lt;/P&gt;&lt;P&gt;I am erasing are free from data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when trying to access the flash memory to verify its content I have an unhandled interrupt from time to time on specific flash address After checking what might trigger the unhandled interrupt&lt;/P&gt;&lt;P&gt;I was able to narrow the source to one of the following (Interrupt sources 5, 3)&lt;/P&gt;&lt;P&gt;PRECISERR: Precise data bus error&lt;/P&gt;&lt;P&gt;BFARVALID: BusFault&lt;/P&gt;&lt;P&gt;UNDEFINSTR: Undefined instruction UsageFault&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried changing clock rates, to see if this has any affect without success&lt;/P&gt;&lt;P&gt;Am I doing something wrong? Is there a silicon problem with clocking the flash?&lt;/P&gt;&lt;P&gt;See the attached sample program&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Not all the program is listed , only the flash erase section and the relevant include files&lt;/P&gt;&lt;P&gt;#include "PE_Types.h"&lt;BR /&gt;#include "PE_Error.h"&lt;BR /&gt;#include "PE_Const.h"&lt;BR /&gt;#include "IO_Map.h"&lt;BR /&gt;#include "FTFL_PDD.h"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#define FTFL_CMD_WRITE_LONG_WORD 0x06&lt;BR /&gt;#define FTFL_CMD_ERASE_FLASH_SECTOR 0x09&lt;BR /&gt;#define FTFL_CMD_PROGRAM_SECTION 0x0B&lt;BR /&gt;#define SECTOR_SIZE 2048 // 0x800&lt;/P&gt;&lt;P&gt;uint32_t gBadWords;&lt;BR /&gt;uint32_t gTest;&lt;BR /&gt;int8_t&amp;nbsp; FLASH_Erase(uint32_t StartAddress, uint32_t NoSectors)&lt;BR /&gt;{&lt;BR /&gt;// Start Address must be on a Sector boundaries&lt;BR /&gt;&amp;nbsp; uint32_t CurrentSectorStartAddress;&lt;BR /&gt;&amp;nbsp; uint32_t EndAddress,AddressData;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; // Clocking the FTFL module&lt;BR /&gt;&amp;nbsp;SIM_SCGC6 |= 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; while (!(FTFL_FSTAT_REG(FTFL_BASE_PTR) &amp;amp; FTFL_FSTAT_CCIF_MASK)); // Should never happen&lt;BR /&gt;&amp;nbsp; // Clear all error registers - Write 1 will clear them&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FTFL_FSTAT_REG(FTFL_BASE_PTR) = (FTFL_FSTAT_FPVIOL_MASK | FTFL_FSTAT_ACCERR_MASK | FTFL_FSTAT_RDCOLERR_MASK);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; CurrentSectorStartAddress=StartAddress;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; EndAddress=StartAddress+NoSectors*SECTOR_SIZE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; while (NoSectors)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!(FTFL_FSTAT_REG(FTFL_BASE_PTR) &amp;amp; FTFL_FSTAT_CCIF_MASK)); // Wait for previous erase sequence to end&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (FTFL_FSTAT_REG(FTFL_BASE_PTR)&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp; (FTFL_FSTAT_RDCOLERR_MASK | FTFL_FSTAT_ACCERR_MASK | FTFL_FSTAT_FPVIOL_MASK | FTFL_FSTAT_MGSTAT0_MASK )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) return(1); // Error during last cycle&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // See section 28.4.10&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFL_PDD_SetFCCOBCommand(FTFL_BASE_PTR,FTFL_CMD_ERASE_FLASH_SECTOR); // Write Erase Command to FCCOB0 , Can be taken out of the while loop&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFL_PDD_SetFCCOBAddress(FTFL_BASE_PTR,CurrentSectorStartAddress); // Write FCCOB1,FCCOB2,FCC0B3 with the address&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FTFL_PDD_LaunchCommand(FTFL_BASE_PTR); // Just write '1' to CCIF , However this also clears the errors (which we dont' have)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NoSectors--;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentSectorStartAddress+=SECTOR_SIZE;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; } // loop around number of sectors to erase&lt;BR /&gt;// Check that indeed all is erased&lt;BR /&gt;// The next few lines causes bus fault interrupt&lt;BR /&gt;// Using the memroy browser once can see that the memory is erased&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;CurrentSectorStartAddress = StartAddress;&lt;BR /&gt;&amp;nbsp;gBadWords=0;&lt;BR /&gt;&amp;nbsp;while (CurrentSectorStartAddress&amp;lt;EndAddress)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;AddressData = *(uint32_t *)CurrentSectorStartAddress;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if (AddressData != 0xFFFFFFFFUL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;gBadWords++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;CurrentSectorStartAddress+=4;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Un clocking the FTFL module&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SIM_SCGC6 &amp;amp;= (uint32_t) 0xFFFFFFFE;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return(0);&amp;nbsp;&amp;nbsp;&lt;BR /&gt;} // End of FLASH1_Erase&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 01:19:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216897#M3801</guid>
      <dc:creator>kinetis_user</dc:creator>
      <dc:date>2011-06-23T01:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216898#M3802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just posted an eerily similar problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if you are having the same thing but different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In mine the program, long after flash write, goes in and out of an ISR during reading of the flash contents and vectors to never-never land at the address corrresponding to my flash data value (not flash address... the data value stored in the flash).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible yours could be doing the same, but your data value where it vectors could be legal just have a mis-aligned or missing instruction? So you get a bus fault and illegal instruction error instead of a memory instruction access violation like me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Write a handler for the bus fault interrupt (enable it). In the handler put an endless while loop. Set a breakpoint (or if you are IAR which it sounds like you can just tell the debugger to break on a bus fault exception - same result).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the error occurs examine the stack pointer and count up to find the program counter value at the time of the exception. See what code you have running there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a noob on ARM and K60... so I probably can not help much, but I can share what I did to isolate my own still-unresolved problem a little bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 04:12:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216898#M3802</guid>
      <dc:creator>comsosysarch</dc:creator>
      <dc:date>2011-06-29T04:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216899#M3803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should try to disable cache to see if it helps or not:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FMC_PFB0CR &amp;amp;= 0xFFFFFFE0;&lt;/P&gt;&lt;P&gt;FMC_PFB1CR &amp;amp;= 0xFFFFFFE0﻿;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 15:26:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216899#M3803</guid>
      <dc:creator>Dekiru</dc:creator>
      <dc:date>2011-06-29T15:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216900#M3804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That certainly made my problem go away, and that you very much for that... but I'd sure like to know why! (in part because I would like to avoid just dumping flash caching for my whole appplication so I would like to be more "surgical" in disabling what and when)&lt;/P&gt;&lt;P&gt;Is there some issue with flash caching of mixed data and instruction accesses and interrupt handling?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 19:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216900#M3804</guid>
      <dc:creator>comsosysarch</dc:creator>
      <dc:date>2011-06-29T19:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216901#M3805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually paring it down to just the following worked for me so far too...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// disable flash cachingFMC_PFB0CR &amp;amp;= ~FMC_PFB0CR_B0SEBE_MASK;//FMC_PFB0CR &amp;amp;= ~FMC_PFB0CR_B0IPE_MASK;FMC_PFB0CR &amp;amp;= ~FMC_PFB0CR_B0DPE_MASK;//FMC_PFB0CR &amp;amp;= ~FMC_PFB0CR_B0ICE_MASK;FMC_PFB0CR &amp;amp;= ~FMC_PFB0CR_B0DCE_MASK;//FMC_PFB1CR &amp;amp;= ~FMC_PFB1CR_B1SEBE_MASK;//FMC_PFB1CR &amp;amp;= ~FMC_PFB1CR_B1IPE_MASK;//FMC_PFB1CR &amp;amp;= ~FMC_PFB1CR_B1DPE_MASK;//FMC_PFB1CR &amp;amp;= ~FMC_PFB1CR_B1ICE_MASK;//FMC_PFB1CR &amp;amp;= ~FMC_PFB1CR_B1DCE_MASK;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running from flash in bank 0 (lower) and using non-volatile data tables from bank 1 (upper).&lt;/P&gt;&lt;P&gt;I tried just disabling bank 1 instructions and bank 1 instruction prefetch (which should both never happen since I made the linker never put code there) and that did not make my error go away by itself, even when I added to disable the bank 1 single entry buffer as well.&lt;/P&gt;&lt;P&gt;Then I tried just disabling bank 0 data and data prefetch (there should be some of course but not nearly the impact of disabling code cache). This appeared to work for a minute or so (my error otherwise happens almost right away) but eventually gave me a fault (sometimes a usage fault instead of a memory fault - but I expect probably the same root issue). So I also disabled the single entry buffer on bank 0 and this has run for &amp;gt; 15 minutes with no faults.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 20:14:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216901#M3805</guid>
      <dc:creator>comsosysarch</dc:creator>
      <dc:date>2011-06-29T20:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216902#M3806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason of this fault might be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you update flash then execute code from that updated locations without a proper cache invalidation, accessing the area gives old values that is not meaningful then hardware fault happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should check if the cache is invalidated correctly after flash writing (CINV_WAY of FMC_PFBxCR)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 09:23:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216902#M3806</guid>
      <dc:creator>Dekiru</dc:creator>
      <dc:date>2011-06-30T09:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216903#M3807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you !!!!!&lt;/P&gt;&lt;P&gt;Sorry for my late response , I was out of the office for the last two weeks and now that I'm back I saw these posts.&lt;/P&gt;&lt;P&gt;Indeed we had the same problem.&lt;/P&gt;&lt;P&gt;Disabling the cache solved my problem as well.&lt;/P&gt;&lt;P&gt;However I think that Freescalse has a cache issue with the Kinetis.&lt;/P&gt;&lt;P&gt;In both cases , my case and comsosysarch case , we were writing to one bank of the memory while the code was running from a different bank of the flash memory. I think that there is an error in freescale's cache algorithm and by chance the last XX bits in the second bank that I was writing to , were the same for the code that was running from the other flash bank and that caused the problem. (My problem was that I got a hard fault of invalid opcode)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried to access theses FMC registers from the debugger I was unable to do so (I am able to access other registers in the FMC and FTFL modules and other modules as well)&lt;/P&gt;&lt;P&gt;After accessing these registers I got the error message from the debugger : An internal error occurred during: "Update Details Pane Sections". For input string: "1x"&lt;/P&gt;&lt;P&gt;Strange...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway thank you so much for the answer. Now I can keep on working :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 23:04:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216903#M3807</guid>
      <dc:creator>kinetis_user</dc:creator>
      <dc:date>2011-07-20T23:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216904#M3808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And here is the official answer from Freescale.&lt;/P&gt;&lt;P&gt;Downloaded the errata for the K10 chip and found the following (probably the same issue with the K60)&lt;/P&gt;&lt;P&gt;Too bad that non of their engineers were able to point me to that issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;e2644: FMC: Speculation logic is not supported on program flash only or program&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;flash only with swap feature devices.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Errata type:&lt;/STRONG&gt; Errata&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mask Set Errata for Mask 0M33Z, Rev. 13 JUL 2011&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Freescale Semiconductor, Inc. 5&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt; Due to a logic error, speculation logic is not supported on program flash only or program flash&lt;/P&gt;&lt;P&gt;only with swap feature devices. Out of reset the FMC_PFB0CR and FMC_PFB1CR registers&lt;/P&gt;&lt;P&gt;which control the speculation mechanism are configured for full speculation functionality for&lt;/P&gt;&lt;P&gt;both flash banks. Devices with FlexMemory are not affected.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Workaround:&lt;/STRONG&gt; Disable the use of speculation for program flash only and program flash only with swap feature&lt;/P&gt;&lt;P&gt;devices by programming FMC_PFB0CR[2:1] and FMC_PFB1CR[2:1] bits to 2'h0.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;e2647: FMC: Cache aliasing is not supported on 512 KB and 384 KB program flash&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;only devices.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Errata type:&lt;/STRONG&gt; Errata&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt; Due to logic error, cache aliasing is not supported on 512 KB and 384 KB program flash only&lt;/P&gt;&lt;P&gt;devices. Out of reset the FMC_PFB0CR and FMC_PFB1CR registers which control the cache&lt;/P&gt;&lt;P&gt;aliasing mechanism are configured for full cache/page buffer for both flash banks. Devices with&lt;/P&gt;&lt;P&gt;FlexMemory or 128 KB, 192 KB and 256 KB program flash only are not affected.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Workaround:&lt;/STRONG&gt; Disable the use of the cache for 512 KB and 384 KB program flash only devices by&lt;/P&gt;&lt;P&gt;programming FMC_PFB0CR[4:3] and [0] and FMC_PFB1C[4:3] and [0] bits all to 1'b0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 03:19:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216904#M3808</guid>
      <dc:creator>kinetis_user</dc:creator>
      <dc:date>2011-07-21T03:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216905#M3809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can reproduce the bug on K70 maskset 3N96B despite the errata not mentioning it. The workaround is to disable caching (either in LMEM or FMC).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 03:29:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216905#M3809</guid>
      <dc:creator>alipoth</dc:creator>
      <dc:date>2013-06-09T03:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216906#M3810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have the same issue both on K22 and K24.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 08:19:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216906#M3810</guid>
      <dc:creator>alexx_88</dc:creator>
      <dc:date>2017-08-04T08:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the FLASH causing BUS fault ??</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216907#M3811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why you dredged-up this 6-year-old thread, but if you have the SAME issue then the fix is THE SAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, if your problem is caused by doing any flash-write OTHER than 'full phrase, exactly one programming access', then I suggest you look for any of the many threads regarding 'overprogramming' of flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 12:49:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Accessing-the-FLASH-causing-BUS-fault/m-p/216907#M3811</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2017-08-04T12:49:08Z</dc:date>
    </item>
  </channel>
</rss>

