<?xml-stylesheet type="text/xsl" href="https://community.element14.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/"><channel><title>Zero Gecko follow up: talking to a microSD card via SPI</title><link>/products/roadtest/b/blog/posts/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi</link><description>After I finished my RoadTest review of the Zero Gecko starter kit , I still had some functionality that I want to try out. One of them is SPI support. I have an SD card breakout board in my toolbox. That&amp;#39;s what I&amp;#39;m connecting to the starter kit.Simplic</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Zero Gecko follow up: talking to a microSD card via SPI</title><link>https://community.element14.com/products/roadtest/b/blog/posts/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi</link><pubDate>Sat, 25 Feb 2017 15:58:15 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cf98a4db-3698-4c7b-8bed-ebd16503af6c</guid><dc:creator>withboobs</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Please check my post at &lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://github.com/OneBoobLess/zerogecko-stk3200-datalogger" rel="nofollow ugc noopener" target="_blank" title="https://github.com/OneBoobLess/zerogecko-stk3200-datalogger"&gt;https://github.com/OneBoobLess/zerogecko-stk3200-datalogger&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Board: Silicon Labs EFM32ZG-STK3200 Development Kit Device: EFM32ZG222F32&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Digital clock with Real Time Clock DS3231 (I2C), Rel. Humidity and Temperature Sensor Si7021 (I2C), and SD Card (SPI) with Memory LCD (SPI) on the EFM32ZG-STK3200.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;This is extension of the work by Jan Cumps, from 2014, posted at &lt;a class="jive-link-blog-small" href="/products/roadtest/b/blog/posts/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi"&gt;https://www.element14.com/community/groups/roadtest/blog/2014/11/17/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi&lt;/a&gt; which allows data logging through SD Card to EFM32 Zero Gecko STK3200.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;In the present project, the digital clock (example project for EFM32ZG) is combined with the environmental monitor (temperature and relative humidity), where all data is displayed on the LCD screen. In addition, the data can be saved to the SD card, if user chooses so.&lt;/p&gt;&lt;p&gt;Challenge of the project was how to share SPI bus between the display and the SD Card, and how to reuse memory used by the Graphical LIBrary (GLIB) considering that the two libraries combined require more memory then what EMF32ZG has (4kB RAM), see discussion initiated by WithBoobs at &lt;a class="jive-link-external-small" href="http://community.silabs.com/t5/32-bit-MCU/ZeroGecko-with-SDK3200-How-to-add-SPI-SD-card-to-the-GLIB-ef/td-p/189292" rel="nofollow ugc noopener" target="_blank"&gt;http://community.silabs.com/t5/32-bit-MCU/ZeroGecko-with-SDK3200-How-to-add-SPI-SD-card-to-the-GLIB-ef/td-p/189292&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This being said, the datalogger is operated as follows: 1. The user can start/stop data recording by pressing PB1 button. 2. The user can set time, and date, and write it to DS3231. PB0 button is used to select what to change, while the Capsense buttons are used to increase/decrease current value. Cycling PB0 makes a bar be drawn under a time/date setting that can be changed. Continue cycling PB0 until the bar is no longer visible makes device accepts new values and store them in DS3231.&lt;/p&gt;&lt;p&gt;Also, for this project the original 16x20 numbers-only font was expanded with few characters (&amp;#39;C&amp;#39;, &amp;#39;.&amp;#39; and &amp;#39;%&amp;#39;) so that temperature and relative humidity can be printed in the same size as the time digits with their units.&lt;/p&gt;&lt;p&gt;Lastly, this project combines all files for the SimplicityStudio v.4.4 and later, minus the system specific files.&lt;/p&gt;&lt;p&gt;Author: OneBoobLess, 2017&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19222&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Zero Gecko follow up: talking to a microSD card via SPI</title><link>https://community.element14.com/products/roadtest/b/blog/posts/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi</link><pubDate>Mon, 01 Dec 2014 20:14:52 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cf98a4db-3698-4c7b-8bed-ebd16503af6c</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Attempt to combine the weather station example and this SD card port into one project: &lt;a class="jive-link-blog-small" href="https://www.element14.com/community/people/jancumps/blog/2014/12/01/efm32-zero-gecko-starter-kit-w-sensor-card-logging-to-sd-card"&gt;EFM32[emoticon:7d377b609b6f44bf9290e3d8a0b9a733] Zero Gecko Starter Kit w/ Sensor Card: logging to SD card&lt;/a&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19222&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Zero Gecko follow up: talking to a microSD card via SPI</title><link>https://community.element14.com/products/roadtest/b/blog/posts/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi</link><pubDate>Sat, 29 Nov 2014 01:07:55 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cf98a4db-3698-4c7b-8bed-ebd16503af6c</guid><dc:creator>baldengineer</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Nice work, seems strange that SPI and FAT wasn&amp;#39;t included with a kit that begs to be a datalogger.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m trying to follow your work but running into many problems.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;ve downloaded the ZIP file you attached and created a new Project using the Gecko Starter Kit and Proc type.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I get errors about missing ff.h and diskio.h, but not really sure which ones I&amp;#39;m suppose to include.&amp;nbsp; Do I need to add an include directory to my project from the SDK?&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19222&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Zero Gecko follow up: talking to a microSD card via SPI</title><link>https://community.element14.com/products/roadtest/b/blog/posts/zero-gecko-follow-up-talking-to-a-microsd-card-via-spi</link><pubDate>Tue, 18 Nov 2014 14:23:36 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cf98a4db-3698-4c7b-8bed-ebd16503af6c</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;What I forgot to mention is that in Drivers/microsd.c, each reference of MICROSD_GPIOPORT had to be replaced by the appropriate port (since my Zero Gecko&amp;nbsp; USART1[3] has pins on two ports:&lt;/p&gt;&lt;p&gt;in void MICROSD_Init(void):&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=++%2F*+IO+configuration+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTD%2C+MICROSD_MOSIPIN%2C+gpioModePushPull%2C+0%29%3B++%2F*+MOSI+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTD%2C+MICROSD_MISOPIN%2C+gpioModeInputPull%2C+1%29%3B+%2F*+MISO+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTC%2C+MICROSD_CSPIN%2C+++gpioModePushPull%2C+1%29%3B++%2F*+CS+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTC%2C+MICROSD_CLKPIN%2C++gpioModePushPull%2C+0%29%3B++%2F*+CLK+*%2F]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;in void MICROSD_Deinit(void)&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=++%2F*+IO+configuration+%28USART+0%2C+Location+%230%29+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTD%2C+MICROSD_MOSIPIN%2C+gpioModeDisabled%2C+0%29%3B++%2F*+MOSI+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTD%2C+MICROSD_MISOPIN%2C+gpioModeDisabled%2C+0%29%3B++%2F*+MISO+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTC%2C+MICROSD_CSPIN%2C+++gpioModeDisabled%2C+0%29%3B++%2F*+CS+*%2F%0A++GPIO_PinModeSet%28MICROSD_GPIOPORTC%2C+MICROSD_CLKPIN%2C++gpioModeDisabled%2C+0%29%3B++%2F*+Clock+*%2F]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;in void MICROSD_Deselect(void)&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=++GPIO-%3EP%5B+MICROSD_GPIOPORTC+%5D.DOUTSET+%3D+1+%3C%3C+MICROSD_CSPIN%3B+%2F*+CS+pin+high.+*%2F]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;in int MICROSD_Select(void)&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=++GPIO-%3EP%5B+MICROSD_GPIOPORTC+%5D.DOUTCLR+%3D+1+%3C%3C+MICROSD_CSPIN%3B+%2F*+CS+pin+low.+*%2F]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19222&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>