<?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>Getting an error when using Ztest+Twister on nrf5340dk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126944/getting-an-error-when-using-ztest-twister-on-nrf5340dk</link><description>Hello, I am trying to use twister + ztest to run some basic tests on my device custom project and nrf5340 Here are the contents. Current Directory Structure 
 Contents of map.yml 
 
 Contents of testcase.yaml 
 
 Contents of prj.conf 
 
 Contents of tests</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Feb 2026 14:01:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126944/getting-an-error-when-using-ztest-twister-on-nrf5340dk" /><item><title>RE: Getting an error when using Ztest+Twister on nrf5340dk</title><link>https://devzone.nordicsemi.com/thread/561720?ContentTypeID=1</link><pubDate>Fri, 20 Feb 2026 14:01:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d09f74d-35c9-4dd7-8a9f-4e9c431fb684</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Sorry for the delay, I had to change computer for nrfjprog.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;When you are using 2.7 you can use nrfjprog, it is only depricated in newer version of NCS.&amp;nbsp;&lt;br /&gt;I had no issue running the test over RTT with the following sample.yml&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sample:
  description: random test
  name: hello world ztest
common:
  tags: tests
  integration_platforms:
    - nrf5340dk/nrf5340/cpuapp
  harness: ztest
  harness_config:
    fixture: rtt
tests:
  sample.ztest.simple:
    tags: tests
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It seems strange that you can only enable one peripheral. In general i would presume you would mock it anyway&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting an error when using Ztest+Twister on nrf5340dk</title><link>https://devzone.nordicsemi.com/thread/560894?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2026 10:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2207e63-8c60-4c0e-a210-4dbf3670a21d</guid><dc:creator>Nathan93</dc:creator><description>&lt;p&gt;Hello&lt;br /&gt;&lt;br /&gt;Thanks for the response.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Currently using an older sdk&amp;nbsp;&lt;br /&gt;&lt;br /&gt;NCS SDK = 2.7.0&lt;br /&gt;&lt;br /&gt;Cant use the newer versions/latest version of SDK due to project related constraints.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I tried to remove the runner: nrfjprog but it throws an error : Device Flash Error when I try to run the twister command&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="powershell"&gt;1) sensor_app.basic on nrf5340dk/nrf5340/cpuapp error (Device issue (Flash error?))&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;west twister -p nrf5340dk/nrf5340/cpuapp --device-testing --hardware-map map.yaml -T&amp;#160;&amp;#160;.\sensor_app\tests\ -vv&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Twister Output Snippet with runner=nrfjprog enabled:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
INFO    - The following issues were found (showing the top 10 items):
INFO    - 1) sensor_app.basic on nrf5340dk/nrf5340/cpuapp failed (Timeout)
INFO    -
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;Additional inputs:&lt;/strong&gt;&lt;/span&gt; Currently cannot use uart0 on the device as I am already using SPIM for another part.&amp;nbsp;&lt;br /&gt;I believe we can use only one peripheral at a time.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Only one of the following peripherals can be enabled: SPI0, SPIM0, SPIS0, TWI0, TWIM0, TWIS0,&lt;/em&gt;&lt;br /&gt;&lt;em&gt;UARTE0&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting an error when using Ztest+Twister on nrf5340dk</title><link>https://devzone.nordicsemi.com/thread/560882?ContentTypeID=1</link><pubDate>Wed, 11 Feb 2026 10:07:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:727825be-ea8e-44cc-86da-1a223b6402ab</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi I will look into your case.&amp;nbsp;&lt;br /&gt;What SDK are you using? I did a quick test without&amp;nbsp;using uart to to verify the rest and it worked without any issue. nrfjprog is deprecated and should not be used for newer SDKs&lt;br /&gt;I&amp;nbsp;suspect there might be an issue with it not selecting the correct core when trying to sett up RTT.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>