<?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>80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94520/80x160-tft-display-with-the-nrf9160-on-spi-and-st7735-driver</link><description>nRF connect SDK v 2.1.1 using visual studio code. 
 Hei A few busy weeks here, however I&amp;#39;ve finally tested some more in regards to previous question found under your guide on the forum: small-i2c-oled-displays-using-nrf-connect-sdk To summarize the problem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Feb 2023 11:55:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94520/80x160-tft-display-with-the-nrf9160-on-spi-and-st7735-driver" /><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/412482?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 11:55:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6b3002b-b2b5-453e-8cb0-2046336e1d55</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hello Brendel,&lt;/p&gt;
&lt;p&gt;Thank you for your question. As this is a new topic, please open a new ticket and post your issue there, and we will reply in the new case. Please refer to the relevant parts of this case and also include which nRF Connect SDK version you are using.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/412032?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 15:11:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71cc8aa9-18a9-4a8b-9bb1-15edc7744c49</guid><dc:creator>Brendel V.</dc:creator><description>&lt;div&gt;
&lt;div&gt;i&amp;#39;m trying to implement st7735s 3pin SPI driver based on existing st7735r driver.&lt;/div&gt;
&lt;div&gt;I used Nrf Connect zephyr/out-of-tree driver example.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Adding custom display driver gives such error:&amp;nbsp;No SOURCES given to Zephyr library: drivers__display on project build stage.&lt;/div&gt;
&lt;div&gt;My project:&lt;/div&gt;
&lt;div&gt;&lt;a href="https://1drv.ms/u/s!AnME8YPmGyyIhKY9lyvfJ7lfmxA6aQ?e=BJPSb0"&gt;https://1drv.ms/u/s!AnME8YPmGyyIhKY9lyvfJ7lfmxA6aQ?e=BJPSb0&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I there a way&amp;nbsp;to enable custom out-of-tree lcd driver working with zephyr lcd API for freestanding application?&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/404368?ContentTypeID=1</link><pubDate>Wed, 11 Jan 2023 14:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50c4ec04-6660-462a-8382-6da4082a3de8</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Would you be able to upload your current project? I could capture the startup sequence with a logic analyzer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/403601?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 13:44:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1c02b3e-2427-4c2d-9951-af9ad6b13152</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Thank you for the update.&lt;/p&gt;
[quote user="Tor Kaufmann"]but the initial code needs to be updated according to its IC to get the best display effect.[/quote][quote user="Tor Kaufmann"]I will most definitely do a logic comparison with the ESP32 board that has the TFT working with the Adafruit library to see if I can spot any difference in the physical signals on the SPI bus.[/quote]
&lt;p&gt;Yes, this will be interesting to see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/403481?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2023 19:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbd90604-3ffd-4f05-b332-d88afb4664bd</guid><dc:creator>Tor Kaufmann</dc:creator><description>&lt;p&gt;&lt;span style="font-family:sans-serif;font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;Hi again Helsing,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The search and debugging in order to get this TFT working with the nrf9160 continues.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have an update from Sitronix,&lt;/p&gt;
&lt;p&gt;Quote:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;... ST7735R is an old IC. It has been EOL and has been replaced by ST7735S for supply.&lt;br /&gt;ST7735R needs to add capacitor parts on the FPC side, while ST7735S does not. &lt;br /&gt;Both commands are compatible, but the initial code needs to be updated according to its IC to get the best display effect.&amp;quot;&lt;/p&gt;
&lt;p&gt;End quote.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So the ST7735R driver &amp;quot;should&amp;quot; be able to work with the newer S-version.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will most definitely do a logic comparison with the ESP32 board that has the TFT working with the Adafruit library to see if I can spot any difference in the physical signals on the SPI bus.&lt;/p&gt;
&lt;p&gt;I find it strange that the ST7735R library is not working when I can see the settings in the .overlay file matches the settings in the Adafruit library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/400876?ContentTypeID=1</link><pubDate>Thu, 15 Dec 2022 14:19:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cc42cda-aaef-4bfe-bd48-008b5ced186d</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Thank you for the update.&lt;/p&gt;
&lt;p&gt;Do you have any logic analyzer available? It would be interesting if you could record the startup sequence from both nRF9160 as well as the other board. You could then compare the two to look for differences.&lt;/p&gt;
[quote user="Tor Kaufmann"]About the difference of the R and S version I have reached out to Sitronix for a comment.[/quote]
&lt;p&gt;It will be interesting to see if there are any significant differences.I found the datasheets, however, I have not yet compared the two in detail.&lt;/p&gt;
&lt;p&gt;&lt;a title="https://www.crystalfontz.com/controllers/Sitronix/ST7735S" href="https://www.crystalfontz.com/controllers/Sitronix/ST7735S" rel="noopener noreferrer" target="_blank"&gt;https://www.crystalfontz.com/controllers/Sitronix/ST7735S&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="https://www.crystalfontz.com/controllers/Sitronix/ST7735R" href="https://www.crystalfontz.com/controllers/Sitronix/ST7735R" rel="noopener noreferrer" target="_blank"&gt;https://www.crystalfontz.com/controllers/Sitronix/ST7735R&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/400024?ContentTypeID=1</link><pubDate>Sun, 11 Dec 2022 15:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca466847-66b4-4b58-9b5e-786498fa6cb3</guid><dc:creator>Tor Kaufmann</dc:creator><description>&lt;p&gt;Hi again H&amp;aring;kon,&lt;br /&gt;&lt;br /&gt;I have the terminal printing &amp;quot;updated display&amp;quot; once every second. F&lt;span&gt;rom main.c &amp;nbsp;we see that this is after we have a screen write/update. No errors printed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;About the difference of the R and S version I have reached out to Sitronix for a comment.&lt;br /&gt;Some of the differences are listed here: &lt;a href="https://www.sitronix.com.tw/en/products/aiot-device-ddi/"&gt;https://www.sitronix.com.tw/en/products/aiot-device-ddi/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In regards to the adafruit library Its a bit difficult to decipher if its written for a specific version. Code and comment are somewhat &lt;span&gt;contradicting&amp;nbsp;&lt;a href="https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7735.cpp"&gt;Adafruit-ST7735&lt;/a&gt;.&lt;/span&gt;&lt;a href="https://www.sitronix.com.tw/en/products/aiot-device-ddi/"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;However since the MCU seems to be writing data on the SPI bus, and we have something going on on the screen (prints&amp;nbsp;different versions of&amp;nbsp;garbage to the screen on the first few updates before turning blank - see first picture in post for what I refer to as garbage). I though to look into the format of the actual data written.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Ive compared the Adafruit library for the &amp;quot;INITR_MINI160x80&amp;quot; as this is the settings that works for the display using the ESP32. The .overlay file is changed slightly in order to replicate the Adafruit driver settings:&amp;nbsp;&lt;a href="https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7735.cpp"&gt;Adafruit-ST7735&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The following is now in the .overlay file:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; / {
	chosen {
		zephyr,display = &amp;amp;st7735r_st7735r_ada_160x128;
	};
};

