<?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>nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10</link><description>Hi guys, 
 I try to integrate the flash logger backend . 
 When I run the code I get the following error: 
 &amp;lt;error&amp;gt; nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10. 
 This is the sdk_config section</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 May 2022 12:24:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10" /><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/366720?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 12:24:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf564917-6fdf-4630-8149-c44a32162edf</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In that case, please have a look at the project attached below and see if it&amp;#39;s something you can use. It&amp;#39;s based on some old test code I had and it should be fine for debugging purposes. &lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf5_5F00_sdk1710_5F00_ble_5F00_app_5F00_hrs.zip"&gt;devzone.nordicsemi.com/.../nrf5_5F00_sdk1710_5F00_ble_5F00_app_5F00_hrs.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can use the DKs board buttons to read and delete logs as well as triggering new faults for test:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1651839763636v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/366533?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 16:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8108eee-54f6-4ec9-84aa-ff0b2ca57826</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Hi Vidar and thank you for your time.&lt;/p&gt;
&lt;p&gt;Well, sometimes my application randomly crashes and I want to store the log error (error code, file and line number) in the flash memory. I could then read the flash page (with nrfjprog) where the error is stored and&amp;nbsp;debug my app&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10/366497#366497"]Have you considered enabling CLI in your project[/quote]
&lt;p&gt;No I didn&amp;#39;t...&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/366497?ContentTypeID=1</link><pubDate>Thu, 05 May 2022 13:42:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:511c4af0-0ce4-46b2-86e9-379114ea550d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you considered enabling CLI in your project? Then you could simply use the &amp;quot;read&amp;quot; command to retrieve the logs over RTT. If not, could you please explain a bit more about how you intend to utilize flash logging in your application? I had a look at the code today, but I could not find a public method to get concatenated log strings so it was not as easy as I had hoped.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/365763?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 12:20:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c07c78c-e4fd-4b58-8584-2fbca33920e0</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I would be nice to have both options over BLE or RTT but if this is a lot of workload, just&amp;nbsp;BLE through a dedicated characteristic would be fine&lt;/p&gt;
&lt;p&gt;Thanks a lot!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/365744?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 11:51:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81b48122-2c98-42cb-a931-7c0474672cd1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Looks like I didn&amp;#39;t finish the example. How do you want the logs to be accessed in your application? Over BLE maybe?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/365469?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 15:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b2d308c-cc00-4b52-8461-e543e7d22ded</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Thank you Vidar,&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10/365393#365393"]But I only see the &amp;quot;addr_is_within_bounds(p_fs, dest, len)&amp;quot; error once on startup if reset the device[/quote]
&lt;p&gt;I stopped receiving this error as soon as I enabled the dynamic log filtering.&amp;nbsp;So let&amp;#39;s assume that this issue has been resolved.&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10/365393#365393"]Please note that the actual text strings are not stored in the logging flash page[/quote]
&lt;p&gt;That&amp;#39;s clear, so the flash page stores just pointers&amp;nbsp;that reference&amp;nbsp;the actual text strings that are stored in a different flash location.&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10/365393#365393"]You were inputting the decimal address as an hex address.[/quote]
&lt;p&gt;I didn&amp;#39;t notice, thanks!!&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/86890/nrf52840-sdk16---nrf_fstorage-addr_is_within_bounds-p_fs-dest-len-check-failed-in-nrf_fstorage_write-with-value-0x10/365393#365393"]To read a log message you need to use the nrf_log_backend_flash_next_entry_get() function[/quote]
&lt;p&gt;I run your &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58111/implement-flashlog-backend/235804#:~:text=I%20have%20tried%20to%20replicate%20this"&gt;example&lt;/a&gt;&amp;nbsp;but I do not see how can I print the string text logs using the&amp;nbsp;&lt;span&gt;&amp;nbsp;nrf_log_backend_flash_next_entry_get()&lt;/span&gt; . Could you please provide an example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/365393?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 11:26:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3993ee76-b340-417e-bba8-1de6a71e2c94</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. But I only see the &amp;quot;addr_is_within_bounds(p_fs, dest, len)&amp;quot; error once on startup if reset the device after the logging page is full, and this does not cause any crash as the returned error is ignored internally in the logger. Is this different from what you are observing?&lt;/p&gt;
[quote user="Nikosant03"]&lt;p&gt;Start address: 368640&lt;/p&gt;
&lt;p&gt;Stop address: 372735&lt;/p&gt;
&lt;p&gt;While the address I read the log is 353472&lt;/p&gt;[/quote]
&lt;p&gt;Please note that the actual text strings are not stored in the logging flash page as I tried to explain in this post: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58111/implement-flashlog-backend/235662#235662"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/58111/implement-flashlog-backend/235662#235662&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To read a log message you need to use the nrf_log_backend_flash_next_entry_get() function. And you also need to run nrf_log_backend_flash_erase() when you need to free space for new log messages.&lt;/p&gt;
[quote user="Nikosant03"]Moreover, the starting address of the flash logger is empty.[/quote]
&lt;p&gt;You were inputting the decimal address as an hex address. I suggest you display the variables in hex instead of decimal:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1651144079488v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/365345?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 08:59:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:324c8dc1-9c1a-46ea-96a0-b596d5b2c4d3</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Thank you &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;I attach the app. I have commented out some functions from the main so that you can run it on a nrf52 dev board. Please exact it in&amp;nbsp;nRF5_SDK_16.0.0\examples\ble_peripheral&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/BLE_5F00_IMU_5F00_v6.3_5F00_modified-for-debugging-by-Nordic.zip"&gt;devzone.nordicsemi.com/.../BLE_5F00_IMU_5F00_v6.3_5F00_modified-for-debugging-by-Nordic.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/364936?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 11:49:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddafe35b-d84c-4988-bcc4-c73e582cc84d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for the delay response. I already looked through detailed information your provided, but I think I will have to actually debug this on my side to understand why it happens. So yes, it would be helpful if you could provide your project as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/364898?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 10:11:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16d80569-1981-4618-b133-23cecf9e2da3</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Any update here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/364040?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 20:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3baf761f-eac3-4b43-bb35-3937294598cf</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Well, I did some tests. To many issues :/&amp;nbsp;do not know where I should start but I will try to be as illustrative as possible.&lt;/p&gt;
&lt;p&gt;First of all if I change the&amp;nbsp;NRF_LOG_DEFAULT_LEVEL to either Error or Warning then I &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;do not&lt;/strong&gt;&lt;/span&gt; get&amp;nbsp;&amp;lt;error&amp;gt; nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t look as a solution to me, also I didn&amp;#39;t see any difference by setting the&amp;nbsp;NRF_LOG_FILTERS_ENABLED&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Issue 1&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have included the following logs (ERROR, WARNING and INFO)&amp;nbsp;just for testing&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void log_init(void) {
  ret_code_t err_code = NRF_LOG_INIT(NULL);
  APP_ERROR_CHECK(err_code);

  NRF_LOG_DEFAULT_BACKENDS_INIT();
  flashlog_init();
  NRF_LOG_ERROR(&amp;quot;Test flash log&amp;quot;);
  NRF_LOG_WARNING(&amp;quot;Test warning flash log&amp;quot;);
  NRF_LOG_INFO(&amp;quot;Test info flash log&amp;quot;);
  NRF_LOG_FLUSH();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I can read some logs, however, they are outside the memory boundaries of the flash logger backend&lt;/p&gt;
