Baseflight aka multiwii port to stm32

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

norem wrote:Out of curiosity do you recall which direction it ranaway ? north south west east ?

I just checked the map. Almost straight north. Maybe 5 - 10 degrees west of north.

io53
Posts: 10
Joined: Sun Jun 08, 2014 4:57 pm

Re: Baseflight aka multiwii port to stm32

Post by io53 »

How do you properly build baseflight? I'm using linux and arm-none-eabi-gcc. Just doing "make" builds and I got baseflight_NAZE.hex, it all looks fine but the file size is 218KiB while the "baseflight.hex" is only 168KiB. Am I missing something? I have not tried to flash it yet, so I cannot tell if it works or not.

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Baseflight aka multiwii port to stm32

Post by e_lm_70 »

io53 wrote:How do you properly build baseflight? I'm using linux and arm-none-eabi-gcc. Just doing "make" builds and I got baseflight_NAZE.hex, it all looks fine but the file size is 218KiB while the "baseflight.hex" is only 168KiB. Am I missing something? I have not tried to flash it yet, so I cannot tell if it works or not.


It is normal.

TimeCop use Keil compiler that is much more efficient on making code compared to open source compiler for ARM.

If you load the firmware in your board, it will just work fine ... maybe just a bit less efficient in CPU load / speed compared to Keil version.

io53
Posts: 10
Joined: Sun Jun 08, 2014 4:57 pm

Re: Baseflight aka multiwii port to stm32

Post by io53 »

e_lm_70 wrote:
io53 wrote:How do you properly build baseflight? I'm using linux and arm-none-eabi-gcc. Just doing "make" builds and I got baseflight_NAZE.hex, it all looks fine but the file size is 218KiB while the "baseflight.hex" is only 168KiB. Am I missing something? I have not tried to flash it yet, so I cannot tell if it works or not.


It is normal.

TimeCop use Keil compiler that is much more efficient on making code compared to open source compiler for ARM.

If you load the firmware in your board, it will just work fine ... maybe just a bit less efficient in CPU load / speed compared to Keil version.


That's lame. Guess I'll have to live with those extra KiB, ~900€ seems "a bit" steep for a hobbyist.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

You're not missing anything - and gcc target is generally tested by others, so it should build and work.
The only supported config tho is gcc-arm-embedded, other crap like codesourcery, yagarto, gnuwinarm or whatever, all those things have had problems, mostly libc/nanolib related.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

timecop wrote:You're not missing anything - and gcc target is generally tested by others, so it should build and work.
The only supported config tho is gcc-arm-embedded, other crap like codesourcery, yagarto, gnuwinarm or whatever, all those things have had problems, mostly libc/nanolib related.


Care to take a look timecop please?

viewtopic.php?f=8&t=2918&start=950#p53210

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Huh? I have no fucking idea what that means.
My code implements MSP_BOXIDS and MSP_STATUS stuff (correctly): https://github.com/multiwii/baseflight/ ... ial.c#L377

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Thanks for answer.

antix
Posts: 1
Joined: Mon Jul 14, 2014 8:37 am

Re: Baseflight aka multiwii port to stm32

Post by antix »

With July 12 version of baseflight I experienced the same problems with pitch control that Thorvald describes in the Naze32 thread: viewtopic.php?p=53330#p53330

When flying fast forward in acro mode I occasionally have erratic pitch control. In some situations quad will not pitch at all when given small pitch stick input and other times it will pitch much faster than expected for a small pitch stick input.

Pitch control is perfect when I remove the " || (abs(rcCommand[axis]) > 50)" condition from https://github.com/multiwii/baseflight/ ... /mw.c#L335

Condition was added with https://github.com/multiwii/baseflight/ ... a2052fR325
If this is meant to improve yaw, why is it applied for every axis?

crazylittle
Posts: 15
Joined: Mon Jun 25, 2012 1:27 am

Re: Baseflight aka multiwii port to stm32

Post by crazylittle »

I'm helping my brother build an octocopter with a DIY frame and naze32 board. Using FrSky D4r-II rx and PPM. Motors were all plugged in and tested for channel and direction (M1-6 on normal pins, 7-8 on CH5-6) but the copter flips over on takeoff. The board is facing the correct direction, and accel was calibrated.

Is the motor placement map in the manual correct for mixer OCTOX8 ?
(Is OCTOX8 the standard 8 motors in a circle?)

User avatar
Gaijin
Posts: 82
Joined: Sat Jan 14, 2012 8:00 am

Re: Baseflight aka multiwii port to stm32

Post by Gaijin »

Re-check the motor connection order and direction, sounds like the fc is applying power to what it thinks is the right motor to compensate for angle change and making the problem worse.

Have a think about it, all will make sense(although it's easier to get confused with an octo)

crazylittle
Posts: 15
Joined: Mon Jun 25, 2012 1:27 am

Re: Baseflight aka multiwii port to stm32

Post by crazylittle »

Motor placement matches the diagram in the naze32_rev3 PDF. Motors spin up in correct order on baseflight config motor test screen.

Image

crazylittle
Posts: 15
Joined: Mon Jun 25, 2012 1:27 am

Re: Baseflight aka multiwii port to stm32

Post by crazylittle »

crazylittle wrote:Is the motor placement map in the manual correct for mixer OCTOX8 ?
(Is OCTOX8 the standard 8 motors in a circle?)


Welp, this is the key here. NO, OCTOX8 is not the map listed in the diagram in the manual. That should be mixer "octoflatx" instead.

Nod to ReadError for catching that.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

antix wrote:With July 12 version of baseflight I experienced the same problems with pitch control that Thorvald describes in the Naze32 thread: viewtopic.php?p=53330#p53330

When flying fast forward in acro mode I occasionally have erratic pitch control. In some situations quad will not pitch at all when given small pitch stick input and other times it will pitch much faster than expected for a small pitch stick input.

Pitch control is perfect when I remove the " || (abs(rcCommand[axis]) > 50)" condition from https://github.com/multiwii/baseflight/ ... /mw.c#L335

Condition was added with https://github.com/multiwii/baseflight/ ... a2052fR325
If this is meant to improve yaw, why is it applied for every axis?


Thanks for catching this, it has been fixed.

Thorvald
Posts: 4
Joined: Mon Jul 14, 2014 4:17 am

Re: Baseflight aka multiwii port to stm32

Post by Thorvald »

Awesome Antix & TC, flashed tonight and tried it out, all fixed now.

Cheers
Tim

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

But GPS takes at least 5 minutes or more to get about 3 satelites. Version 30.4.2014 gets gps satelites in about 30seconds.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Due to removal of SBAAS thing, I need to hack that back in as an option.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

timecop wrote:Due to removal of SBAAS thing, I need to hack that back in as an option.


Please do and thank you. Question is, why as an option?

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

scrat wrote:
timecop wrote:Due to removal of SBAAS thing, I need to hack that back in as an option.


Please do and thank you. Question is, why as an option?


It affects lock time outside of europe.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Aha.

Thanks!

User avatar
Metroid
Posts: 16
Joined: Thu Apr 12, 2012 3:17 pm
Location: The Netherlands
Contact:

Re: Baseflight aka multiwii port to stm32

Post by Metroid »

Hello Timecop,

When does the integration of Hott telemetry changing settings, like in the MultiWii version, come to the stm32?
I have a grauper TX system and find it very use full if I can use the telemetry to setup the PID and other CLI stuff on the fly.
Currently I'm using a GR-12L on SUMD and the telemetry on soft serial (RC5 and RC6). This works perfect. Even to 12 channels with SUMD. Just nice for a cheap receiver.

Thank you.

GR. Rob.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

You're welcome to contribute the code to do it. I don't have such system and have no way of testing it.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

Metroid wrote:Hello Timecop,

When does the integration of Hott telemetry changing settings, like in the MultiWii version, come to the stm32?
I have a grauper TX system and find it very use full if I can use the telemetry to setup the PID and other CLI stuff on the fly.
Currently I'm using a GR-12L on SUMD and the telemetry on soft serial (RC5 and RC6). This works perfect. Even to 12 channels with SUMD. Just nice for a cheap receiver.

Thank you.

GR. Rob.


cleanflight has working HoTT telemetry, the code in baseflight is proof-of-concept and unflyable. TC hasn't backed ported my changes. Menus for HoTT is on my list of things to do but the port of cleanflight to the CC3D board is my current priority.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

scrat wrote:
timecop wrote:Due to removal of SBAAS thing, I need to hack that back in as an option.


Please do and thank you. Question is, why as an option?


already done in cleanflight, not hacked either - https://github.com/hydra/cleanflight/commit/fabd376

User avatar
Metroid
Posts: 16
Joined: Thu Apr 12, 2012 3:17 pm
Location: The Netherlands
Contact:

Re: Baseflight aka multiwii port to stm32

Post by Metroid »

dominicclifton wrote:
Metroid wrote:Hello Timecop,

When does the integration of Hott telemetry changing settings, like in the MultiWii version, come to the stm32?
I have a grauper TX system and find it very use full if I can use the telemetry to setup the PID and other CLI stuff on the fly.
Currently I'm using a GR-12L on SUMD and the telemetry on soft serial (RC5 and RC6). This works perfect. Even to 12 channels with SUMD. Just nice for a cheap receiver.

Thank you.

GR. Rob.


cleanflight has working HoTT telemetry, the code in baseflight is proof-of-concept and unflyable. TC hasn't backed ported my changes. Menus for HoTT is on my list of things to do but the port of cleanflight to the CC3D board is my current priority.

This would be great.

Thanks

DLArts
Posts: 5
Joined: Mon Aug 04, 2014 8:24 pm

Re: Baseflight aka multiwii port to stm32

Post by DLArts »

Hi,

i tried to use an external mag (HMC5883L) and baro (BMP180) with a Naze32 Acro (rev5), but I cannot get the BMP180 working with the latest version of baseflight, downloaded with the configurator.
The baro and the mag are soldered in series to the corresponding solder pads, the mag is behind the baro.
I tested two BMP180 modules with two different boards (both are Naze32 Acro rev5), but none is working.
I decided to test the BMP180 modules with an Arduino Nano V3 and both worked just fine.

I also tried the cleanflight firmware but same problem here. The mag is recognized but not the baro.

Anyone any idea, why it's not working or what I'm doing wrong?

Thanks for any answer.

P.S.: Here are some pictures of teh test wiring.
https://www.dropbox.com/s/3fuvygxl6bvzsu7/140804_DSC6006_2000px.jpg
https://www.dropbox.com/s/441poda865oxpoa/140804_DSC6011_2000px.jpg

DLArts
Posts: 5
Joined: Mon Aug 04, 2014 8:24 pm

Re: Baseflight aka multiwii port to stm32

Post by DLArts »

I tried to figure out the problem with the BMP180 and the Acro Naze32 v5 and I can limit the problem to the following lines:

drv_bmp085.c

Code: Select all

98: // Not supported with this frequency
99:    if (hse_value == 12000000)
100:        return false;


If I remove the code and compile it, the BMP180 is recognized and seems to be working.
In the "raw sensor output" of the configurator I can see changes depending of the altitude movement of the BMP180.

Based on this findings, I have some questions:
1) Why is the crystal clock 12MHz on my Acro Naze32 rev5 and on some other (where the BMP180/085 seems to work) it's not 12MHz ?
2) Why is the BMP085/180 not supported, if the crystal frequency is 12MHz? It seems to be working, but I don't know if it's working correct.

