understanding mysbootloader background to get working FOTA



  • Hello,

    I try to get running the nice FOTA feature (I love it to use on ESP32). I have a pro mini 8MHz 3.3V node with NRF24L01+. Sometimes I get an sucessful upload of a new sketch and sometimes it takes very long time (over 5min) or it takes long time until myscontroller finds the node. I have the feeling that there are some corners where I could or was turned in the false direction. It resulted in several long nights...

    I have 4 topics in mind to the problem:

    1. github repo
      Shall I use the the development branch for mysbootloader on github? I wanted to avoid compiling the bootloader and only use the ready hex-files because I'm shure that I trip in some pitfalls. I read somewhere that with development branch it is still possible to use serial upload and with main branch not.
      Gernerally I could live with main branch but there is only one hex-file and I do not know for which HW it is. And then there is a third branch UpdateBoardFiles. I did not understand for what it is.
    2. two 8MHz Versions
      I noticed that there are two 8MHz hex-Files and Entries. I took the NRFduino because the fuses are similar to normal pro mini. Is it the right one?
    3. fuses
      I noticed that in all 4 entries the extended_fuses=0x06. This is completely another value than in the "normal" pro mini bootloader. I had a look at the atmega328P data sheet and saw that only 3 lower bits are defined for brown out feature and these combination of the lower 3 bits is reserved. Is there any reason for that?
    4. time until sketch is started
      I wrote a simple blink sketch (with using millis for delay - my first pitfall) and later with deactivating watchdog (second pitfall). Now I wonder because of long (10s-1min) and various time until the sketch is started. I could isolate a little bit: If I cut the SCLK connection to to NRF it starts instantly. Without NRF and only powered with 2xAA cells too. Yes I understand that the bootloader has to check for a message from controller but why with a variable time although I have not a switched on/powered GW?
      As another cause I found the serial/USB connection. If I power the node via a TTL/USB Converter at an Windows USB port (to read serial outputs) it also takes long time to start. If I plug these vehicle to an USB powerbank it starts instantly too.
      Is these behave explainable?

    Many thanks for some helpfull hints in advance!
    Uwe


Log in to reply
 

Suggested Topics

  • 3
  • 10
  • 3
  • 24
  • 15
  • 1

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts