<?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>DFU via CAN-spi</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80965/dfu-via-can-spi</link><description>To update the Application, it is necessary to implement the update via CAN bus. Below is the hardware part, we use a CAN-SPI chip to access the bus. 
 We&amp;#180;ra using Microchip&amp;#180;s MCP25625 Controller withSerial Peripheral Interface (SPI), connected to nRF52832</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Oct 2021 12:45:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80965/dfu-via-can-spi" /><item><title>RE: DFU via CAN-spi</title><link>https://devzone.nordicsemi.com/thread/335492?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 12:45:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fd06e13-4120-45af-a472-85eb004695e0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]in idal, we would like to simplify this process as much as possible and transfer the hex file and not the dfu archive if possible..[/quote]
&lt;p&gt;The bootloader does not work on .hex files. That is also typically not used by other bootloaders either, as that would mean you would have to decode the .hex file (which is &lt;a href="https://en.wikipedia.org/wiki/Intel_HEX"&gt;Intel HEX&lt;/a&gt;) into a binary etc. What you need to transfer if using something based on the nRF5 SDK bootloader is the application image as a raw binary and the init packet. Those are found as separate files inside the DFU .zip archive.&lt;/p&gt;
[quote user=""]Could you please share example/ideas of how the easiest way for us to update the application through the CAN?[/quote]
&lt;p&gt;If you base this on the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_bootloader.html"&gt;SDK bootloader&lt;/a&gt;, then I would take the serial bootloader example and modify it to use CAN bus. The bootloader architecture is quite modular and the transport is separate from the rest of the bootloader. So what you can do is add another serial transport layer, similarly to how UART or USB is allready supported, and use that. You would also have to implement a DFU master on the other end, which transfers the init packet and image over CAN bus using the DFU protocol. Here you may find it useful to refer to other DFU master implementations, for instance in nrfutil for inspiration as well as the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_dfu_transport.html"&gt;DFU protocol documentation&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>