&lt;p&gt;Start address: 368640&lt;/p&gt;
&lt;p&gt;Stop address: 372735&lt;/p&gt;
&lt;p&gt;While the address I read the log is 353472&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650483451807v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Issue 2&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Then I disabled the flash log backend and produced a softdevice crash error to be captured by the crash log backend&lt;/p&gt;
&lt;p&gt;This is the error I read from the debug terminal&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650484264832v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;and this is the error I read from the flash memory&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650484303021v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the error log is stored again outside the boundaries and another issue is that missing information from the log such as&amp;nbsp;the file path and the line number where the error occurred.&lt;/p&gt;
&lt;p&gt;Moreover, the starting address of the flash logger is empty.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650484670376v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Issue 3&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I try to forward for example&amp;nbsp;just the WARNING to the backend and I set the NRF_LOG_FILTERS_ENABLED, the info and error logs are still stored in the flash&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650485895714v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Lastly, in case this is useful, this is the sdk_config for nRF_Log&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;h&amp;gt; nRF_Log 

//==========================================================
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_FLASH_ENABLED - nrf_log_backend_flash - Log flash backend
//==========================================================
#ifndef NRF_LOG_BACKEND_FLASH_ENABLED
#define NRF_LOG_BACKEND_FLASH_ENABLED 1
#endif
 
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_FLASHLOG_ENABLED - Enable flashlog backend.
//==========================================================
#ifndef NRF_LOG_BACKEND_FLASHLOG_ENABLED
#define NRF_LOG_BACKEND_FLASHLOG_ENABLED 1
#endif
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_FLASHLOG_QUEUE_SIZE - Logger messages queue size. 
// &amp;lt;i&amp;gt; Queue holds log messages pending to be written to flash.
// &amp;lt;i&amp;gt; Note that the queue holds logger messages and thus the queue size determines
// &amp;lt;i&amp;gt; increasing the pool of logger messages (see log message pool configuration).
 
