<?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>SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125222/spim00-failed-to-initialize-nrfx-driver-0bad0004-on-nrf54l15-dk</link><description>Hey folks, I&amp;#39;m trying to use SPI00 instead of SPI20 to achieve higher frequencies and driver fails to initialize no matter what I&amp;#39;ve tried to do on NRF54L15-DK. Here are relevant parts: 
 overlay: 
 prj.conf 
 
 Thread for SD card init 
 
 
 What I get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Oct 2025 19:48:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125222/spim00-failed-to-initialize-nrfx-driver-0bad0004-on-nrf54l15-dk" /><item><title>RE: SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/thread/552820?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2025 19:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf113fd5-79f5-4db2-9e96-13703e5bef66</guid><dc:creator>Den Engineer</dc:creator><description>&lt;p&gt;Whoa, thanks a ton &lt;a href="https://devzone.nordicsemi.com/members/zeki.fan"&gt;Zeki.Fan&lt;/a&gt;&amp;nbsp;, you just save me from hours of debugging likely&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f604.svg" title="Smile"&gt;&amp;#x1f604;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt;&amp;nbsp;should that be added somewhere for SPI00 docs or maybe in the error message that the minimal frequency wasn&amp;#39;t met for driver to be initialized? Since it&amp;#39;s not the most straightforward thing to figure out and that could save quite some time to ppl using SPI00 for SD cards&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: SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/thread/552733?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2025 10:54:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11e2d5f4-b332-43a4-b713-43ae2d92e533</guid><dc:creator>Zeki.Fan</dc:creator><description>&lt;p&gt;I also have the same problem, I am trying to debug it. I found that sd_init_io() first attempts to initialize the SD card with a frequency of 400KHz, it is too slow for spi00!&amp;nbsp;&amp;nbsp;I have modified the definition of &amp;#39;SDMMC_CLOCK_400KHZ&amp;#39; to 2Mhz and it is now working。&amp;nbsp; ：）&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/thread/552717?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2025 09:14:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d147c0b6-6e0b-4a81-8143-facb7ce0b3d2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;That is a good point. The error code 0x0bad0004 is&amp;nbsp;NRFX_ERROR_INVALID_PARAM and comes from &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ff8f0c579eeb896876b6f36aca70c2bbfa756e19/drivers/spi/spi_nrfx_spim.c#L373"&gt;this&lt;/a&gt; call to&amp;nbsp;nrfx_spim_init(). I expect the check that fails is the frequency check &lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/blob/a6579483deb33112cc763d05a4a3f8085883c1ac/nrfx/drivers/src/nrfx_spim.c#L411"&gt;here&lt;/a&gt;? Which frequency are you configuring now? Note the limitation of SPIM00 frequency due to the prescaler. I also see that I rounded off the frequency in my previous reply to 1 MHz, but the minimum is slightly higher&amp;nbsp;&lt;span&gt;(or rather 128 MHz / 126). See the &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/spim.html#d1428e920"&gt;Configuration&lt;/a&gt;&amp;nbsp;in the SPIM chapter in the datasheet for details.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/thread/552551?ContentTypeID=1</link><pubDate>Mon, 27 Oct 2025 19:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25034334-42d9-4f51-b6d5-8e095a271afb</guid><dc:creator>Den Engineer</dc:creator><description>&lt;p&gt;Unfortunately that did not change much - I still have &amp;quot;spi_nrfx_spim: Failed to initialize nrfx driver: 0bad0004&amp;quot; which I believe happens even before any messages are sent to the card, which means likely a driver software problem &lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/thread/552549?ContentTypeID=1</link><pubDate>Mon, 27 Oct 2025 19:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d6cc465-5451-4d2f-9575-d4c4d307b0fe</guid><dc:creator>Den Engineer</dc:creator><description>&lt;p&gt;Thanks, great insight on compliance! Will try to add&amp;nbsp;&lt;span&gt;E0/E1 as you&amp;#39;ve described it instead of my contraption and report back.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIM00  Failed to initialize nrfx driver: 0bad0004 on NRF54L15-DK</title><link>https://devzone.nordicsemi.com/thread/552481?ContentTypeID=1</link><pubDate>Mon, 27 Oct 2025 13:04:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfb444ad-4e73-47c7-8391-4cb4d47566f8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;SPIM00 has to be used with &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/chapters/pin.html#ariaid-title2"&gt;dedicated pins&lt;/a&gt;, but that seems to be in order here. another point&amp;nbsp;is to enable the correct&amp;nbsp;drive strength&amp;nbsp;(&lt;span&gt;E0/E1&lt;/span&gt;) in the device tree with &amp;quot;&lt;code&gt;nordic,drive-mode = &amp;lt;NRF_DRIVE_E0E1&amp;gt;;&lt;/code&gt;&amp;quot; as shown &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/ff8f0c579eeb896876b6f36aca70c2bbfa756e19/tests/drivers/spi/spi_loopback/boards/nrf54l15dk_nrf54l15_cpuapp.overlay#L15"&gt;here&lt;/a&gt;, then the driver will configure the drive strength properly.&lt;/p&gt;
&lt;p&gt;Another&amp;nbsp;issue is that SD cards should start with a low clock frequency first, and then move to a higher frequency. However, the SPI00 clock cannot go lower than&amp;nbsp; 1 MHz (or rather 128 MHz / 126). So it will not be possible to initiate communication with a&amp;nbsp;SD card in a complient way using SPIM00. It coudl work though and most likely this is not an issue, but you should be ware of it (particularily if the end user could potentially insert an old/low performing SD card that cannot handle higher frequencies).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>