<?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>Legacy (NRF) and NRFX drivers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68066/legacy-nrf-and-nrfx-drivers</link><description>Hi, 
 While going through some of the peripheral examples in &amp;#39;nRF5_SDK_17.0.2&amp;#39;, I found it puzzling to see that 
 
 the legacy (nrf_drv_*) and nrfx_* drivers are simultaneously enabled in the sdk_config.h. 
 In some examples, source files for both type</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Nov 2020 16:16:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68066/legacy-nrf-and-nrfx-drivers" /><item><title>RE: Legacy (NRF) and NRFX drivers</title><link>https://devzone.nordicsemi.com/thread/278839?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 16:16:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2678702-46b0-435d-8a7c-140c22774098</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>[quote user="Jatala"]So, if I enable only NRFX configs in sdk_config.h file (and exclude any mention of legacy configs), then it is sufficient to include only the NRFX source files in my project?[/quote]
&lt;p&gt;Yes, that is correct!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Legacy (NRF) and NRFX drivers</title><link>https://devzone.nordicsemi.com/thread/278834?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 16:01:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6a5af22-6f7e-4d10-9e04-283e4a98387d</guid><dc:creator>Jatala</dc:creator><description>&lt;p&gt;Hi J&amp;oslash;rgen, &lt;/p&gt;
&lt;p&gt;Thanks for the response. It cleared quite some ambiguity. So, if I enable only NRFX configs in sdk_config.h file (and exclude any mention of legacy configs), then it is sufficient to include only the NRFX source files in my project?&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Legacy (NRF) and NRFX drivers</title><link>https://devzone.nordicsemi.com/thread/278802?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 14:10:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b27f9a7-7ecb-4415-bf9d-64edb3eacf71</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]the legacy (nrf_drv_*) and nrfx_* drivers are simultaneously enabled in the sdk_config.h.[/quote]
&lt;p&gt;If the legacy drivers are enabled in the sdk_config.h file, the NRFX configs are overwritten in the file &amp;quot;apply_old_config.h&amp;quot;. I think that the reason for both configs being included is to ease the transition for users wanting to switch to using the NRFX driver APIs directly. Note that the legacy configs needs to be completely removed from the sdk_config.h file if you want to use the NRFX driver, otherwise the configs are still overwritten even it the legacy configs are set to disabled (0).&lt;/p&gt;
[quote user=""]In some examples, source files for both type of drivers are included while in others only one type.[/quote]
&lt;p&gt;The legacy driver APIs are still using the NRFX driver implementations in the bottom layer, most APIs are a simple redirect to the NRFX implementation, while some APIs require special translations/features. If the NRFX source files are not included, the legacy driver APIs will not function correctly.&lt;/p&gt;
[quote user=""]Why it is not sufficient to just include &amp;amp; enabled NRFX components (wherever available) in sdk_config.h file and include only the NRFX source file in a project? If not, is there a guide that describes when both NRFX and&amp;nbsp; NRF drivers and/or source files are needed.[/quote]
&lt;p&gt;Many of the examples and libraries in the SDK still uses the legacy APIs, even if the NRFX driver is available. Migrating all examples and libraries to the nex NRFX APIs would require a lot of work, and in most cases it will not provide any increase in performance. There is a&amp;nbsp;&lt;a title="Migration guide for nrfx drivers" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/nrfx_migration_user_guide.html?cp=7_1_2_7"&gt;Migration guide for nrfx drivers&lt;/a&gt;&amp;nbsp;available in the driver documentation.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>