#ifndef NRF_LOG_BACKEND_FLASHLOG_QUEUE_SIZE
#define NRF_LOG_BACKEND_FLASHLOG_QUEUE_SIZE 8
#endif
 
// &amp;lt;/e&amp;gt;
 
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_CRASHLOG_ENABLED - Enable crashlog backend.
//==========================================================
#ifndef NRF_LOG_BACKEND_CRASHLOG_ENABLED
#define NRF_LOG_BACKEND_CRASHLOG_ENABLED 1
#endif
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_CRASHLOG_FIFO_SIZE - Number of log messages held to be flushed in panic. 
// &amp;lt;i&amp;gt; Crashlog FIFO always keeps a defined number of the most
// &amp;lt;i&amp;gt; recent logs (severity level is set on runtime).
// &amp;lt;i&amp;gt; Note that the FIFO holds logger messages and thus the FIFO size determines
// &amp;lt;i&amp;gt; increasing the pool of logger messages (see log message pool configuration).
 
#ifndef NRF_LOG_BACKEND_CRASHLOG_FIFO_SIZE
#define NRF_LOG_BACKEND_CRASHLOG_FIFO_SIZE 8
#endif
 
// &amp;lt;/e&amp;gt;
 
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_FLASH_SER_BUFFER_SIZE - Size of the buffer used for serialize log message. 
// &amp;lt;i&amp;gt; Message is trimmed if it is longer. It may happen in case of 
// &amp;lt;i&amp;gt; hexdump message. Buffer size must be multiple of 4.
 
#ifndef NRF_LOG_BACKEND_FLASH_SER_BUFFER_SIZE
#define NRF_LOG_BACKEND_FLASH_SER_BUFFER_SIZE 64
#endif
 
// &amp;lt;h&amp;gt; Flash log location - Configuration of flash area used for storing the logs.
 
//==========================================================
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_FLASH_START_PAGE - Starting page.  
// &amp;lt;i&amp;gt; If 0, then pages directly after the application are used.
 
#ifndef NRF_LOG_BACKEND_FLASH_START_PAGE
#define NRF_LOG_BACKEND_FLASH_START_PAGE 0
#endif
 
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_PAGES - Number of pages. 
#ifndef NRF_LOG_BACKEND_PAGES
#define NRF_LOG_BACKEND_PAGES 1
#endif
 
// &amp;lt;/h&amp;gt; 
//==========================================================
// &amp;lt;/e&amp;gt;


//==========================================================
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
//==========================================================
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#endif
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE - Size of buffer for partially processed strings. 
// &amp;lt;i&amp;gt; Size of the buffer is a trade-off between RAM usage and processing.
// &amp;lt;i&amp;gt; if buffer is smaller then strings will often be fragmented.
// &amp;lt;i&amp;gt; It is recommended to use size which will fit typical log and only the
// &amp;lt;i&amp;gt; longer one will be fragmented.

#ifndef NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE
#define NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE 64
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_RTT_TX_RETRY_DELAY_MS - Period before retrying writing to RTT 
#ifndef NRF_LOG_BACKEND_RTT_TX_RETRY_DELAY_MS
#define NRF_LOG_BACKEND_RTT_TX_RETRY_DELAY_MS 1
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_RTT_TX_RETRY_CNT - Writing to RTT retries. 
// &amp;lt;i&amp;gt; If RTT fails to accept any new data after retries
// &amp;lt;i&amp;gt; module assumes that host is not active and on next
// &amp;lt;i&amp;gt; request it will perform only one write attempt.
// &amp;lt;i&amp;gt; On successful writing, module assumes that host is active
// &amp;lt;i&amp;gt; and scheme with retry is applied again.

#ifndef NRF_LOG_BACKEND_RTT_TX_RETRY_CNT
#define NRF_LOG_BACKEND_RTT_TX_RETRY_CNT 3
#endif

// &amp;lt;/e&amp;gt;

// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_UART_ENABLED - nrf_log_backend_uart - Log UART backend
//==========================================================
#ifndef NRF_LOG_BACKEND_UART_ENABLED
#define NRF_LOG_BACKEND_UART_ENABLED 0
#endif
// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_UART_TX_PIN - UART TX pin 
#ifndef NRF_LOG_BACKEND_UART_TX_PIN
#define NRF_LOG_BACKEND_UART_TX_PIN 6
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_UART_BAUDRATE  - Default Baudrate
 
// &amp;lt;323584=&amp;gt; 1200 baud 
// &amp;lt;643072=&amp;gt; 2400 baud 
// &amp;lt;1290240=&amp;gt; 4800 baud 
// &amp;lt;2576384=&amp;gt; 9600 baud 
// &amp;lt;3862528=&amp;gt; 14400 baud 
// &amp;lt;5152768=&amp;gt; 19200 baud 
// &amp;lt;7716864=&amp;gt; 28800 baud 
// &amp;lt;10289152=&amp;gt; 38400 baud 
// &amp;lt;15400960=&amp;gt; 57600 baud 
// &amp;lt;20615168=&amp;gt; 76800 baud 
// &amp;lt;30801920=&amp;gt; 115200 baud 
// &amp;lt;61865984=&amp;gt; 230400 baud 
// &amp;lt;67108864=&amp;gt; 250000 baud 
// &amp;lt;121634816=&amp;gt; 460800 baud 
// &amp;lt;251658240=&amp;gt; 921600 baud 
// &amp;lt;268435456=&amp;gt; 1000000 baud 

#ifndef NRF_LOG_BACKEND_UART_BAUDRATE
#define NRF_LOG_BACKEND_UART_BAUDRATE 30801920
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE - Size of buffer for partially processed strings. 
// &amp;lt;i&amp;gt; Size of the buffer is a trade-off between RAM usage and processing.
// &amp;lt;i&amp;gt; if buffer is smaller then strings will often be fragmented.
// &amp;lt;i&amp;gt; It is recommended to use size which will fit typical log and only the
// &amp;lt;i&amp;gt; longer one will be fragmented.

#ifndef NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE
#define NRF_LOG_BACKEND_UART_TEMP_BUFFER_SIZE 64
#endif

// &amp;lt;/e&amp;gt;

// &amp;lt;e&amp;gt; NRF_LOG_ENABLED - nrf_log - Logger
//==========================================================
#ifndef NRF_LOG_ENABLED
#define NRF_LOG_ENABLED 1
#endif
// &amp;lt;h&amp;gt; Log message pool - Configuration of log message pool

//==========================================================
// &amp;lt;o&amp;gt; NRF_LOG_MSGPOOL_ELEMENT_SIZE - Size of a single element in the pool of memory objects. 
// &amp;lt;i&amp;gt; If a small value is set, then performance of logs processing
// &amp;lt;i&amp;gt; is degraded because data is fragmented. Bigger value impacts
// &amp;lt;i&amp;gt; RAM memory utilization. The size is set to fit a message with
// &amp;lt;i&amp;gt; a timestamp and up to 2 arguments in a single memory object.

#ifndef NRF_LOG_MSGPOOL_ELEMENT_SIZE
#define NRF_LOG_MSGPOOL_ELEMENT_SIZE 20
#endif

// &amp;lt;o&amp;gt; NRF_LOG_MSGPOOL_ELEMENT_COUNT - Number of elements in the pool of memory objects 
// &amp;lt;i&amp;gt; If a small value is set, then it may lead to a deadlock
// &amp;lt;i&amp;gt; in certain cases if backend has high latency and holds
// &amp;lt;i&amp;gt; multiple messages for long time. Bigger value impacts
// &amp;lt;i&amp;gt; RAM memory usage.

#ifndef NRF_LOG_MSGPOOL_ELEMENT_COUNT
#define NRF_LOG_MSGPOOL_ELEMENT_COUNT 8
#endif

// &amp;lt;/h&amp;gt; 
//==========================================================

// &amp;lt;q&amp;gt; NRF_LOG_ALLOW_OVERFLOW  - Configures behavior when circular buffer is full.
 

// &amp;lt;i&amp;gt; If set then oldest logs are overwritten. Otherwise a 
// &amp;lt;i&amp;gt; marker is injected informing about overflow.

#ifndef NRF_LOG_ALLOW_OVERFLOW
#define NRF_LOG_ALLOW_OVERFLOW 1
#endif