This was my first contact with STM32 source code and the depending toolchain, so I currently don't understand some minor/major parts of the code, especially when it's going to be hardware related.

With king regards,
DLArts

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

I guess you are not supposed to have a bosch baro sensor on N5?

DLArts
Posts: 5
Joined: Mon Aug 04, 2014 8:24 pm

Re: Baseflight aka multiwii port to stm32

Post by DLArts »

Crashpilot1000 wrote:I guess you are not supposed to have a bosch baro sensor on N5?

I'm not sure what you mean with N5, but I suppose you mean Naze32 rev. 5.
As you can see on the pictures, there is no baro soldered directly to the board.

It's just the BMP180 module and a HMC5883L module soldered to the SDL and SDA pads on the Acro Naze32.
The HMC5883L is always recognized, but the BMP180 is only recognized, if I disabeld the mentioned lines.

There is no modification, it's just as I received it from AbuseMark.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

You commented out what makes the BMP detection skip on naze5. Because the Naze5 in the full featured version just has MS5611 as option (older naze had BMP as well). So I guess TC didn't expect you to upgrade the acro Nz5 with an inferior BMP085 or BMP180. However you can tune the BMP085/180 for acceptable performance.

DLArts
Posts: 5
Joined: Mon Aug 04, 2014 8:24 pm

