<?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>SPIM3 sending wrong data/byte</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48645/spim3-sending-wrong-data-byte</link><description>I am using SPIM3 to drive a peripheral, only using tx. And I noticed that SPI is sending wrong/corrupt bytes once in a while. See below image where the code tries to send 0x12 but 0x00 goes through the wire. 
 I am using below code to send the data where</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Jun 2019 13:00:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48645/spim3-sending-wrong-data-byte" /><item><title>RE: SPIM3 sending wrong data/byte</title><link>https://devzone.nordicsemi.com/thread/193190?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 13:00:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5f1b972-6cca-4470-b89a-d7d93e5e7b08</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to use SPIM0, 1 or 2 instead to see if the problem is the same?&lt;/p&gt;
&lt;p&gt;It is possible that you are affected by &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_198.html?cp=3_0_1_0_1_28"&gt;Errata 198&lt;/a&gt;, which affects the SPIM3 module and can lead to data corruption.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The workaround to this issue as explained by the errata is to put the SPI TX buffer in a separate RAM block to that used by the MCU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;For instance the RAM7 block, located at address 0x2000E000, would normally be free:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/memory.html?cp=3_0_0_3_1"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/memory.html?cp=3_0_0_3_1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;For more information regarding putting variables in specific memory ranges there are some existing devzone cases that you can use for reference, such as &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28589/placing-data-at-a-specific-memory-address-with-segger-embedded-studio"&gt;this one&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>