-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed to load bootloader header! error with new esp32 lib/ide 1.8.2 #9
Comments
Hi Kris, Reopened since the new ESP32 core seems to be conflicting with the board. Its opened as Issue #342 on the ESP32 GitHub site. Not sure if you are seeing this same problem. Mike |
Hi Kris, Think this is now fixed, at least with the latest changes on GitHub. But I am running into another problem, not sure if it is associated with the bootloader. I press the boot button and press and then release the reset button. Everything seems to upload no errors. But when I press and release the rst button again to put in run mode the sketch doesn't seem to run. Tested it on my sketch, then the blink sketch with ledpin on 5 and a couple of others Any idea? |
Yes, the latest core fixes whatever problems we were having flashing new
sketches.
I haven't run into this problem before. Are you sure the device is out of
boot mode? Check the voltage on SDA (GPIO0), it should be 3V3 for normal
running. I am assuming you checked the obvious like using enough power,
turning on and off, etc.
Presumably it used to work; now all of a sudden it doesn't? Did you choose
4 MByte flash, DOUT for flashing?
…On Mon, Dec 18, 2017 at 4:06 PM, Mike S ***@***.***> wrote:
Hi Kris,
Think this is now fixed, at least with the latest changes on GitHub. But I
am running into another problem, not sure if it is associated with the
bootloader. I press the boot button and press and then release the reset
button. Everything seems to upload no errors. But when I press and release
the rst button again to put in run mode the sketch doesn't seem to run.
Tested it on my sketch, then the blink sketch with ledpin on 5 and a couple
of others
Any idea?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1quqzkE93IjHfbVY-io5xT8JTsULDks5tBv4dgaJpZM4NLuTD>
.
|
Thanks for reminding me about this. They added your board to dropdown list of boards in boards managed. So I went back in and checked to see the setup for the board. 4MB was correct, but it was set at DIO. I changed it DOUT and it reset into run mode and the blink sketch started working. Will give the other sketches a try to make sure they work and will let you know. I will post an issue on the esp32 GitHub so they get it fixed once I check it all out. Thanks _UPDATE (10:34pm EST):
Something is wrong but I am at a loss. I did measure the voltage on GPIO0 (SDA) and it was at 3.29v on my multimeter. Tried recycling power, hitting reset, redid the wiring. Everything is being powered off of the USB. The only thing I haven't tried is swapping the cable but it worked fine on the T3.5 tests. Any recommendations would be appreciated. UPDATE:12/19/17 No joy on the power - same thing is happening when I separately power the sensor. Mike_ Note: I did test the MS5637 separately and it works fine. I2c scanner recognizes the 9250, but whoami fails. Also, if I bypass the whoami test the magnetometer is recognized as well as the pressure sensor. Accel and gyro shows zero. |
Hi Kris, I am beginning to think that the issue is with I2C with the ESP32 Core. I extracted and ran the following code on a T3.5 and it worked fine. It identified the WhoIAm correctly. Same code on the ESP32 board failed WhoIAm test. I did a little digging and it is almost reminiscent of Issue #90 that you opened up on the Arduino-ESP32 core library. There was another issue with I2C but it was fixed - espressif/arduino-esp32#834
|
Don't you have to specify which pins you want to use for I2C with the ESP32?
…On Wed, Dec 20, 2017 at 11:59 AM, Mike S ***@***.***> wrote:
Hi Kris,
I am beginning to think that the issue is with I2C with the ESP32 Core. I
extracted and ran the following code on a T3.5 and it worked fine. It
identified the WhoIAm correctly. Same code on the ESP32 board failed WhoIAm
test. I did a little digging and it is almost reminiscent of Issue #90
<espressif/arduino-esp32#90> that you opened up
on the Arduino-ESP32 core library. There was another issue with I2C but it
was fixed - espressif/arduino-esp32#834
<espressif/arduino-esp32#834>
#include "Wire.h"
#define MPU9250_ADDRESS 0x68 // Device address when ADO = 0
#define WHO_AM_I_MPU9250 0x75 // Should return 0x71
void setup()
{
Serial.begin(115200);
delay(4000);
Wire.begin(400000); //(SDA, SCL) (21,22) are default on ESP32, 400 kHz I2C clock
delay(1000);
// Set up the interrupt pin, its set as active high, push-pull
pinMode(5, OUTPUT);
digitalWrite(5, LOW);
I2Cscan();// look for I2C devices on the bus
delay(1000);
// Read the WHO_AM_I register, this is a good test of communication
Serial.println("MPU9250 9-axis motion sensor...");
uint8_t c = readByte(MPU9250_ADDRESS, WHO_AM_I_MPU9250); // Read WHO_AM_I register for MPU-9250
Serial.print("MPU9250 "); Serial.print("I AM "); Serial.print(c, HEX); Serial.print(" I should be "); Serial.println(0x71, HEX);
}
void loop() {
// put your main code here, to run repeatedly:
}
// simple function to scan for I2C devices on the bus
void I2Cscan()
{
// scan for i2c devices
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
else if (error==4)
{
Serial.print("Unknown error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
}
uint8_t readByte(uint8_t address, uint8_t subAddress)
{
uint8_t data = 0; // `data` will store the register data
Wire.beginTransmission(address); // Initialize the Tx buffer
Wire.write(subAddress); // Put slave register address in Tx buffer
Wire.endTransmission(false); // Send the Tx buffer, but send a restart to keep connection alive
Wire.requestFrom(address, 1); // Read two bytes from slave register address on MPU9250
data = Wire.read(); // Fill Rx buffer with result
return data; // Return data read from slave register
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qh7onkMvULJLB3-u4W3qxE3MNF9lks5tCWcdgaJpZM4NLuTD>
.
|
I did that when I ran it on the ESP32. The code I posted was the T3.5 version. Sorry, should have been clearer. |
So you are saying you don't get the correct result on the ESP32? I haven't
tried for a while but last time I did it worked fine...
…On Wed, Dec 20, 2017 at 12:09 PM, Mike S ***@***.***> wrote:
I did that when I ran it on the ESP32. The code I posted was the T3.5
version. Sorry, should have been clearer.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qqnRMBRFrgb4Xb2gKgaIjK-HUo7Zks5tCWlhgaJpZM4NLuTD>
.
|
Yep. Just changed the board to the esp32 dev board so I could change the core debug level and here is the error for reading the whoiam register:
|
I'll try it later today...
…On Wed, Dec 20, 2017 at 12:17 PM, Mike S ***@***.***> wrote:
Yep. Just changed the board to the esp32 dev board so I could change the
core debug level and here is the error for reading the whoiam register:
MPU9250 9-axis motion sensor...
[W][esp32-hal-i2c.c:235] i2cWrite(): Ack Error! Addr: 68
[W][esp32-hal-i2c.c:334] i2cRead(): Ack Error! Addr: 68
MPU9250 I AM FF I should be 71
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qg3ixXTUmLUB06aEOBVyIbaWjiGJks5tCWtdgaJpZM4NLuTD>
.
|
I am using a git pull from a few days ago but didn't see anything in the new commits that would affect I2C. |
I am always reluctant to use the latest core just for this reason... Mine
is a pull from two months ago or so..
…On Wed, Dec 20, 2017 at 12:24 PM, Mike S ***@***.***> wrote:
I am using a git pull from a few days ago but didn't see anything in the
new commits that would affect I2C.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qtXteiDMOvN2Y8GW_NrBafFVqNk3ks5tCW0agaJpZM4NLuTD>
.
|
Just as a FYI I just tested the BNO055 and that appears to work as well as the BME280. As for the pull - was looking for the link to latest release but for reason couldn't find it so I used the latest core pull. |
How could the BNO055 work but the MPU9250 not? This doesn't make any kind
of sense...
…On Wed, Dec 20, 2017 at 1:16 PM, Mike S ***@***.***> wrote:
Just as a FYI I just tested the BNO055 and that appears to work as well as
the BME280. As for the pull - was looking for the link to latest release
but for reason couldn't find it so I used the latest core pull.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qm3loflfYY3K10phwGLCfUvjhTx-ks5tCXkugaJpZM4NLuTD>
.
|
Sure you have pullups on the MPU9250 board?
…On Wed, Dec 20, 2017 at 1:17 PM, Kris Winer ***@***.***> wrote:
How could the BNO055 work but the MPU9250 not? This doesn't make any kind
of sense...
On Wed, Dec 20, 2017 at 1:16 PM, Mike S ***@***.***> wrote:
> Just as a FYI I just tested the BNO055 and that appears to work as well
> as the BME280. As for the pull - was looking for the link to latest release
> but for reason couldn't find it so I used the latest core pull.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#9 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AGY1qm3loflfYY3K10phwGLCfUvjhTx-ks5tCXkugaJpZM4NLuTD>
> .
>
|
For your board no pullups (thought there were onboard 4.7k's), on the DIYMALL 9250 board there are 4.7k pullups on the sda/scl lines already. Both are behaving exactly the same. |
Yes, you are right, no sensor board pullups required. Maybe the DIYMall
board is junk...
…On Wed, Dec 20, 2017 at 4:02 PM, Mike S ***@***.***> wrote:
For your board no pullups (thought there were onboard 4.7k's), on the
DIYMALL 9250 board there are 4.7k pullups on the sda/scl lines already.
Both are behaving exactly the same.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qseioQb3hBq0DvVrS7nfeRWqveqBks5tCaAHgaJpZM4NLuTD>
.
|
Tried both boards with a T3.5 and they worked - along with a couple different versions of a 9250 library. That's one of the first thing I tried. Going to add 4.7k's to your board and see what happens I have the mini version and it looks like I am suppose to solder the back side to activate the 4.7k's? |
Shouldn't need them for my Mini MPU9250 board, but if you want them then it
is the top dolder jumper that need to be soldered. You do have solder the
back if you want to supply 3V3 and GND from the side rather than top PTHs.
Did you verify that on the DIYMall MPU9250 board SDA and SCL show 3V3?
I just don't understand how the BNBO055 will ACK on a general address call
but the MPU9250 won't. Doesn't make sense...
…On Wed, Dec 20, 2017 at 4:06 PM, Mike S ***@***.***> wrote:
Tried both boards with a T3.5 and they worked - along with a couple
different versions of a 9250 library. That's one of the first thing I
tried. Going to add 4.7k's to your board and see what happens I have the
mini version and it looks like I am suppose to solder the back side to
activate the 4.7k's?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qkVuRBu27zJXRHl-BRDuGzGo8vo5ks5tCaEOgaJpZM4NLuTD>
.
|
You may want to check this issue out: espressif/arduino-esp32#834 Maybe makes more sense to you. |
wtf!
I thought I2C was "fixed" on the ESP32 but this looks like a can of rotten
worms. I guess this validates my decision to wait a few months before even
trying to use the ESP32 for anything serious.
I do know that I had to use the clock stretching on the ESP8285 for reading
the CAM M8Q via I2C. But other than that, I haven't encountered this wierd
problem (or at least for a long time) with the espressif wire API
…On Wed, Dec 20, 2017 at 4:14 PM, Mike S ***@***.***> wrote:
You may want to check this issue out: espressif/arduino-esp32#834
<espressif/arduino-esp32#834>
Maybe makes more sense to you.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qhi-Zb9dDIYxXtbRe0A_8loNp8FDks5tCaLfgaJpZM4NLuTD>
.
|
Yeah, I know I saw you issue #90 for the ESP32. It looks like they changed the wire API about a month or so ago to try and resolve more issues, but looks like broke it at least for the 9250 or 6050 (will have to test it later). Think I read in the thread that they are saying that those boards are special cases :( - yeah I know. Think I should go ahead and generate an issue for them :) Have to dig up my old version of the core - think I have it on a hard drive somewhere. |
If the MPU9250 and MPU6050 are Wire.h special cases then the ESP32 system
layer is in worse shape than I thought...
I fear the ESP32 won't be ready for prime time for a while yet...
…On Wed, Dec 20, 2017 at 4:28 PM, Mike S ***@***.***> wrote:
Yeah, I know I saw you issue #90 for the ESP32. It looks like they changed
the wire API about a month or so ago to try and resolve more issues, but
looks like broke it at least for the 9250 or 6050 (will have to test it
later). Think I read in the thread that they are saying that those boards
are special cases :( - yeah I know. Think I should go ahead and generate an
issue for them :)
Have to dig up my old version of the core - think I have it on a hard
drive somewhere.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qmVaX0uyqppPzrt2CrT9zVCoAx9vks5tCaYYgaJpZM4NLuTD>
.
|
Ok. Dug out my old copy from around Feb of this year works fine for the 9250. |
If you are going to post an issue, maybe you could suggest they go back to
this previous version and un-fix (fubar) the Wire.h library.
…On Wed, Dec 20, 2017 at 4:55 PM, Mike S ***@***.***> wrote:
Ok. Dug out my old copy from around Feb of this year works fine for the
9250.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qkibQQ7Eyv16Tv6mjtij49gN8DPwks5tCaxlgaJpZM4NLuTD>
.
|
Planning on it. Was just waiting to here your opinion. :) |
Ok here is the issue I posted, if you want to add for it: espressif/arduino-esp32#937 |
Well done!
Nothing for me to add here.
It will be a good test of Espressif's commitment to the ESP32 Arduino IDE
since with this kind of buggy API the ESP32 is basically useless.
…On Wed, Dec 20, 2017 at 5:22 PM, Mike S ***@***.***> wrote:
Ok here is the issue I posted, if you want to add for it:
espressif/arduino-esp32#937
<espressif/arduino-esp32#937>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qgq7AypJKc_riwfkNSx63xiN1nhCks5tCbLkgaJpZM4NLuTD>
.
|
Hope me-no-dev works this. He seems to have a good handle on what's going on. |
Yes, he fixed Wire.h last time. Too bad they chose to fix it again!
…On Wed, Dec 20, 2017 at 5:45 PM, Mike S ***@***.***> wrote:
Hope me-no-dev works this. He seems to have a good handle on what's going
on.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qlkVsQs1lVaBhgwb19uH0TqX9Fg3ks5tCbghgaJpZM4NLuTD>
.
|
Think I isolated to when the problem started - it was when they incorporated the commit for long I2C reads. I posted what I found so maybe that is a starting point for them. |
See issue 90 for problem and how to fix it. Have to read 2 bytes. Was your original issue back in Dec 2016. Merry christmas. |
I thought they fixed this...
…On Sun, Dec 24, 2017 at 5:11 PM, Mike S ***@***.***> wrote:
See issue 90 for problem and how to fix it. Have to read 2 bytes. Was your
original issue back in Dec 2016.
Merry christmas.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qpBmsoU2zD8Q541hQAD5Fk1odegJks5tDvY-gaJpZM4NLuTD>
.
|
Kris. From what I can see it was fixed until they added support for long i2c addressimg. On a hunch I went ahead and tried the two byte read in issue 90 and it worked. There long addressing broke it. Now it's up to them to fix it I guess. Just wanted to let you know. |
Thanks Mike. I forgot about this issue and it was fun to read what was
going on a year ago. Sad that they are still having trouble with the
basics. As far as I know BLE doesn't work well yet either. I guess creating
a functioning Arduino core for the ESP32 is harder than people expected,
but I haven't been using the ESP32 since this initial bit of work as I have
been waiting for a bit of maturity, but apparently it is still not ready
for prime time. I hope they get there soon though, since the concept is a
good one.
Anyway, I hope you told espressif too, since I would expect me-no-dev could
fix it again somehow...
…On Sun, Dec 24, 2017 at 6:32 PM, Mike S ***@***.***> wrote:
Kris. From what I can see it was fixed until they added support for long
i2c addressimg. On a hunch I went ahead and tried the two byte read in
issue 90 and it worked. There long addressing broke it. Now it's up to them
to fix it I guess. Just wanted to let you know.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGY1qgOZkAo2KDK_hIFw8wY0MdPqmL68ks5tDwkrgaJpZM4NLuTD>
.
|
Yes I did in the same issue that I opened up. I referenced issue 90 (even gave them the link) and mentioned that me-no-dev fixed it. They will get around to it eventually. Think they are working on a new i2c/wire wrapper - me-no-dev is involved with that one. Can't wait for the ble support for the Arduino library. Like you said still immature in a lot of respects. Can't blame them - there's a lot there. |
Getting error message using ide 1.8.2 and new version of esp32 library. Something about magic number. I reported under issue 334, espressif/arduino-esp32#334
The text was updated successfully, but these errors were encountered: