<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84316/flash-fds-hardfault-not-traceable</link><description>I am currently struggling with a problem where Im trying to implement the internal fds module which always leads to hard faults as follows: 
 
 There is probably something wrong in my configuration but I can&amp;#39;t pinpoint where. The example worked okay so</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Apr 2022 09:15:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84316/flash-fds-hardfault-not-traceable" /><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/363272?ContentTypeID=1</link><pubDate>Thu, 14 Apr 2022 09:15:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b861e6-bdef-4331-a7b4-cf47e21021ac</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;bit disappointed with this issue, but will close it now since I don&amp;#39;t get an answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/363183?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 12:18:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bfbaf3c-982a-4fea-9c01-1c73b6ac4ab2</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I might have a clue, could need some confirmation and maybe help on that. After enabling the flash module I later use rtc_enable() in one of my modules. removing this module seems to not carry a hardfault any more but I cant really let that go. So what might be up here?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/363182?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 12:18:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9975f3aa-6833-4931-8b20-61c81db73214</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I might have a clue, could need some confirmation and maybe help on that. After enabling the flash module I later use rtc_enable() in one of my modules. removing this module seems to not carry a hardfault any more but I cant really let that go. So what might be up here?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/363147?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 09:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81964245-0603-4a7b-81a4-1552e3349dbe</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;another question: is there maybe a way to write to flash without IRQs? would rarely write there so I could also poll it at runtime&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/363141?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 09:28:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0ab4636-a8b1-44cf-a9f3-79c8eb4d7a0b</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;what do you think about priorities? Do I need to change smth here and what exactly?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/363121?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 08:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06fb8647-bd73-4ea1-a2d6-37b38095f4e2</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I need to bother you with this again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also tried using the storage example, it throws a hardfault at the same function (event_write) and since I thought this example doesn&amp;#39;t use the softdevice I suppose there is something else wrong. I ran the example on my custom PCB -- this works. How could I find out if my flash segments are wrong? and how can I see if I take too much space on the flash? I need this to work and yeah I got some custom stuff in my project but there must be a way to find out what Im doing wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/354168?ContentTypeID=1</link><pubDate>Mon, 21 Feb 2022 13:53:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98ee8676-0bfe-4668-88ca-f4d095ba5b35</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;yeah, I suppose most include directories are in my solution options not the ones for the project (i.e. they are inherited)&lt;/p&gt;
