<?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>Driver vs HAL</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66603/driver-vs-hal</link><description>I am budding Embedded Engineer, currently, I would like to learn how to program nrf52dk. While I am exploring info center, Peripheral examples I have noticed that most of the peripherals has two section: 
 1. Driver. 
 2. HAL. 
 My questions are the following</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 03 Oct 2020 09:27:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66603/driver-vs-hal" /><item><title>RE: Driver vs HAL</title><link>https://devzone.nordicsemi.com/thread/272824?ContentTypeID=1</link><pubDate>Sat, 03 Oct 2020 09:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:396a0702-cfc8-49e8-a3f0-41aa6a3e2a5f</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Yes, you&amp;#39;re correct.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I suggest you study the&amp;nbsp;&lt;a title="RTC driver" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__rtc.html?cp=7_1_6_8_0_29_1"&gt;RTC driver&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a title="RTC HAL" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrf__rtc__hal.html?cp=7_1_6_8_0_29_2"&gt;RTC HAL&lt;/a&gt;&amp;nbsp;API documentation and their code implementation, and compare the two abstraction layers. You should also study the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=4_2_0_24#concept_rvn_vkj_sr"&gt;RTC — Real-time counter&lt;/a&gt;&amp;nbsp;chapter of the Product specification, and take particular note of the&amp;nbsp;&lt;a title="  Registers  " href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=4_2_0_24_9#topic"&gt;Registers&lt;/a&gt;&amp;nbsp;description, it will tell you exactly what each bit in a given register does. If you know what each register does, you will understand how the HAL interfaces with the underlying hardware. As many driver functions results in calls to the HAL api, you&amp;#39;ll be able to understand what the driver is actually doing.&lt;br /&gt;Once you&amp;#39;ve understood the connection between the driver, HAL, product specification, and register description of the RTC you will be able to debug any HW peripheral in the SDK much more effectively.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I believe this abstraction model extends to a great number of embedded systems.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driver vs HAL</title><link>https://devzone.nordicsemi.com/thread/272645?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 04:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a00394af-5fea-4ed3-8783-6d862d1d209a</guid><dc:creator>ashokraj</dc:creator><description>&lt;p&gt;so you mean to say the following hierarchy&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1.Driver&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2.HAL&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3.Hardware ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is this how it is existing in nrf52 ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Driver vs HAL</title><link>https://devzone.nordicsemi.com/thread/272602?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2020 15:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d3cf80c-0990-4f8b-b6f6-a0199ea9fdf4</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;The Hardware Abstraction Layer ensures safe register access to a peripheral, but is often limited in features. A driver sits atop the HAL and expand on its feature set.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Whether you want to use the HAL or driver depends on your specific use-case, many drivers ensures reliable operation of the peripherals that might otherwise by tricky to do by writing a driver from scratch.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;My suggestion is to re-design an existing driver to fit your needs, if it does not do so already.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>