&amp;amp;arduino_spi {
	compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 10 GPIO_ACTIVE_LOW&amp;gt;; /* D10 */
	pinctrl-0 = &amp;lt;&amp;amp;spi3_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi3_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;

	st7735r_st7735r_ada_160x128: st7735r@0 {
		compatible = &amp;quot;sitronix,st7735r&amp;quot;;
		spi-max-frequency = &amp;lt;1000000&amp;gt;;
		reg = &amp;lt;0&amp;gt;;
		cmd-data-gpios = &amp;lt;&amp;amp;gpio0 31 GPIO_ACTIVE_LOW&amp;gt;;	
		reset-gpios = &amp;lt;&amp;amp;gpio0 20  GPIO_ACTIVE_LOW&amp;gt;;
		width = &amp;lt;80&amp;gt;;
		height = &amp;lt;160&amp;gt;;
		x-offset = &amp;lt;0&amp;gt;;
		y-offset = &amp;lt;0&amp;gt;;
		madctl = &amp;lt;0xC0&amp;gt;;
		colmod = &amp;lt;0x05&amp;gt;;
		caset = [00 00 00 4F];
		raset = [00 00 00 9F];
		vmctr1 = &amp;lt;0x0e&amp;gt;;
		invctr = &amp;lt;0x07&amp;gt;;
		pwctr1 = [a2 02 84];
		pwctr2 = [c5];
		pwctr3 = [0a 00];
		pwctr4 = [8a 2a];
		pwctr5 = [8a ee];
		frmctr1 = [01 2c 2d];
		frmctr2 = [01 2c 2d];
		frmctr3 = [01 2c 2d 01 2c 2d];
		gamctrp1 = [02 1c 07 12 37 32 29 2d 29 25 2b 39 00 01 03 10];
		gamctrn1 = [03 1d 07 06 2e 2c 29 2d 2e 2e 37 3f 00 00 02 10];
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Ive added the:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;caset = [00 00 00 4F];
raset = [00 00 00 9F];
invctr = &amp;lt;0x07&amp;gt;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and changed&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;madctl = &amp;lt;0xC0&amp;gt;;
colmod = &amp;lt;0x05&amp;gt;;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The display is however still printing&amp;nbsp;garbage&amp;nbsp;the first few updates before turning blank. &amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/399449?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 13:54:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4e2ce00-f26a-4160-81ac-2a066f82233a</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Have you checked the terminal to see if there are any error messages?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/399447?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 13:53:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:144af0db-5ea6-4d5d-bf30-579ed4b33f49</guid><dc:creator>helsing</dc:creator><description>[quote user=""]what would be the best way to define CPOL/CPHA in code when using the ST7735 driver.[/quote]
&lt;p&gt;Please see the flags in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.1/zephyr/hardware/peripherals/spi.html"&gt;SPI API&lt;/a&gt;. Some &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/display/display_st7735r.c#L532"&gt;SPI flags are defined in the ST7735 driver&lt;/a&gt;. As CPOL/CPHA are not defined here, they are likely not needed. However, it would not hurt to give it a try.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I noticed that your display module is populated with ST7735S, however, the driver you are using is named st7735r. There are three parts from Sitronix with similar names, ST7735, ST7735R and ST7735S. I do not know exactly what the differences are and whether it is causing any problems.&lt;/p&gt;
[quote user=""]Ive tested the TFT with an ESP32-C3 mini in the Arduino environment and confirmed that the display is working fine with same wiring as used for the nrf9160 setup.[/quote]
&lt;p&gt;Is this driver specifically written for the -R or the -S version?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]However the result I get on the TFT display is still just garbage.[/quote]
&lt;p&gt;Is the garbage the same every time? Does it keep changing when the application is running?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/399057?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 19:38:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5247ced7-9a25-4618-bed6-b4c06abe577e</guid><dc:creator>Tor Kaufmann</dc:creator><description>&lt;p&gt;Thanks a lot H&amp;aring;kon:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 80x160 TFT display with the nrf9160 on SPI and ST7735 driver</title><link>https://devzone.nordicsemi.com/thread/398995?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2022 13:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48347368-f9a2-4eaa-bd5f-79304a795759</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Tor,&lt;/p&gt;
&lt;p&gt;Just letting you know I have received the case. I will take a look at get back to you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>