Basic Boot Mode Questions
Posted:
Mon Jan 02, 2017 5:09 pm
by fsa317
I'm trying to understand the various boot modes and how development boards work. My thought was that the "regular" mode runs whatever code has been loaded and that the programming mode would be needed to update the code. However on my development board it appears that I can load new code over USB without changing modes. Nothing is broken or not working, but I don't fully understand how the development board differs from the basic module and I'd like to better understand it.
Thanks
Re: Basic Boot Mode Questions
Posted:
Mon Jan 02, 2017 9:35 pm
by rudy
Your development board has additional USB pins that are used to cause a reset condition and to force a mode state change.
I am only using RX and TX from my USB to serial converters. So when I need to reset my board I have to physically push a switch connected to the reset line.
If I want to get into programming mode I first have to set D0 low and then perform a reset. I typically have a latching push button switch on D0. I then push the momentary switch on the reset line. Then I select the compile button on the IDE interface. (I use Arduino IDE)
Your setup is more convenient, but it is doing the same steps through the IDE in combination with additional hardware on the development board.
For the board to run with the user code in flash the D0 must be high, D2 must be high, and the D15 must be low at reset time.
In order to get into the code loader program D0 must be low, D2 must be high, and D15 must be low at reset time. After the new code is loaded the loader routine then executes the new code. It doesn't do a new reset. It ignores the state of D0, D2, and D15.