Re: Baseflight aka multiwii port to stm32

Post by DLArts »

OK,
but is there any problem, if I remove the mentioned lines and run the rev5 with a BMP180 module?

Maybe a CLI switch may be useful, to force the BMP085/180 baro detection to skip the rev5 recognition.
Than there is no problem for the user of a full features naze32 rev5 but everyone can upgrade a Acro Naze32 rev5 with a cheap BMP180.
Just activate the option with a CLI command and reboot.

A Acro Naze32 rev5 with a inferior baro is better than a Acro Naze32 rev5 without a baro ;-)

e_lm_70
Posts: 297
Joined: Fri Aug 09, 2013 8:35 pm

Re: Baseflight aka multiwii port to stm32

Post by e_lm_70 »

DLArts wrote:OK,
but is there any problem, if I remove the mentioned lines and run the rev5 with a BMP180 module?

Maybe a CLI switch may be useful, to force the BMP085/180 baro detection to skip the rev5 recognition.
Than there is no problem for the user of a full features naze32 rev5 but everyone can upgrade a Acro Naze32 rev5 with a cheap BMP180.
Just activate the option with a CLI command and reboot.

A Acro Naze32 rev5 with a inferior baro is better than a Acro Naze32 rev5 without a baro ;-)


There must be some recent change again in this area.

I have used BaseFlight with BMP180 time ago, and I did point out a problem, that has been address back in that time.
BMP180 is supported and autodetect, since this is included in the AfroMini32 board, that is the little bro of naze32.

At the moment at CLI level it is not possible to dictate which sensor has to be used BMP180 vs MS5611 ... both use the same i2c address ... and differentiation one from the other has been not a trivial task.

I'm not convinced about the advantages to have i2c auto-detection ... some CLI command done at the beginning could be a more reliable solution ... anyhow ... if you can hack the code it is not a big task to update the code ... but yes ... it is a pain to be repeated every time a new firmware version is out ...

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Baseflight aka multiwii port to stm32

Post by Crashpilot1000 »

I have to repost since my last post simply got lost *somehow*. No cli variable needed TC could fix the Bug and done.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

Yeah I already moved bmp initialization after 5611. There's nothing left to fix. It works on afromini cuz it's 8mhz. The reason BMP085 driver quits at 12mhz is because it was only used on > 1 years old hardware (and all of that ran at 8mhz), so it was disabled in the driver. Since BMP180 was code-compatible, the check should probably be removed for cheapasses who connect breakout boards :)

I'm not 100% against forcing sensor type by cli (already done for accel, for example), it just adds more hacky stuff, for marginal benefit (maybe 1-2 users :)

DLArts
Posts: 5
Joined: Mon Aug 04, 2014 8:24 pm

Re: Baseflight aka multiwii port to stm32

Post by DLArts »

@all Thanks for your answers.

I'm happy to know, that I can just remove the mentioned lines and everthing is working fine.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Just loaded latest BF version with BF Configurator...with alt hold improvement...now GPS get's satelites in about 1 minute and it is cold start. Thanks to all developers.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

