<?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>SPIM not working in NRF52832?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28610/spim-not-working-in-nrf52832</link><description>I am writing drivers for external ADC and I need to write my own SPIM driver using hal of NRF52 SPIM. However, after trying for a day I am not able to see my waveform in my Oscilloscope. 
 #define SPI_MODULE (NRF_SPIM_Type *)NRF_SPIM0
#define TIMER_MODULE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Dec 2017 13:30:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28610/spim-not-working-in-nrf52832" /><item><title>RE: SPIM not working in NRF52832?</title><link>https://devzone.nordicsemi.com/thread/113387?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 13:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf830ac9-e452-45fa-9be7-af1a1a8a6d2f</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Ok, just checking as it does not show in your code, and you wrote &amp;quot;not getting any interrupt on NRF_SPIM_EVENT_ENDRX (if I enable it with nrf_spim_int_enable(SPI_MODULE, NRF_SPIM_INT_ENDTX_MASK)).&amp;quot;, which seems like you only try to enable interrupt for ENDTX again, but maybe this was a typo? Have you checked the SPI bus using a logic analyzer, to see if anything is transferred to/from the external device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM not working in NRF52832?</title><link>https://devzone.nordicsemi.com/thread/113386?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 13:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0519d30-3e94-4a12-a0cd-243dad2bbcf1</guid><dc:creator>abhiarora</dc:creator><description>&lt;p&gt;Yes. I have setup UART and printf are working in interrupts and other places. Yes. I have tried to enable interrupt for NRF_SPIM_EVENT_ENDRX  but it is not getting triggered. NRF_SPIM_EVENT_ENDTX is getting triggered only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM not working in NRF52832?</title><link>https://devzone.nordicsemi.com/thread/113384?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 12:25:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a8ee528-7d36-4a55-84e1-0bdb4ae90c20</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Have you setup UART and retargeted the stdio functions? If not, call to &lt;code&gt;printf()&lt;/code&gt; might lead to a hardfault. Did you try enable interrupt for &lt;code&gt;NRF_SPIM_EVENT_ENDRX&lt;/code&gt; using &lt;code&gt;nrf_spim_int_enable(SPI_MODULE, NRF_SPIM_INT_ENDRX_MASK)&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM not working in NRF52832?</title><link>https://devzone.nordicsemi.com/thread/113388?ContentTypeID=1</link><pubDate>Sun, 17 Dec 2017 13:25:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97c12339-d4ea-490f-a8ac-f5ce1d46354c</guid><dc:creator>abhiarora</dc:creator><description>&lt;p&gt;My code is inspired from nrf5 SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM not working in NRF52832?</title><link>https://devzone.nordicsemi.com/thread/113385?ContentTypeID=1</link><pubDate>Sun, 17 Dec 2017 13:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffcc4df2-8dc3-4b2a-8016-78c26e4f3249</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;One would ask why you don&amp;#39;t use drivers from nRF5 SDK or (if you really don&amp;#39;t like them) don&amp;#39;t take the inspiration from there? To your code: first of all I would throw away all print-outs from interrupt handlers. They might work or not. If you really need some trace about interrupt handler being triggered then simply toggle some GPIO line HIGH/LOW and look with oscilloscope/logical analyzer. By that and going step by step you should be able to put the things back together.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>