<?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>nRF5340 - TWIM driver not initialized</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63629/nrf5340---twim-driver-not-initialized</link><description>Hi, 
 I was able to create a device driver support for a DAC, model TI DAC80501Z. In the first place I put the driver in zephyr/drivers/sensors. 
 I works fine. 
 Then I made some effort to move the driver in zephyr/drivers/dac, which seems more appropriate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Jul 2020 08:54:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63629/nrf5340---twim-driver-not-initialized" /><item><title>RE: nRF5340 - TWIM driver not initialized</title><link>https://devzone.nordicsemi.com/thread/261736?ContentTypeID=1</link><pubDate>Mon, 27 Jul 2020 08:54:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3783fc9f-a5ec-449f-aad6-2392a57a613d</guid><dc:creator>Gabriele</dc:creator><description>&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;Hi Simon,&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;from Zephyr Slack channel I got the answer.&lt;br /&gt;They stress out the fact that we have external ADCs in drivers/adc and external GPIOs in drivers/gpio, so we should be able to have external DACs in drivers/dac.&lt;br /&gt;The specific problem was the init priority value of the DAC, which was lower than for I2C and within the same level (POST_KERNEL). I solved using a larger value.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;Best regards,&lt;br /&gt;Gabriele&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 - TWIM driver not initialized</title><link>https://devzone.nordicsemi.com/thread/259570?ContentTypeID=1</link><pubDate>Sat, 11 Jul 2020 22:38:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2280fcbb-e752-4fcc-96be-de9af1fb7d68</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I think&amp;nbsp;&lt;span&gt;DAC80501Z should be under zephyr\drivers\sensor, since it is a separate device not integrated into a microcontroller. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Let me try to explain. The drivers in e.g.&amp;nbsp;&lt;em&gt;ncs\v1.3.0\zephyr\drivers\dac&lt;/em&gt;,&amp;nbsp;&lt;em&gt;ncs\v1.3.0\zephyr\drivers\adc &lt;/em&gt;or&amp;nbsp;&lt;em&gt;ncs\v1.3.0\zephyr\drivers\spi&lt;/em&gt; are linked to soc specific drivers. E.g. for the spi driver spi_nrfx_spim.c:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;ncs\v1.3.0\zephyr\drivers\spi\spi_nrfx_spim.c &lt;/em&gt;→&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;ncs\v1.3.0\modules\hal\nordic\nrfx\drivers\src\nrfx_spim.c&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For your device, this direct linking is not possible, it has to go through three steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;&lt;em&gt;zephyr/drivers/sensors/dac8050&amp;nbsp;&lt;/em&gt;→&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;em&gt;ncs\v1.3.0\zephyr\drivers\spi\spi_nrfx_spim.c&amp;nbsp;&lt;/em&gt;or&amp;nbsp;&lt;em&gt;ncs\v1.3.0\zephyr\drivers\i2c\i2c_nrfx_twim.c&amp;nbsp;→&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;ncs\v1.3.0\modules\hal\nordic\nrfx\drivers\src\nrfx_spim.c &lt;/em&gt;or&amp;nbsp;&lt;em&gt;ncs\v1.3.0\modules\hal\nordic\nrfx\drivers\src\nrfx_twim.c&lt;/em&gt;&lt;span&gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So that&amp;#39;s the reason I think it should be placed in&amp;nbsp;&lt;em&gt;zephyr\drivers\sensor. &lt;/em&gt;I have not looked into your errors, but the placement may be the reason.&lt;/p&gt;
&lt;p&gt;However, I am not 100% sure about this, you could ask &lt;a href="https://lists.zephyrproject.org/g/devel/topics"&gt;here&lt;/a&gt; and get the perspective from some other Zephyr developers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>