<?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>OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82359/ov7670-camera-driver</link><description>Hi, 
 
 I&amp;#39;m having some trouble getting a device pointer for the OV7670 Camera. I&amp;#39;ve ported the OV7725 driver. It appears as if the program exits the driver before setting the I2C address: 
 
 drv_data -&amp;gt; i2c = device_get_binding ( DT_INST_BUS_LABEL </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jan 2022 10:14:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82359/ov7670-camera-driver" /><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/348227?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 10:14:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9da9b7cf-d096-4cba-a904-cd25e50ecc9c</guid><dc:creator>sir_hugo</dc:creator><description>&lt;p&gt;Turns out I was missing an external clock for the camera&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/344254?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 07:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ceac3ff7-2b63-4b7d-9cf1-aab362380bfa</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I have reviewed your changes and nothing seems to comeout as the culprit for this behavior.&lt;/p&gt;
&lt;p&gt;if you have &amp;quot;zephyr_library()&amp;quot; in your CMakeLists.txt file, and check if your driver is properly initialized. You can do this by starting your program in the debug mode to see if the driver exits with no errors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/343753?ContentTypeID=1</link><pubDate>Wed, 15 Dec 2021 19:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d2dadc8-ee32-4474-b303-0dfa176863ed</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am sorry, Due to start of holiday season and my travel&amp;nbsp; I could not respond to you meanwhile, I will try to respond to you by Friday.&lt;/p&gt;
&lt;p&gt;Thanks for your patience&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/342549?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 13:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1850423-ce56-4567-992d-c801f2098430</guid><dc:creator>sir_hugo</dc:creator><description>&lt;p&gt;sure&lt;pre class="ui-code" data-mode="json"&gt; &amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	ov7670@43 {
		compatible = &amp;quot;ovti,ov7670&amp;quot;;
		label = &amp;quot;ov7670&amp;quot;;
		reg = &amp;lt;0x43&amp;gt;;
		data-gpios = &amp;lt;&amp;amp;gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;,
			  &amp;lt;&amp;amp;gpio0 10 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;       

		vsync-gpios = &amp;lt; &amp;amp;gpio0 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW) &amp;gt;;

   		hsync-gpios = &amp;lt; &amp;amp;gpio0 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW) &amp;gt;;

   		pclk-gpios = &amp;lt; &amp;amp;gpio0 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW) &amp;gt;;

   		xclk-gpios = &amp;lt; &amp;amp;gpio0 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW) &amp;gt;;
	};
};&lt;/pre&gt;&lt;pre class="ui-code" data-mode="text"&gt;description: OV7670 CMOS video sensor

compatible: &amp;quot;ovti,ov7670&amp;quot;

properties:
    reset-gpios:
      type: phandle-array
      required: false
      description: |
        The RESETn pin is asserted to disable the sensor causing a hard
        reset.  The sensor receives this as an active-low signal.
    
    data-gpios:
      type: phandle-array
      required: false
    
    vsync-gpios:
      type: phandle-array
      required: false
    
    hsync-gpios:
      type: phandle-array
      required: false
    
    pclk-gpios:
      type: phandle-array
      required: false
    
    xclk-gpios:
      type: phandle-array
      required: false

include: i2c-device.yaml&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/342548?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 13:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdaa4084-b1b4-4cfa-ab69-e6df14bd997f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Can you please also attach your dts file so that i get a better picture in how your declared your instances.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/342543?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 12:50:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b1022be-0962-4583-9906-ae67371b6aab</guid><dc:creator>sir_hugo</dc:creator><description>&lt;p&gt;Oh I forgot I was using&amp;nbsp;&lt;span&gt;CONFIG_I2C&lt;/span&gt;&lt;span&gt;=y instead of&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_I2C_0&lt;/span&gt;&lt;span&gt;=y to debug. The runtime error that the main.c is returning dev=null after&amp;nbsp;&amp;nbsp;device_get_binding(&amp;quot;ov7670&amp;quot;)&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;const struct device *dev = device_get_binding(&amp;quot;ov7670&amp;quot;);
if (dev == NULL) {
printk(&amp;quot;Error: Could not get ov7670 device binding\n&amp;quot;);
return 0;
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is the camera init function&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int ov7670_init_0(const struct device *dev)
{
	struct ov7670_data *drv_data = dev-&amp;gt;data;

    
	drv_data-&amp;gt;i2c = device_get_binding(DT_INST_BUS_LABEL(0));
    printk(&amp;quot;HERE!!!!!!! %s !!!!!!!!!!!!\n&amp;quot;,DT_INST_REG_ADDR(0));
	if (drv_data-&amp;gt;i2c == NULL) {
		LOG_ERR(&amp;quot;Failed to get pointer to %s device!&amp;quot;,
			DT_INST_LABEL(0));
		return -EINVAL;
	}
    printk(&amp;quot;HERE!!!!!!!!!!!!!!!!!!!\n&amp;quot;);
    drv_data-&amp;gt;i2c_addr = device_get_binding(DT_INST_REG_ADDR(0));

    
	return ov7670_init(dev);
	
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/342528?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 11:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:568f0680-6cd4-42c6-9e00-4245793fa68a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Yes it seems that your I2C address that you mentioned in the device tree does not seem to be visible to your project. Check if those settings in the board overlay are shielded by some other config settings that you missed to enable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/342494?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 09:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85f0a1b2-a881-47ff-b303-329e4761b04f</guid><dc:creator>sir_hugo</dc:creator><description>&lt;p&gt;I havce a very basic application where I&amp;#39;m trying to get a device pointer to the camera using device_get_binding() but it&amp;#39;s not working. When I try to print out&amp;nbsp;&lt;span&gt;DT_INST_REG_ADDR&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;) I&amp;#39;m getting this error &lt;em&gt;missinglog_strdup().&amp;nbsp;&lt;/em&gt;Does that mean it isn&amp;#39;t picking the I2C address from my board overay?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OV7670 Camera Driver</title><link>https://devzone.nordicsemi.com/thread/342477?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 08:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3a7f09b-08a2-41c4-9993-739aab195716</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;We do not have this camera sensor&amp;nbsp; So it is hard to test anything, but based on your description, it seems like you are missing KConfig settings being enabled.&lt;/p&gt;
&lt;p&gt;What kind of trouble are you seeing? is it a compilation error or other run time errors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>