// &amp;lt;o&amp;gt; NRF_LOG_BUFSIZE  - Size of the buffer for storing logs (in bytes).
 

// &amp;lt;i&amp;gt; Must be power of 2 and multiple of 4.
// &amp;lt;i&amp;gt; If NRF_LOG_DEFERRED = 0 then buffer size can be reduced to minimum.
// &amp;lt;128=&amp;gt; 128 
// &amp;lt;256=&amp;gt; 256 
// &amp;lt;512=&amp;gt; 512 
// &amp;lt;1024=&amp;gt; 1024 
// &amp;lt;2048=&amp;gt; 2048 
// &amp;lt;4096=&amp;gt; 4096 
// &amp;lt;8192=&amp;gt; 8192 
// &amp;lt;16384=&amp;gt; 16384 

#ifndef NRF_LOG_BUFSIZE
#define NRF_LOG_BUFSIZE 1024
#endif

// &amp;lt;q&amp;gt; NRF_LOG_CLI_CMDS  - Enable CLI commands for the module.
 

#ifndef NRF_LOG_CLI_CMDS
#define NRF_LOG_CLI_CMDS 0
#endif

// &amp;lt;o&amp;gt; NRF_LOG_DEFAULT_LEVEL  - Default Severity level
 
// &amp;lt;0=&amp;gt; Off 
// &amp;lt;1=&amp;gt; Error 
// &amp;lt;2=&amp;gt; Warning 
// &amp;lt;3=&amp;gt; Info 
// &amp;lt;4=&amp;gt; Debug 

#ifndef NRF_LOG_DEFAULT_LEVEL
#define NRF_LOG_DEFAULT_LEVEL 3
#endif

// &amp;lt;q&amp;gt; NRF_LOG_DEFERRED  - Enable deffered logger.
 

// &amp;lt;i&amp;gt; Log data is buffered and can be processed in idle.

#ifndef NRF_LOG_DEFERRED
#define NRF_LOG_DEFERRED 1
#endif

// &amp;lt;q&amp;gt; NRF_LOG_FILTERS_ENABLED  - Enable dynamic filtering of logs.
 

#ifndef NRF_LOG_FILTERS_ENABLED
#define NRF_LOG_FILTERS_ENABLED 1
#endif

// &amp;lt;q&amp;gt; NRF_LOG_NON_DEFFERED_CRITICAL_REGION_ENABLED  - Enable use of critical region for non deffered mode when flushing logs.
 

// &amp;lt;i&amp;gt; When enabled NRF_LOG_FLUSH is called from critical section when non deffered mode is used.
// &amp;lt;i&amp;gt; Log output will never be corrupted as access to the log backend is exclusive
// &amp;lt;i&amp;gt; but system will spend significant amount of time in critical section

#ifndef NRF_LOG_NON_DEFFERED_CRITICAL_REGION_ENABLED
#define NRF_LOG_NON_DEFFERED_CRITICAL_REGION_ENABLED 0
#endif

// &amp;lt;o&amp;gt; NRF_LOG_STR_PUSH_BUFFER_SIZE  - Size of the buffer dedicated for strings stored using @ref NRF_LOG_PUSH.
 
// &amp;lt;16=&amp;gt; 16 
// &amp;lt;32=&amp;gt; 32 
// &amp;lt;64=&amp;gt; 64 
// &amp;lt;128=&amp;gt; 128 
// &amp;lt;256=&amp;gt; 256 
// &amp;lt;512=&amp;gt; 512 
// &amp;lt;1024=&amp;gt; 1024 

#ifndef NRF_LOG_STR_PUSH_BUFFER_SIZE
#define NRF_LOG_STR_PUSH_BUFFER_SIZE 128
#endif

// &amp;lt;o&amp;gt; NRF_LOG_STR_PUSH_BUFFER_SIZE  - Size of the buffer dedicated for strings stored using @ref NRF_LOG_PUSH.
 
// &amp;lt;16=&amp;gt; 16 
// &amp;lt;32=&amp;gt; 32 
// &amp;lt;64=&amp;gt; 64 
// &amp;lt;128=&amp;gt; 128 
// &amp;lt;256=&amp;gt; 256 
// &amp;lt;512=&amp;gt; 512 
// &amp;lt;1024=&amp;gt; 1024 

#ifndef NRF_LOG_STR_PUSH_BUFFER_SIZE
#define NRF_LOG_STR_PUSH_BUFFER_SIZE 128
#endif