&lt;p&gt;I will try to do it this way round, although its clear that by this I might just run into different problems.&lt;/p&gt;
&lt;p&gt;What I wanted to know is if you know how the attachment of the fds_evt_handler works exactly. THats where my application seems to crash, it doesn&amp;#39;t go into the handler in the event_send function.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/354113?ContentTypeID=1</link><pubDate>Mon, 21 Feb 2022 11:45:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cad9dae7-5924-490d-a353-50f6c6930a42</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Julius,&lt;/p&gt;
&lt;p&gt;I have looked into it from time to time, but I can&amp;#39;t figure out why it doesn&amp;#39;t work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have tried to look for differences in your project settings and sdk_config.h, but so far with no luck.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see that the project configurations in your project are quite different from what it is in our examples. Perhaps you have done everything yourself? Or did you start with an example from the SDK?&lt;/p&gt;
&lt;p&gt;One example of weird behaving settings is that your include directories shows up like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1645443745094v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But it actually include many more folders. Since this is a bit off, then perhaps there are plenty of other settings not showing correctly as well, for all I know.&lt;/p&gt;
&lt;p&gt;I also tested by adding your flash_tb_radar.c/h into the flash_fds example, and there it runs without any issues. (attached in case you want to test).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/flash_5F00_fds_5F00_test_5F00_cust.zip"&gt;devzone.nordicsemi.com/.../flash_5F00_fds_5F00_test_5F00_cust.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you happen to know why the include directories setting looks like that? Does it do that in your case as well?&lt;/p&gt;
&lt;p&gt;Is there an option to go with the attached sample, and add the rest of your project to that?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/353419?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 14:54:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58d2dad8-0536-4ac8-9ab0-3936285b08cb</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I still havent figured this out (I didn&amp;#39;t focus so much on it but want to get it done asap)&lt;/p&gt;
&lt;p&gt;Did you find out anything? how does the flash placement look? heap and stack sizes shouldn&amp;#39;t interfere here I suppose?&lt;/p&gt;
&lt;p&gt;Best, Julius&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/351765?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 11:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edef0846-3980-4b13-97f6-df8ce2a76175</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Thanks for the answer!!&lt;/p&gt;
&lt;p&gt;I tried the same btw. FYI, I also used my sdk_config h file on the example and this didn&amp;#39;t yield the behavior&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/351640?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 20:43:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43f906b2-926c-4fd7-829e-b71e1ad35fce</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, I was able to look into this on friday, and after modifying the project a bit, (from using printf to NRF_LOG_...(), changing a lot of the absolute paths for your .c files and include folders, are the two main things I remember now), I was able to reproduce the issue. It looks like the FDS is struggling to initialize the flash pages, although I didn&amp;#39;t understand why. It requires some more debugging. I am sorry I didn&amp;#39;t get back to you today, but I have not forgotten this ticket. I need to look deeper into it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I saw that a lot of your project settings vary quite a bit from the normal SDK examples. I am not sure whether this is related to the behavior. And again, I am sorry I don&amp;#39;t have a definitive answer for you at this point in time. I will try to look closer into this tomorrow.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have, however, tried the unmodified flash_fds example, which doesn&amp;#39;t behave the same as your project. I think my approach will be to copy your files into the flash_fds example, and see how it behaves then, to try a different approach, and to eliminate that the project settings may be the issue. Just in case you want to try to debug this as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/351560?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 13:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db1a5836-9590-4c03-a6df-4a41619b65f5</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;were you already able to check this?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Greetings&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/351113?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 13:13:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f55378db-7eb4-4168-8047-2b180413b73f</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/flash_5F00_corrupt_5F00_ex.zip"&gt;devzone.nordicsemi.com/.../flash_5F00_corrupt_5F00_ex.zip&lt;/a&gt;here you go. I literally deleted everything from my main and excluded all of my files except the flash_init part (I also commented out ble_stack_init() in there)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am using 15.3 rn&lt;/p&gt;
&lt;p&gt;Thank you Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/351101?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 12:50:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:713e4ba4-cefa-4685-ae52-b40d8cd3dbbb</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If you are able to reproduce this on a DK now, perhaps you can zip your project and upload it here? You can exclude any potential sensitive information. If the project is a strip down, containing only the bare minimum required to reproduce the issue, without too much of your custom code, that would be the best. Then I can try to reproduce it here in the office.&lt;/p&gt;
&lt;p&gt;What SDK version are you using?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/351015?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 08:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f3d5316-6115-4620-a415-86be2b95dba2</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Its not like I didnt, as I said, there is no other outcome than what I have right now. The event_send is also triggered if I somewhat alter the code and leave out other snippets.&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-2022_2D00_02_2D00_02-at-13.13.59.png" /&gt;&lt;/p&gt;
&lt;p&gt;its an sd_event_IRQHandler that is triggered all of the sudden and probably interfering with anything .&lt;/p&gt;
&lt;p&gt;event_send is one of nordics functions in nrf_storage_sd.c triggered by fstorage_sys_evt_handler and at the beginning its sd_event_IRQHandler&lt;/p&gt;
&lt;p&gt;Also, I tried this again on my DK and it happened there too now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I only init the flash and don&amp;#39;t do anything else, it wont crash, as soon as I use fds_stat or any other action on flash write/read it will show this error.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/350920?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 14:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c8de38e-ca26-46ed-9912-52bc1ee8c589</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Do you use FreeRTOS? Does your application currently use the softdevice? I.e. do you enable the&amp;nbsp;BLE stack from your application?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Either way, I think you need to start debugging. Use breakpoints to see how far your application gets before it hardfaults. If you use the softdevice, you need to set breakpoints, wait for it to hit, and then move the breakpoint and reset the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Start checking around the event_send(). Try to set a breakpoint and see where it is coming from, and what it tries to do. What file is this function implemented in?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/350917?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 14:36:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:104625a2-9710-4619-b3d2-76527d528efc</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I am using a LFXTAL and erased all software as well.&lt;/p&gt;
&lt;p&gt;yeah Im curious whats going on as well. I also used the example on my custom PCB and that works ok. So there must be some weird interaction between board, flash and whatever else in the configuration (I also commented out all of the other modules and the hardfault still occurred)&lt;/p&gt;
&lt;p&gt;fds was indeed the last thing I added and the device works fine without.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/350914?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 14:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aad9b17-afdf-4c77-8894-dceee8339028</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So if you flash the same application to a DK without changing anything the issue doesn&amp;#39;t occur? Have you tried erasing both boards completely before flashing the application? (nrfjprog --eraseall)&lt;/p&gt;
&lt;p&gt;Apart from that I can&amp;#39;t think of anything that would cause a hardfault. One typical thing that causes different behavior is the lack of LFXTAL in some custom boards, but that would typically cause a stall, not a hardfault. Does your custom PCB have an LFXTAL (low frequency xtal?).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Was the FDS the last thing you added? If you comment out your initialization of FDS/fstorage, does the device hardfault?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/350897?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 13:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84d19250-b177-446c-93bb-244c3df2b935</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I am actually not writing anything. Basically I just initialize the flash module and afterwards dont use it (at least for now)&lt;/p&gt;
&lt;p&gt;the fault just happens randomly (an interrupt that is triggered?). Thats why I added the picture, this is all I have, if I set a breakpoint it will lead to the same call stack.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes it happens the first time the firmware goes into this event_send method.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using a DK was a good advice, I couldn&amp;#39;t recreate te problem there, is it something in the board configuration that needs to be handled?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: flash/fds hardfault not traceable</title><link>https://devzone.nordicsemi.com/thread/350895?ContentTypeID=1</link><pubDate>Wed, 02 Feb 2022 13:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fb822bc-e203-4ddf-94a3-4d2eafa1ca79</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It is a bit difficult to say exactly why this is not working. What address are you trying to write to? Or perhaps there is an event handler that isn&amp;#39;t populated properly being called? Is it possible to recreate the issue on a DK? If so, would it be possible to send the project that replicates this so that I can have a look?&lt;/p&gt;
&lt;p&gt;If not, I suggest you start looking into the call stack. What happens at event_send() right before the hardfault? Have you tried setting a breakpoint? Does it happen the first time this function (event_send()) is called, or is it called a couple of times before the error occurs?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>