<?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>How to use SPI and BLE at the same time?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45292/how-to-use-spi-and-ble-at-the-same-time</link><description>I need to transfer data from my ADC (analog to digital conv) on a custom made, nrf52 PCB to a mobile app via bluetooth. For this I integrated my working SPI data transfer code to a BLE_UART example (sdk 15.2). I am using the ble_nus_data_send() to send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 24 Mar 2019 23:24:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45292/how-to-use-spi-and-ble-at-the-same-time" /><item><title>RE: How to use SPI and BLE at the same time?</title><link>https://devzone.nordicsemi.com/thread/177976?ContentTypeID=1</link><pubDate>Sun, 24 Mar 2019 23:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b5a793d-cb07-4c6f-b6e0-1286177684a7</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;I set my spi_config.orc = 0x55; but that did not change the &amp;quot;0xFFF...&amp;quot; output I am seeing, so I am guessing this isn&amp;#39;t an overflow problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use SPI and BLE at the same time?</title><link>https://devzone.nordicsemi.com/thread/177974?ContentTypeID=1</link><pubDate>Sun, 24 Mar 2019 22:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44439880-272d-456c-a08f-7c13ebdf66f0</guid><dc:creator>noob_with_ucontrollers</dc:creator><description>&lt;p&gt;Pin 9,10 are usually NFCT by default. So I added this to preprocessor definitions &lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/pastedimage1553464582338v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;along with editing the UICR_config file according to instructions I read on other devzone posts for pin 9 configuration. I did this so I can use 9,10 for my SPI.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is how I initialize the SPI and its pins. I tried configuring MISO after the SPI initialization as a PULLDOWN input but that did not fix the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;
    spi_config.ss_pin   = SPI_SS_PIN;    // Set to UNUSED 
    spi_config.miso_pin = SPI_MISO_PIN;
    spi_config.mosi_pin = SPI_MOSI_PIN;
    spi_config.sck_pin  = SPI_SCK_PIN;
		spi_config.frequency = NRF_DRV_SPI_FREQ_1M; 
		spi_config.mode      = NRF_DRV_SPI_MODE_1;
    APP_ERROR_CHECK(nrf_drv_spi_init(&amp;amp;spi, &amp;amp;spi_config, spi_event_handler, NULL));

    

	init_pins(); 
//	nrf_gpio_cfg_output (SPI_MOSI_PIN);
//	nrf_gpio_cfg_input (SPI_MISO_PIN, NRF_GPIO_PIN_NOPULL ); 
	nrf_gpio_cfg_input (SPI_MISO_PIN, NRF_GPIO_PIN_PULLDOWN ); 
	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;My RTT log shows proper data once when I first open it, like an array of &amp;#39;1E007F&amp;#39; which seems like normal ADC data, but then it would go back to printing out &amp;#39;FF...FFFFFF01&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use SPI and BLE at the same time?</title><link>https://devzone.nordicsemi.com/thread/177954?ContentTypeID=1</link><pubDate>Sat, 23 Mar 2019 23:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8308c452-d27e-493c-9a67-9fa69fdf859d</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="75171" url="~/f/nordic-q-a/45292/how-to-use-spi-and-ble-at-the-same-time"]and configure pins 9,10 as GPIO[/quote]
&lt;p&gt;That means nothing to me. Input? Output? MISO must be configured as an input for SPI to work properly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>