<?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>How to get started creating a TWI bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54472/how-to-get-started-creating-a-twi-bootloader</link><description>I need to update firmware in an nRF52 via TWI. It seems like it would be fairly easy to modify the serial bootloader/DFU provided with the SDK, but I&amp;#39;m not finding the code that actually communicates over the serial port. 
 Is there a guide to modifying</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Nov 2019 18:44:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54472/how-to-get-started-creating-a-twi-bootloader" /><item><title>RE: How to get started creating a TWI bootloader</title><link>https://devzone.nordicsemi.com/thread/220940?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 18:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1d48db9-5c1f-46a7-bc3c-9acd60f6a2d4</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help! Let me know if you run into any issues.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get started creating a TWI bootloader</title><link>https://devzone.nordicsemi.com/thread/220921?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 16:06:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef1a405b-3fd7-4b17-a16d-9a74577c2b19</guid><dc:creator>BillLMG</dc:creator><description>&lt;p&gt;Thank you. That&amp;#39;s what I needed to get started.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get started creating a TWI bootloader</title><link>https://devzone.nordicsemi.com/thread/220782?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 10:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02e1764e-4ec3-4074-a0ac-0dc88fdc4e87</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Bill,&amp;nbsp;&lt;/p&gt;
[quote user=""]Is there a guide to modifying the transport layer? If not, can you point me to low level code that reads and writes the serial port?[/quote]
&lt;p&gt;&amp;nbsp;I am afraid that we do not have a guide on how to add a custom transport layer to our Secure Bootloader. The code that receives the data over the serial interface is found in nrf_dfu_serial_uart.c. This is where the&amp;nbsp;DFU_TRANSPORT_REGISTER macro is used to register the transport layer and define the init and close functions for said transport layer.&amp;nbsp; The received commands/data is processed by&amp;nbsp;on_rx_complete() which decodes the slip packet and passes it to&amp;nbsp;nrf_dfu_serial_on_packet_received() in nrf_dfu_serial.c, which&amp;nbsp;processes the request inside the slip packet and passes it on to the nrf_dfu_req_handler_on_req().&lt;/p&gt;
&lt;p&gt;So in short, its only the&amp;nbsp;&lt;span&gt;nrf_dfu_serial_uart.c/h files that you would have to replace with&amp;nbsp;&amp;nbsp;nrf_dfu_serial_twi.c/h.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>