<?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>Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115055/read-cpunet-image-firmware-version-from-cpuapp-at-run-time</link><description>Hi, 
 My application is running NCS v2.5.3 on a nRF5340. 
 My project has FOTA via BLE, is running mcuboot, and is a multi-image build. I am trying to verify, from within the normal code operation, that the netcore image of my dfu package is being updated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Oct 2024 13:36:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115055/read-cpunet-image-firmware-version-from-cpuapp-at-run-time" /><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505591?ContentTypeID=1</link><pubDate>Wed, 09 Oct 2024 13:36:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e9843d3-df7a-492a-8d48-6a476c3f8e28</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;I can reproduce the issue with v2.5.3&amp;nbsp;&lt;span&gt;sdk-nrf/test/subsys/pcd on the nrf5340dk. I have reported the problem to the internal. Before the issue is fixed, maybe you can consider enabling&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/config_and_build/bootloaders/bootloader_downgrade_protection.html"&gt;Downgrade protection (nordicsemi.com)&lt;/a&gt;&amp;nbsp;instead of handling it yourself.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505431?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 20:11:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8676736-4dd5-4d2e-a721-4566cccafe69</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;I cloned the sdk-nrf repo and built the test project located at sdk-nrf/test/subsys/pcd for the nrf5340dk. Updating my SDK is not an option as I cannot do that for my final application. I need a solution for v2.5.3.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505429?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 20:04:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:908ac68d-4b16-4528-a4ef-559605b0d6df</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Your prj.conf:10&amp;nbsp;seems different to the sample&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.5.3/tests/subsys/pcd/prj.conf#L10"&gt;v2.5.3/tests/subsys/pcd/prj.conf#L10&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you modify the test sample? If not, try to update SDK via ToolChain Manager:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728417871644v2.png" alt=" " /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505425?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 18:23:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:876e7264-f89b-46a9-a7d8-e3c895b81a7f</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1728411782020v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;See attached issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505424?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 18:20:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70b1d474-0292-4278-a1f5-ca065324e987</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;Amanda: that test does not build in with NCS toolchain &amp;amp; sdk v2.5.3. It is crucial my solution can run on v2.5.3.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505256?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2024 22:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b681bc3b-910a-4962-a441-159934a0050c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;We are using this function in &lt;a title="https://github.com/nrfconnect/sdk-nrf/tree/main/tests/subsys/pcd" href="https://github.com/nrfconnect/sdk-nrf/tree/main/tests/subsys/pcd" rel="noopener noreferrer" target="_blank"&gt;this test&lt;/a&gt;. Can you try this test and see if it works?&lt;/p&gt;
&lt;p&gt;Maybe you can compare the test with your application and see if you could find anything missing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/505222?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2024 15:10:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f4ca00c-3f16-45b4-abe8-d0a2e6400cf9</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;Any other thoughts on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504750?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 18:38:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ff72da7-9c11-40e8-b4c9-734913a19c31</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;It is a uint32_t and that does not help. I had tried changing it to a uint8_t array and that did not help either.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504748?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 18:33:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:815f96d6-8b06-454b-a5c7-b18eb34a1f98</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Could you try to define&amp;nbsp;cpuNetVersion with uint32_t? Does it help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504743?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 17:24:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aff05360-6bfd-407f-95ae-540d4c809b0c</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;The error is coming from ncs/v2.5.3/nrf/subsys/pcd/src/pcd.c lines 193 and 177.&amp;nbsp;These lines are the call to pcd_cmd_write, then a line wihtin that function.&lt;/p&gt;
&lt;p&gt;Here is the code I am using to retrieve the version from within main.&lt;pre class="ui-code" data-mode="text"&gt;	uint32_t cpuNetVersion = 0;

	int error = pcd_network_core_app_version((uint8_t *) &amp;amp;cpuNetVersion, sizeof(cpuNetVersion));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the code within pcd.c that is failing.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1727889844873v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504730?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 15:48:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46ec615b-fa17-4f99-8a2f-9421141f995e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;You can use addr2line to find the code at r14/r15. See &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/topic/exercise-2-11/"&gt;Debugging with addr2line&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you provide the code for&amp;nbsp;r14/lr:&amp;nbsp; 0x000317d7 and&amp;nbsp;r15/pc: 0x00041126, and the snippet of your code?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504578?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 16:17:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bb04621-8cdd-4902-b0bf-0f6ce9f0a07e</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;E: ***** BUS FAULT *****
E:   Precise data bus error
E:   BFAR Address: 0x20000000
E: r0/a1:  0xdca345ea  r1/a2:  0x20000000  r2/a3:  0x00000004
E: r3/a4:  0x00008800 r12/ip:  0x00000001 r14/lr:  0x000317d7
E:  xpsr:  0x29000200
E: Faulting instruction address (r15/pc): 0x00041126
E: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
E: Current thread: 0x20003888 (main)
E: Halting system&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I got the following error when I ran my code. It seems to fail from within the pcd_cmd_write function in pcd.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504572?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 15:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe8ef2ef-1947-4ca2-b748-cdc498bc46e4</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Please provide the&amp;nbsp;log with enabling the following configs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/kconfig/index.html#CONFIG_DEBUG_OPTIMIZATIONS" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;CONFIG_DEBUG_OPTIMIZATIONS&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;– Limits the optimizations done by the compiler to only those that do not impact debugging.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/kconfig/index.html#CONFIG_DEBUG_THREAD_INFO" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;CONFIG_DEBUG_THREAD_INFO&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;– Adds additional information to the thread object so the debugger can discover the threads.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504565?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2024 14:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:059c536f-ea0d-4f6e-849a-4c8e514c4395</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;Hi, Thank you for this. I have tried using this function from within my CPUAPP main (before the while loop). I am hitting a hard fault from within the call. Is there something I could be missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504403?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2024 15:31:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb64d77d-f473-468c-97c9-4e89adf76a51</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would like to correct my answer.&lt;/p&gt;
&lt;p&gt;You can use &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.5.3/include/dfu/pcd.h#L127"&gt;pcd_network_core_app_version()&lt;/a&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&amp;nbsp;for reading the peripheral CPU application version number by enabling CONFIG_PCD_READ_NETCORE_APP_VERSION. Here is the example&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.5.3/modules/mcuboot/hooks/nrf53_hooks.c#L43"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.5.3/modules/mcuboot/hooks/nrf53_hooks.c#L43&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;-Amanda H.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504242?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 21:51:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db82fafb-4b51-41da-9068-2b793469216e</guid><dc:creator>samtday</dc:creator><description>&lt;p&gt;I had seen that post. I currently do not have a way to print from the NetCore application other than enabling RTT (which is only useful while debugging anyway) but when RTT is enabled, it seems to cause the ble to fail to initialize. I assume this has to do with the NetCore handling the soft device.&lt;/p&gt;
&lt;p&gt;We do not want to implement downgrade protection incase we want to revert to a previous version of the application but I do see its value. Is there a way to utilize the versioning used in downgrade protection to be readable via ble, maybe via the DFU BLE Service?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read CPUNET Image Firmware Version from CPUAPP at Run Time</title><link>https://devzone.nordicsemi.com/thread/504182?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 13:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:885941a9-c6e6-4d82-a05c-2f4fe3a5c090</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;I don&amp;#39;t think the&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;span style="text-decoration:line-through;"&gt;cpuapp code can read the version of NetCore, but&lt;/span&gt; you can refer to my example in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/113550/downgrade-protection-works-only-for-the-app_core--image-and-not-for-the-net-core--image/500078"&gt;this post&lt;/a&gt;&amp;nbsp;to get the NetCore version.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>