Closed jstremmler closed 7 years ago
@giacomo892 Thanks!
Ok finally I applied revert 0f63bc6 with iNav 1.2.1 and it works! Here is my status and bootlog:
@jstremmler what did your log look like before the revert?
@digitalentity: Here ist the status and bootlog right after flashing downloaded iNAV 1.2.1. NAZE.hex file from github:
@jstremmler very interesting. Looks like 0f63bc68575f3ff03e5db5819f8e815545b334ea has nothing to do with the issue. It's mag detection that fails and that commit has nothing to do with detection - it only affects MAG init. Something to think about. Can you also try the latest "development" branch?
Ho hum, development: https://github.com/iNavFlight/inav/pull/624#event-797558017. Interesting to see what happens here.
@stronnag Yeah, I mentioned it. But it only shows correct number of I2CErrors...
I think it's somehow related to busy-loop delays in I2C driver. We need to change them to use proper timings instead of arbitrary empty loops that might be optimised out by the compiler.
I just cloned the iNav.git file again because I had modified files compass_hmc5883l.c, logging_codes.h and logging.c before. Next I compiled NAZE.hex again and flashed the firmware.... And it worked as well: So now I have a downloaded NAZE.hex file from github which doesn't detect the magnetometer correctly and a self-compiled one from the actual development which works..... Do we have an explanation??
And which compiler version are you using?
I wrote before: cygwin64, latest version......
which helps no one .... the actual compiler version please.
arm-none-eabi-gcc --version
Version is CYGWIN64 (2.874) Have a look here: https://www.cygwin.com/ and here : https://cygwin.com/ml/cygwin/2016-06/msg00064.html
When I was investigating the cleanflight/cleanflight#2310, timings for normal cycles were okay, but I became aware of cleanflight/cleanflight#2272 also.
And, was there a build environment change recently? I was forced to download 5.4 toolchain.
You can use whatever tool chain you like, e.g arm-none-eabi-gcc 6.2.0 works well for me; that was what I was (futility) attempting to determine, as arm-none-eabi-gcc 5.x has not generated good results for me.
So, as up to now we have no explanation, let me do a speculation:
Can this be an issue of different compilers by which we produce the hex code???
Actually yes. Build 1.2.1 was by my mistake compiled using gcc-5.4.1 which might explain the ill behaviour.
@jstremmler can you check the latest development
branch? We've made a fix to I2C driver
I'm closing this. We don't hear about mag problems for a while now. Feel free to re-open if issue persists.
it work for me https://youtu.be/9Es1NzxLyWE
When I install iNav 1.2.0 stable on a Naze Rev6 7DOF, ( e.g. this one: https://www.aliexpress.com/item/New-Arrival-REV6-NAZE32-7DF-Flight-Controller-For-RC-Multirotors-Baseflight-Configurator/32596170179.html?spm=2114.01010208.3.1.23mz9A&ws_ab_test=searchweb201556_0,searchweb201602_1_10065_10068_112_10069_110_111_10017_109_108_10060_10061_10062_10057_10056_10055_10037_10054_301_10033_10059_10032_10058_10073_10070_10052_10053_10050_10051,searchweb201603_3&btsid=a1c262fc-710c-4580-8969-2101bcbb86b0 ) which has a barometer BMP 280 but no magnetometer installed an external magnetometer sitting in my GPS is no longer recognized.
Is there any reason why the external mag is not shown anymore?
My own compiled NAZE.hex file (RC4) from 08.28.2016 shows my external magnetometer HMC5883 correctly.....