<?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>Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27097/error-uploading-app-thru-optiboot-ble-and-nrf-toolbox</link><description>I am trying to use optiboot-ble with the nRF8001 and an atmega328p to allow application update over bluetooth. I have successfully compiled the bootloader and flashed it to the microcontroller. I have loaded the uart project with dfu from the SDK onto</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Jun 2017 22:48:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27097/error-uploading-app-thru-optiboot-ble-and-nrf-toolbox" /><item><title>RE: Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/thread/106581?ContentTypeID=1</link><pubDate>Wed, 07 Jun 2017 22:48:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f189b9c-8d15-4979-9c86-197333904794</guid><dc:creator>dlip</dc:creator><description>&lt;p&gt;If you want me to I can add the issues in the github repos if it is helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/thread/106580?ContentTypeID=1</link><pubDate>Wed, 07 Jun 2017 22:20:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d736586c-39b4-41c5-8ef0-7af39d34f46b</guid><dc:creator>dlip</dc:creator><description>&lt;p&gt;David - thanks for the help - this is working now.  I think I found a couple additional problems / errors under some conditions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;During the watchdog reset into the bootloader rdyn and the reset lines are tri-stated.  This seemed to cause problems for me locking up the nrf8001 even after I added an external pull-up on rdyn (didn&amp;#39;t do anything with the reset).  To get around this I decided to just jump from the application directly into the bootloader - rather than reset into it.&lt;/li&gt;
&lt;li&gt;In the bootloader_data_store procedure in the nordic ble sdk the following line:
for (uint8_t i = 0; i &amp;lt; sizeof(pipes); i++) stores the incorrect number of bytes for the pipes because it is taking the sizeof the local uint8_t *pipe which is 1.  This causes the ble-optiboot to read the incorrect values for the second and third pipes and thus it never progressed to the uploading of the app image stage.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/thread/106579?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 11:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed9ab0a5-f19f-4ba4-b048-cee438713403</guid><dc:creator>dlip</dc:creator><description>&lt;p&gt;Hardware: We are doing testing with a Tinyduino &lt;a href="https://tinycircuits.com/products/tinyduino-processor-board"&gt;tinycircuits.com/.../tinyduino-processor-board&lt;/a&gt; and a tinyduino ble module &lt;a href="https://tinycircuits.com/products/bluetooth-low-energy-nordic-tinyshield."&gt;tinycircuits.com/.../bluetooth-low-energy-nordic-tinyshield.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Software: We are using ble-optiboot compiled for the Atmega328P 8mhz used on that board.  We have both our own code which uses the nrf8001 and the ble UART project with DFU functioning perfectly except for the DFU portion.  All testing I&amp;#39;m currently doing is using the UART project.&lt;/p&gt;
&lt;p&gt;I do not have an UNO board that I can test on at this time.&lt;/p&gt;
&lt;p&gt;I have confirmed that once in the bootloader rdyn never goes low.  If I prevent the bootloader jump - I see the following in serial debug:
Jumping to bootloader
E6 :6, 8C, 8, 2A, B, 0, 0,
Pipe Number: 8
E3 :3, 84, F, 83,
ACI Command F
Evt Cmd respone: Status 83&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/thread/106578?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 08:29:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3ab95af-42df-4c9b-b784-8c3a6a44f079</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;You can add an issue in the github repo. You can also add a pull request for a fix. However I think we should get it working first.&lt;/p&gt;
&lt;p&gt;Questions:
What hardware are you using ?
What is the software version you are using ?
Have you been able to get the &lt;a href="https://github.com/NordicSemiconductor/ble-sdk-arduino/tree/master/libraries/BLE/examples/ble_uart_project_with_dfu_template"&gt;ble UART project with DFU&lt;/a&gt; working without the DFU part ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is to verify that you have the pin information correctly setup.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;=
Can you test this on an Arduino UNO board and update me ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/thread/106577?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2017 19:52:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8c6e8d1-9b03-4cb3-b2c6-2e745fa584fc</guid><dc:creator>dlip</dc:creator><description>&lt;p&gt;Android version not working for me either with those settings. Once in the bootloader I never receive any aci events or command and so always return imediately from ble_update here: if (!lib_aci_event_get(&amp;amp;aci_state, &amp;amp;aci_data)) { return; }&lt;/p&gt;
&lt;p&gt;Also it appears rdyn is always high because radio never gets reset in lib_aci_init here: if (!hal_aci_tl_rdyn()) { lib_aci_radio_reset(); }&lt;/p&gt;
&lt;p&gt;Any idea why this would be?&lt;/p&gt;
&lt;p&gt;FYI I think I did find a small error in ble_optiboot with the clock division setting:&lt;/p&gt;
&lt;p&gt;In m_spi_init() of hal_ac_tl.c the spi control register is set as follows: SPCR |= _BV(SPE) | _BV(DORD) | _BV(MSTR) | _BV(SPI2X) | _BV(SPR0);&lt;/p&gt;
&lt;p&gt;SPI2X is in the SPSR register and both SPI2X and SPR0 are defined as 0 so it&amp;#39;s redundant to include them both anyway. SPSR register should have the SPI2X bit set to to achieve div 8. As set it is div 16 which probably isn&amp;#39;t a problem for most people.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error uploading app thru optiboot-ble and NRF toolbox</title><link>https://devzone.nordicsemi.com/thread/106576?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2017 12:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e9ddd24-1667-421a-ba81-b7cbd4adbd18</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;Suggestions:
Use the bootloader hex file as attached in the release in github.
nRF toolbox android version (I used only the Android version):&lt;/p&gt;
&lt;p&gt;Settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set the MBR size to zero&lt;/li&gt;
&lt;li&gt;External MCU DFU to ON&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additional comments, I have never used the iOS app for testing this so I suggest that the android one is use for verifying that it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>