<?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>Zephyr NVS Sample Not Functioning Properly</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85369/zephyr-nvs-sample-not-functioning-properly</link><description>I am attempting to build and run the Zephyr NVS sample ( https://docs.zephyrproject.org/latest/samples/subsys/nvs/README.html ) on the 52840 using the nRF connect extension for VS code. The build I selected in VS code was nrf52840dk_nrf52840 as this is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Mar 2022 10:00:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85369/zephyr-nvs-sample-not-functioning-properly" /><item><title>RE: Zephyr NVS Sample Not Functioning Properly</title><link>https://devzone.nordicsemi.com/thread/356522?ContentTypeID=1</link><pubDate>Mon, 07 Mar 2022 10:00:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b02b77a-b021-49df-9146-2531332d3f7a</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Good to hear you had progress!&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t believe it&amp;#39;s NVS functionality that is breaking printk for you, as they work fine alongside each other on my DK.&lt;/p&gt;
&lt;p&gt;Have you tested that you&amp;#39;re able to use printk with your custom board at all?&lt;/p&gt;
&lt;p&gt;And I assume you&amp;#39;re sending the log messages through uart, or have you set up something else?&lt;/p&gt;
&lt;p&gt;-Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr NVS Sample Not Functioning Properly</title><link>https://devzone.nordicsemi.com/thread/356402?ContentTypeID=1</link><pubDate>Fri, 04 Mar 2022 17:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d65f2c54-35b0-40f3-b99c-2d6b2ec0dcbb</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;That was the issue it seems to be working normally now thank you!&amp;nbsp; Is there anything specifically that may be causing the issue with printk?&amp;nbsp; I was planning to add NVS functionality to a different project and I fear it will break printk in that project.&amp;nbsp; Is there any drawback of redirecting to logging in that project as well or is there a different fix for the printk issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr NVS Sample Not Functioning Properly</title><link>https://devzone.nordicsemi.com/thread/356349?ContentTypeID=1</link><pubDate>Fri, 04 Mar 2022 14:26:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:876f3b41-a33a-41d3-b017-01c286b614db</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now tested the NVS sample on an nRF52840 DK, and everything worked as it should, which points to the problem having to do with porting the sample to your board.&lt;/p&gt;
&lt;p&gt;Looking at the timestamps in your log there though, it looks like your board is in fact rebooting for each iteration like it&amp;#39;s supposed to, and the timestamps look very similar to what I&amp;#39;m seeing from my DK.&lt;/p&gt;
&lt;p&gt;Perhaps the sample is working as it&amp;#39;s supposed to except for the printk calls?&lt;/p&gt;
&lt;p&gt;You could try to redirect printk to the logging system. Try to add these lines to prj.conf:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_LOG_PRINTK&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_LOG_PROCESS_THREAD_STACK_SIZE&lt;/span&gt;&lt;span&gt;=2048&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_LOG_BUFFER_SIZE&lt;/span&gt;&lt;span&gt;=32768&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;CONFIG_LOG_STRDUP_BUF_COUNT&lt;/span&gt;&lt;span&gt;=256&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;And this to main.c:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;logging/log.h&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LOG_MODULE_NAME&lt;/span&gt;&lt;span&gt; app&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;LOG_MODULE_REGISTER&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;LOG_MODULE_NAME&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Then see if you get more info printed through the log.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Einar&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr NVS Sample Not Functioning Properly</title><link>https://devzone.nordicsemi.com/thread/356137?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2022 17:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f0c33fe-9410-4143-a1a2-1d07aa2d728c</guid><dc:creator>jake11212</dc:creator><description>&lt;p&gt;I am using an overlay file to remap the pins I need and things are programming successfully so I think the build is working fine.&amp;nbsp; The sample was originally built for the&amp;nbsp;&lt;span&gt;nrf51dk_nrf51422 board in the sample so I assume that the main change would have to be changing the location of the flash memory in the device tree from the 51dk to the 52840dk, but this seems to be handled when choosing the 52840dk_52840 build so I didn&amp;#39;t think I needed to change this.&amp;nbsp; Are there other changes that need to be made?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For example the flash partition is determined by the FLASH_AREA_OFFSET variable at line 40 in main, and this changes based on the devicetree.&amp;nbsp; Since this is handled by the build configuration I assumed I wouldn&amp;#39;t need to make any changes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr NVS Sample Not Functioning Properly</title><link>https://devzone.nordicsemi.com/thread/355973?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2022 09:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2588775d-53e4-4412-a057-2a2a1fbe00f7</guid><dc:creator>Einarh</dc:creator><description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;As I assume your board&amp;#39;s layout is not identical to the nRF52840 DK, you will probably have to define your own board and build for that.&lt;/p&gt;
&lt;p&gt;You can read about how to do that &lt;a href="https://docs.zephyrproject.org/latest/guides/porting/board_porting.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>