<?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>Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54599/nrf51822-and-stm32-uart-bootloader-problem</link><description>Hello 
 I try to use this bootloader https://github.com/williamhuang03/STM32F4-Custom-Bootloader on STM32F4 which works well through cable but as suddenly I use Nfr51 as transmitter and ESP32 as receiver so it doesn&amp;#39;t work problem is that STM32 bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Nov 2019 02:26:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54599/nrf51822-and-stm32-uart-bootloader-problem" /><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221966?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2019 02:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b042910-4a6d-40d8-bf31-d137a2ae333c</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;OK, the nRF51 is limited to the 1Mbit Phy of Bluetooth, so the throughput is limited to&amp;nbsp;&lt;span&gt;149.2 kbps. However, the actual throughput will depend on the features supported by the ESP32 as it is the BLE master.&lt;/span&gt;&amp;nbsp; I am afraid that we cannot provide a lot of support for issues on non-Nordic ICs.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221710?ContentTypeID=1</link><pubDate>Sun, 24 Nov 2019 13:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b501f874-006e-4092-b23f-1655045452db</guid><dc:creator>Folny</dc:creator><description>&lt;p&gt;I only use Rx Tx pins I tried to increase the bit rate to 115200 but that&amp;#39;s not a big difference, I feel the problem is in the code for ESP32.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221486?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2019 08:45:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29d7b03f-3e39-4cfe-ad6c-07852eb833ac</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The nRF51 supports higher baudrates and I guess the STM32 does as well, so you can try to increase it to 115200? Are you only using TX/RX lines or are you using Hardware flow control (i.e. CTS/RTS) lines in addition?&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: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221388?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 15:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3e739e0-b87f-4565-817c-f3d89d30d64f</guid><dc:creator>Folny</dc:creator><description>&lt;p&gt;Yes today I just tried it and it worked, I used the character &amp;#39;\ r&amp;#39; in the code ble_app_uart and in the code for STM32 and I had to modify the application for Windows to work it speed uart I set to 57600. This time, but the problem at 16kb bin file uploads too long about 4 minutes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221377?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 15:24:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21ceeb08-a882-490b-942b-042c21d0f906</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Looking at the ble_app_uart code in SDK v8.0.0 you should be able to alter it to send a byte as soon as it is received over UART instead of waiting for the &amp;#39;\n&amp;#39; character. See comment below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void uart_event_handle(app_uart_evt_t * p_event)
{
    static uint8_t data_array[BLE_NUS_MAX_DATA_LEN];
    static uint8_t index = 0;
    uint32_t err_code;

    switch (p_event-&amp;gt;evt_type)
    {
        case APP_UART_DATA_READY:
            UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index]));
            index++;
            
            //Remove if statement and send a single byte each time the APP_UART_DATA_READY event is processed.
            if ((data_array[index - 1] == &amp;#39;\n&amp;#39;) || (index &amp;gt;= (BLE_NUS_MAX_DATA_LEN))) 
            {
                err_code = ble_nus_string_send(&amp;amp;m_nus, data_array, index);
                if (err_code != NRF_ERROR_INVALID_STATE)
                {
                    APP_ERROR_CHECK(err_code);
                }
                
                index = 0;
            }
            break;

        case APP_UART_COMMUNICATION_ERROR:
            APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);
            break;

        case APP_UART_FIFO_ERROR:
            APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);
            break;

        default:
            break;
            }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221232?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 08:28:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fd8e4e4-4b2a-4214-9738-854b1cbd4089</guid><dc:creator>Folny</dc:creator><description>&lt;p&gt;Yes, I use Keil for both Nrf51 and STM32, considering how to modify the code to send a string in ble_app_uart without having to use &amp;#39;\ n&amp;#39;, and that the code can also be used for a standard STM32 Flash Loader ? this would solve many problems.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://gechologic.com/how-to-use-stm32-flash-loader"&gt;http://gechologic.com/how-to-use-stm32-flash-loader&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221162?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 18:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:846d4619-a165-48bb-b068-01e115f5b50a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;If you&amp;#39;re using Keil to develop the nRF51 Firmware, then it should be fairly simple to debug the nRF51, see&amp;nbsp;&lt;a href="http://www2.keil.com/mdk5/debug"&gt;http://www2.keil.com/mdk5/debug&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re using GCC with makefiles, then I would recommend using Segger Ozone, see &lt;a href="https://www.youtube.com/watch?v=lYtlNTMdFnQ"&gt;Ozone The J-Link Debugger Introduction&lt;/a&gt;&amp;nbsp;or GDB, see&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/using-gdb-with-nordic-devices"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/using-gdb-with-nordic-devices&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221149?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 16:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:883a2442-2251-486b-9b71-1ac2806379a0</guid><dc:creator>Folny</dc:creator><description>&lt;p&gt;I haven&amp;#39;t tried the debug mode yet and I know very little about Nrf51 programming and I&amp;#39;m just learning and I&amp;#39;m hoping to come to this problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221102?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 13:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b090fc05-a3f9-41aa-aa6c-b76b298cf0a0</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ok, can you run the ble_app_uart in a debug session and check wether the two bytes are being received or not, i.e. that you enter the UART event handler? You can alternatively output the received data using RTT.&amp;nbsp;&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: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221061?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 12:21:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:866d33f4-ef50-4a17-8cca-90d7a474e8c6</guid><dc:creator>Folny</dc:creator><description>&lt;p&gt;Sorry I use Google translator :-) I think the error will definitely be on the Nrf51 wall because as I wrote through the cable everything works correctly I have already tried many options but the problem still persists.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221034?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 11:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e20f1554-9d13-4758-8739-0083bb7a2f4d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I ran the first sentence through Google Translate, which returned &amp;quot;&amp;nbsp;&lt;span&gt;That&amp;#39;s exactly what I tried to add &amp;#39;\ n&amp;#39; to the STM32 boot code, but I get an error&amp;quot;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ok, do you get an error on the STM side or the nRF51 side? Please elaborate.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/221026?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 10:36:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:683c961a-37c3-4d0e-a855-ea93f1e5a389</guid><dc:creator>Folny</dc:creator><description>&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;Exactly, I tried to add an &amp;#39;\ n&amp;#39; update to the STM32 boot code, but I get an error while updating.&amp;nbsp;I Have tested this modified code with FTDI usb and the update will succeed.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void Send_ACK(UART_HandleTypeDef *handle)
{
    uint8_t msg[2] = {ACK, &amp;#39;\n&amp;#39;};
    
    HAL_UART_Tx(handle, msg, 2);
}

/*! \brief Sends an NACKnowledge byte to the host.
 *  
 *  \param  *UartHandle The UART handle
 */
static void Send_NACK(UART_HandleTypeDef *handle)
{
    uint8_t msg[2] = {NACK, &amp;#39;\n&amp;#39;};
    
    HAL_UART_Tx(handle, msg, 2);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51822 and STM32 uart bootloader problem</title><link>https://devzone.nordicsemi.com/thread/220997?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 09:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5504b179-319f-48d3-85bd-8af1f9087cae</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Just to calrify: You have a STM32F sends UART commands to the nRF51 running the ble_app_uart example, which in turn sends these over BLE to a ESP32?&lt;/p&gt;
&lt;p&gt;I think that the ble_app_uart example expects the &amp;#39;\n&amp;#39; character to be received before sending the string received over UART on BLE.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>