<?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>Base address of SPIM instance</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48378/base-address-of-spim-instance</link><description>How the base address is assigned to NRF_SPIM_TYPE structure through *p_reg which is in nrfx_spim_t structure?, and also please let me know what is the default base address for structure.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Jun 2019 17:48:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48378/base-address-of-spim-instance" /><item><title>RE: Base address of SPIM instance</title><link>https://devzone.nordicsemi.com/thread/192157?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 17:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db25a74e-60e8-43c4-a7ef-b7b159cf0f54</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How the base address is assigned to NRF_SPIM_TYPE structure through *p_reg which is in&amp;nbsp;nrfx_spim_t structure?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrf__spim__hal.html?resultof=%22%4e%52%46%5f%53%50%49%4d%5f%54%59%50%45%22%20"&gt;SPIM HAL&lt;/a&gt; is documentented in the SDK documentation, with nrf_spim_t struct reference &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/structnrfx__spim__t.html?resultof=%22%4e%52%46%5f%53%50%49%4d%5f%54%59%50%45%22%20"&gt;here&lt;/a&gt;. The NRF_SPIM_TYPE struct is defined&amp;nbsp;in&amp;nbsp;\modules\nrfx\mdk\nrf52.h.&lt;br /&gt;&lt;br /&gt;I suggest looking at the SPIM example that is included in &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/nrfx_spim_example.html?cp=5_1_4_6_38"&gt;\examples\peripheral\nrfx_spim\&lt;/a&gt;&amp;nbsp;which shows how to initiate SPIM.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]please let me know what is the default base address for structure[/quote]
&lt;p&gt;&amp;nbsp;For SPIM the default address is found in the product specifications &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/memory.html?cp=3_1_0_7_2#memorymap"&gt;memory map&lt;/a&gt;, in your case this is &lt;span&gt;&lt;strong&gt;0x40003000&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;for SPIM0,&amp;nbsp;&lt;span&gt;&lt;strong&gt;0x40004000&lt;/strong&gt;&amp;nbsp;for SPIM1 or&amp;nbsp;&lt;strong&gt;0x40023000&amp;nbsp;&lt;/strong&gt;for SPIM2.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hope this helps!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>