<?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>Assertions problem in nrfx driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86603/assertions-problem-in-nrfx-driver</link><description>Hi, 
 I do not understand why assertion is not thrown when nrfx_saadc_init method is called with NULL event handler. For example: 
 err_code = nrf_drv_saadc_init(&amp;amp;default_config, NULL); 
 This just happen in the program with the Softdevice. If I use the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Apr 2022 06:38:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86603/assertions-problem-in-nrfx-driver" /><item><title>RE: Assertions problem in nrfx driver</title><link>https://devzone.nordicsemi.com/thread/361959?ContentTypeID=1</link><pubDate>Wed, 06 Apr 2022 06:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b44cd08-d0f5-4fe5-99bb-82e0306113e0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="control"]Is it possible that some optimization is enabled in the template softdevice project?[/quote]
&lt;p&gt;Maybe. You should debug to see what value is the&amp;nbsp;&lt;span&gt;event_handler there and why it is not NULL.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assertions problem in nrfx driver</title><link>https://devzone.nordicsemi.com/thread/361859?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 13:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2b9a263-145e-4893-9800-b2d21c03c55f</guid><dc:creator>control</dc:creator><description>&lt;p&gt;No. The following assertion is thrown&lt;/p&gt;
&lt;p&gt;NRFX_ASSERT(event_handler)&lt;/p&gt;
&lt;p&gt;As I mentioned, it is expected that this assertion is thrown. I do not understand why it does not happen in another program with softdevice, where I use the same function.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;err_code = nrf_drv_saadc_init(&amp;amp;default_config,&amp;nbsp;&lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Is it possible that some optimization is enabled in the template softdevice project?&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: Assertions problem in nrfx driver</title><link>https://devzone.nordicsemi.com/thread/361853?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 13:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1076574a-d920-4852-9d92-94e02bacc639</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="control"]&amp;nbsp;&amp;lt;error&amp;gt; app: ASSERTION FAILED at C:\Users\Samo\Documents\nRF52_SDK\modules\nrfx\drivers\src\nrfx_saadc.c:215[/quote]
&lt;p&gt;Is it&amp;nbsp;&lt;code&gt;NRFX_ASSERT(p_config);&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;If so, do you check the pin&amp;nbsp;&lt;span&gt;configuration?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assertions problem in nrfx driver</title><link>https://devzone.nordicsemi.com/thread/361841?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 12:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28efa430-df22-4c3e-b726-ec02e945fe6b</guid><dc:creator>control</dc:creator><description>&lt;p&gt;I got this assertion if the software without softdevice is used. This assertion is expected because the event handler is null. I am wondering why I do not get the same assertion in my other program where I have the same code together with softdevice.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;lt;error&amp;gt; app: ASSERTION FAILED at C:\Users\Samo\Documents\nRF52_SDK\modules\nrfx\drivers\src\nrfx_saadc.c:215&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Assertions problem in nrfx driver</title><link>https://devzone.nordicsemi.com/thread/361807?ContentTypeID=1</link><pubDate>Tue, 05 Apr 2022 10:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e93cc486-4869-45f3-bdde-3b0c0da11265</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which SDK are you using? Could you compile with debug mode and provide the debug log?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2275.Segger_5F00_debug-mode.png" /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>