just fixed three baseflight bugs in cleanflight, backport if you like:

https://github.com/hydra/cleanflight/co ... b2f56d9e78 - comparison of boxId is wrong baseflight
https://github.com/hydra/cleanflight/co ... e692472ecc - angle and horizon mode fight each other & aux settings could be used incorrectly.

https://github.com/hydra/cleanflight

viewtopic.php?f=23&t=5149

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

This post was made by dominicclifton who is currently on your ignore list. Display this post.

Or, you can just get fucked and keep your shit in your own thread where nobody cares about it.

41south
Posts: 28
Joined: Tue Jun 26, 2012 11:44 pm

Post by 41south »

Eloquently put as always TC :)

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: Baseflight aka multiwii port to stm32

Post by cGiesen »

timecop wrote:
This post was made by dominicclifton who is currently on your ignore list. Display this post.

Or, you can just get fucked and keep your shit in your own thread where nobody cares about it.


Answers like this, are the reason why I never fly Naze32 anymore.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

cGiesen wrote:Answers like this, are the reason why I never fly Naze32 anymore.


No worries, there's plenty of users who just want to fly to replace you.

DaggyMAC
Posts: 3
Joined: Sun Aug 31, 2014 2:33 pm

Re: Baseflight aka multiwii port to stm32

Post by DaggyMAC »

Which FW is better for GPS position hold and RTH, Baseflight or Clearflight? I have Afromini32 with BMP180 baro and waiting for Ublox GPS.

Second question - since I have to use PPM, how can I control Walkera G-2D brushless gimbal tilt from afromini32 board? Can I use also FPV video switch for switching FPV camera and GoPro from gimbal? I need to have 2 outputs from afromini board to control gimbal and cameras, so it is possible?

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

DaggyMAC wrote:Which FW is better for GPS position hold and RTH, Baseflight or Clearflight? I have Afromini32 with BMP180 baro and waiting for Ublox GPS.

Second question - since I have to use PPM, how can I control Walkera G-2D brushless gimbal tilt from afromini32 board? Can I use also FPV video switch for switching FPV camera and GoPro from gimbal? I need to have 2 outputs from afromini board to control gimbal and cameras, so it is possible?

None! Harakiri is the only Naze32 FW I know of to have a highly tuned PH and RTH

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

Question about GPS. Now I'm using uBlox NEO-6M and it works. If I buy uBlox MAX-7 will this gps work with BF fw?

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

scrat wrote:Question about GPS. Now I'm using uBlox NEO-6M and it works. If I buy uBlox MAX-7 will this gps work with BF fw?

With same/correct config it will. If it will work any better that's more uncertain.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

I think it will work better. This gps have better reception and will have more satellites.

strips
Posts: 163
Joined: Thu Apr 03, 2014 1:28 pm

Sv: Baseflight aka multiwii port to stm32

Post by strips »

scrat wrote:I think it will work better. This gps have better reception and will have more satellites.

A NEO 7 would be better a max 7 is probably better with an equal antenna. Take a look in the Harakiri thread. Mr-Fiero has done some testing on better antennas on NEO 6.

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Baseflight aka multiwii port to stm32

Post by scrat »

I saw his post. Interesting reading. So I'll stick to NEO 6 for now.

dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

Re: Baseflight aka multiwii port to stm32

Post by dominicclifton »

Hi guys!

I added the model diagram to the configurator Motor Testing tab, it's very useful to have it present when you're checking that the motors are wired up correctly.

diagram on motor tab.PNG


The code is here:

https://github.com/hydra/cleanflight-co ... 0b39a79a91

Since TC booted me out of the MultiWii developers group and blocked me from the Github repo for baseflight the side effect is that I can't also create pull requests for the configurator either. *sigh*. This means that someone will have to cherry-pick the commit the old-school non-pull-request way if they want it.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Baseflight aka multiwii port to stm32

Post by timecop »

This post was made by dominicclifton who is currently on your ignore list. Display this post.

Keep your spam limited to your own thread, kthxbai

Post Reply