// &amp;lt;e&amp;gt; NRF_LOG_USES_COLORS - If enabled then ANSI escape code for colors is prefixed to every string
//==========================================================
#ifndef NRF_LOG_USES_COLORS
#define NRF_LOG_USES_COLORS 0
#endif
// &amp;lt;o&amp;gt; NRF_LOG_COLOR_DEFAULT  - ANSI escape code prefix.
 
// &amp;lt;0=&amp;gt; Default 
// &amp;lt;1=&amp;gt; Black 
// &amp;lt;2=&amp;gt; Red 
// &amp;lt;3=&amp;gt; Green 
// &amp;lt;4=&amp;gt; Yellow 
// &amp;lt;5=&amp;gt; Blue 
// &amp;lt;6=&amp;gt; Magenta 
// &amp;lt;7=&amp;gt; Cyan 
// &amp;lt;8=&amp;gt; White 

#ifndef NRF_LOG_COLOR_DEFAULT
#define NRF_LOG_COLOR_DEFAULT 0
#endif

// &amp;lt;o&amp;gt; NRF_LOG_ERROR_COLOR  - ANSI escape code prefix.
 
// &amp;lt;0=&amp;gt; Default 
// &amp;lt;1=&amp;gt; Black 
// &amp;lt;2=&amp;gt; Red 
// &amp;lt;3=&amp;gt; Green 
// &amp;lt;4=&amp;gt; Yellow 
// &amp;lt;5=&amp;gt; Blue 
// &amp;lt;6=&amp;gt; Magenta 
// &amp;lt;7=&amp;gt; Cyan 
// &amp;lt;8=&amp;gt; White 

#ifndef NRF_LOG_ERROR_COLOR
#define NRF_LOG_ERROR_COLOR 2
#endif

// &amp;lt;o&amp;gt; NRF_LOG_WARNING_COLOR  - ANSI escape code prefix.
 
// &amp;lt;0=&amp;gt; Default 
// &amp;lt;1=&amp;gt; Black 
// &amp;lt;2=&amp;gt; Red 
// &amp;lt;3=&amp;gt; Green 
// &amp;lt;4=&amp;gt; Yellow 
// &amp;lt;5=&amp;gt; Blue 
// &amp;lt;6=&amp;gt; Magenta 
// &amp;lt;7=&amp;gt; Cyan 
// &amp;lt;8=&amp;gt; White 

#ifndef NRF_LOG_WARNING_COLOR
#define NRF_LOG_WARNING_COLOR 4
#endif

// &amp;lt;/e&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I could share my project if you want to debug it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/363749?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 06:47:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28ad786e-f556-43b6-a8aa-be76a92e24be</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. So this is not supposed to happen. The flash backend should stop writing to flash as soon as the flash page is full. Do you get this assertion immediately even if you erase the flash log page first?&lt;/p&gt;
&lt;p&gt;e.g.&lt;/p&gt;
&lt;p&gt;$ nrfjprog --erasepage 0x59000&lt;/p&gt;
&lt;p&gt;Also, have you tried to enable NRF_LOG_FILTERS_ENABLED and increased the NRF_LOG_SEVERITY_* level so the logger does not attempt to write every message to flash as recommended here: &lt;span&gt;&lt;a title="Flash logger backend" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_nrf_log.html?cp=8_1_3_27_5_0#nrf_log_backend_flash"&gt;Flash logger backend&lt;/a&gt;?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/363232?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 16:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:289099ce-0a9b-447d-bfeb-15f8e280fecf</guid><dc:creator>Nikosant03</dc:creator><description>&lt;p&gt;Hi Vidar, thank you for your time.&lt;/p&gt;
&lt;p&gt;This is flash log boundaries (it occupies one page size)&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1649864785543v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;However, it tries to write the address right after the&amp;nbsp;end_addr&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1649865023581v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 SDK16 - nrf_fstorage: addr_is_within_bounds(p_fs, dest, len) check failed in nrf_fstorage_write() with value 0x10.</title><link>https://devzone.nordicsemi.com/thread/363189?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 12:31:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:671b5286-2da0-4737-b953-f298e442d20a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m afraid I do not seeing any obvious problems with your configuration. Are you able to share the project so we can try to debug it here, alternatively, try debug the project to find out what flash address range the logger backend assigns to itself in nrf_log_backend_flash.c::nrf_log_backend_flash_init() and what address it tries to write to when the &lt;strong&gt;NRF_FSTORAGE_PARAM_CHECK&lt;/strong&gt; assert is raised?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>