<?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>Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110348/keep-dtr-rts-high-during-dfu</link><description>Hi guys: 
 Right now I have my custom board using nRF52833. 
 I wang to use DFU over uart to upgrade firmware. 
 I try a different way to enter DFU mode, and this require DTR stay low during the whole precess. 
 Can this achieved by modifying the code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Apr 2024 13:38:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110348/keep-dtr-rts-high-during-dfu" /><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479728?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:38:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a68f545-9feb-45e4-b056-8e1f2a0cbf86</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;When you reset the device, all GPIOs will be put back in their default state (Disconnected input), so this means that from the nRF&amp;#39;s side, the pin is floating. It is not pulled down. I suggest you try to debug this sequence, to try to pin-point when the pin is pulled down. It is most likely right before or right after the reset. Check when the UART is enabled, and if it is disabled before the reset.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479700?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 12:32:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1833c78d-cc42-4a9f-b98d-e737ab88ed79</guid><dc:creator>alien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m really grateful for your reply.&lt;/p&gt;
&lt;p&gt;Actually I can realize dfu by using other way.&lt;/p&gt;
&lt;p&gt;But I have to use dtr/rts to try to do reset.&lt;/p&gt;
&lt;p&gt;So can you tell me why it is hard to keep dtr/rts high during DFU.&lt;/p&gt;
&lt;p&gt;Best，&lt;/p&gt;
&lt;p&gt;Alien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479697?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 12:27:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03c5833e-6a68-4d85-a101-02af0c96eea3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Alien,&lt;/p&gt;
&lt;p&gt;You need to use DTR to reset the nRF into DFU mode? If that is the case, you should consider using another pin, disabling flow control, or use some other method to enter DFU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is possible to use the VREGRET register to tell the nRF to enter DFU mode after the next reset. Could that be an option? In that case, you could use pretty much any event (button press/long button press/ specific UART command, Bluetooth message) to tell the device to enter DFU mode. If that is feasible, then I can give you some pointers if you&amp;#39;d like.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479640?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 08:55:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00847107-85fe-41e8-bb41-2cbed28ccea2</guid><dc:creator>alien</dc:creator><description>&lt;p&gt;I&amp;#39;m using secure_bootloader_uart_mbr_pca10040, and I have modified pca10040.h to custom_board.h.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And the SDK version is&amp;nbsp;nRF5_SDK_17.0.2_d674dde.&lt;/p&gt;
&lt;p&gt;Yes, you&amp;#39;re right about DTR/RTS. But on my custom board ,I need to use RTS to simulate button press to let it enter DFU mode. I use pyserial to setRTS(1) and setRTS(0) to do so.&lt;/p&gt;
&lt;p&gt;And I use DTR to do reset. I need DTR to keep high cause once it becomes low, the board will continuous reset during DFU process. I just need to find a way to let it keep high.&lt;/p&gt;
&lt;p&gt;Right now I&amp;#39;m thinking about modifying nrfutil or nrf_uarte.h.&lt;/p&gt;
&lt;p&gt;Hope you can understand me!&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Alien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479634?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 08:45:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ae34130-fb11-4032-bfdb-9d6de0051765</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. If you are seeing that it dips down even with an external pullup then it must be that the nRF actually pulls it down. What bootloader are you using? And what SDK version are you using?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On the other side. Isn&amp;#39;t the purpose of the DTR/RTS to prevent the other device sending data whenever the target is not ready? I would say that it is better to have the nRF let the connected device know that it shouldn&amp;#39;t send data when it is not turned on and the application is running.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479608?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 07:39:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7898e78f-d851-4bba-b607-2af39e3355f4</guid><dc:creator>alien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Yes,when it pluged in my computer, the DTR/RTS stay high.&lt;/p&gt;
&lt;p&gt;Alien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479607?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 07:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e034325-dd51-4e2d-9632-23386b0288ac</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Alien,&lt;/p&gt;
&lt;p&gt;So you are saying that your usb-serial pcb already pulls up the DTR/RTS?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479592?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 06:36:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c430f969-cf8f-4239-8d2a-033eef258e32</guid><dc:creator>alien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;Since I individually have an usb-serial pcb board. The DTR/RTS will keep high when there is no data transport on TXD/RXD. During the DFU process, DTR/RTS will become low before the DFU finished.&amp;nbsp; I just want to know if I can always let DTR/RTS stay high on this usb-serial pcb board.&lt;/p&gt;
&lt;p&gt;Alien&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479552?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 20:59:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a24b7f32-58dc-4c25-8682-9edbd574d2b3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;During a DFU process, the nRF is reset at least once. A successfull DFU usually has 2-3 resets depending on what SDK you are using (nRF5 SDK or nRF Connect SDK).&lt;/p&gt;
&lt;p&gt;During a reset, there is no way to keep a pin as an output. You can set it immediately after the reset, but there will be a small gap. If that doesn&amp;#39;t work for you, you would need to use an external pullup or pulldown resistor. That is unfortunately the only way to keep GPIO states while resetting the nRF.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Keep DTR/RTS high during DFU</title><link>https://devzone.nordicsemi.com/thread/479350?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 08:08:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbe009f1-ae9d-4438-af83-7077c76b358f</guid><dc:creator>alien</dc:creator><description>&lt;p&gt;Also I disabled Flow Control in bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>