<?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>nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80077/nrf52840-spim0-consecutive-tx-bug</link><description>Hi, 
 I am writing my own SPIM driver, when I try to send a 2 bytes message and then a 26 bytes message the second message &amp;quot;crashes&amp;quot; after 2 bytes. 
 But if I send the 26 bytes message and then the 2 bytes message, the two messages are correctly sent</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Oct 2021 11:53:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80077/nrf52840-spim0-consecutive-tx-bug" /><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/332129?ContentTypeID=1</link><pubDate>Fri, 01 Oct 2021 11:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc978a55-b0b4-4adb-b0b5-9db04bd161da</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Great to see that there was a fix for the issue. If this is the solution the feel free to mark the comment as suggested answer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/331976?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 14:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9162f55e-c049-4e15-83f6-7b0ccb57bd56</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;Sorry, I got confused during tests but it is&amp;nbsp;definitely reading from another location in RAM that solved the problem. I added a local array variable in the function calling the SPI_write() containing the frame to send (values hardcoded). Also adding another global array containing the exact same bytes worked too (it was a global array at first).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/331975?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 14:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5871629-ea9a-4e87-a5dc-99ab3d89f1d2</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;So the workaround/fix with sending CS&amp;nbsp; between messages fixes the original issue but leads to crash ? or did the crash occur regardless? could you possible share more details around the circumstance?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/331949?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 13:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bf97f70-6cc6-4770-8d6f-a0b7cc5d2481</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;Our investigation concluded that SPIM0 crashes when trying to read RAM at a specific location (0x20006E50)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/331656?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 09:24:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:926d5639-33fb-4e23-ad77-76377857a1fd</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;I checked, TXD.MAXCNT = 26 and TXD.AMOUNT = 2 when the crash occurs, but I get stuck in the while.&lt;/p&gt;
&lt;p&gt;I am not sure if the problem comes from the uC side, I fixed the problem by adding CS edges between messages. So it is maybe related to the component (ADS1298) but I was using this driver(with no CS edges) with a STM32H7 microcontroller and it worked well. As the nrf52 is the SPI master, I still can&amp;#39;t explain this issue, perhaps timing issue ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/331627?ContentTypeID=1</link><pubDate>Wed, 29 Sep 2021 07:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f9fd2c5-55d9-4fb2-9aac-74ddd687eea9</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Could you share the exact code that shows where the length is defined and how SPI_write() is called.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Or can you check with a debugger if TXD.MAXCNT is actually 26 at the second transfer ?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840 SPIM0 consecutive TX bug</title><link>https://devzone.nordicsemi.com/thread/331516?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 12:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:131d6e9a-7265-4716-abd0-300ecaa16fc5</guid><dc:creator>gat</dc:creator><description>&lt;p&gt;EasyDMA&amp;nbsp;TX is in&amp;nbsp;STALL_STATUS after first message is sent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>