<?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>nRF5340 Not Receiving CAN Traffic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114395/nrf5340-not-receiving-can-traffic</link><description>I&amp;#39;m developing a custom board with a uBlox NORA-B121 module, which contains an nRF5340. The board has a Microchip MCP2515 CAN controller, and for some reason, I can&amp;#39;t receive CAN data. I can send it, the controller appears to receive correctly, and the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Sep 2024 22:04:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114395/nrf5340-not-receiving-can-traffic" /><item><title>RE: nRF5340 Not Receiving CAN Traffic</title><link>https://devzone.nordicsemi.com/thread/502826?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2024 22:04:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a90d4581-712a-46d7-9018-4556cbcb7054</guid><dc:creator>piper8</dc:creator><description>&lt;p&gt;I found the problem, I was using GPIO 0.00 as the CIPO of my SPI bus, which is one of the low frequency crystal oscillator (LFXO) pins.&amp;nbsp; The LFXO must be disabled with:&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SOC_ENABLE_LFXO=n&lt;/pre&gt;to use this pin for other purposes.&amp;nbsp; CAN works properly now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Not Receiving CAN Traffic</title><link>https://devzone.nordicsemi.com/thread/502654?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2024 19:36:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcf820bc-c049-4d75-8d86-efc8aef9b678</guid><dc:creator>piper8</dc:creator><description>&lt;p&gt;That&amp;#39;s good advice, thank you.&amp;nbsp; After digging through the controller driver (and the nRFX SPIM driver,) I&amp;#39;ve found a few tings.&amp;nbsp; It looks like the interrupt code in the driver is triggered, but the interrupt flags don&amp;#39;t make it there (the interrupt handler is fed 0x00 instead of the actual flag byte, 0x04.)&amp;nbsp; I&amp;#39;m trying to track this down through the SPI driver code, but it is crashing when I use printk very much, probably because this is timing sensitive code, and I&amp;#39;m inserting a bloated monster called printk into it.&amp;nbsp; The stack overflows/improper EPSR use/etc fatal errors have variously implicated timing code or the printk function.&amp;nbsp; I&amp;#39;m trying to find another way to extract data from here, probably by copying it elsewhere in memory, to then print it from a non timing critical context (main, some thread, etc.)&amp;nbsp; However, I don&amp;#39;t know how to do this from a driver, when the OS has created several levels of separation between the driver and somewhere I can safely run complex code like printk.&amp;nbsp; Is there a good way to stick a pointer to my harvested data in memory somewhere, and then find and use it from some other, unrelated code?&amp;nbsp; I figure there has to be a system call to do this kind of thing.&lt;br /&gt;&lt;br /&gt;I also found that the ISO-TP sample does work, receiving data and everything, but I can&amp;#39;t figure out what it&amp;#39;s doing differently (or how it could be different, since they both use the same MCP2515 driver.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Not Receiving CAN Traffic</title><link>https://devzone.nordicsemi.com/thread/500649?ContentTypeID=1</link><pubDate>Sat, 31 Aug 2024 07:59:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79909462-17c1-4996-aea6-8801786d1c54</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Once you see the data going into the NRF MCU on the SPI lines, its a good idea to look at the actual mcp2515 driver source code.&lt;/p&gt;
&lt;p&gt;Maybe hook up a debugger and check what its doing. You probably missed some minor detail in the driver API, and reading the source usually makes this kind of issue obvious.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>