LibrePilot Forum

Development => Firmware General => Topic started by: mr_w on January 12, 2017, 01:01:39 pm

Title: F3 based flight controller firmware support
Post by: mr_w on January 12, 2017, 01:01:39 pm
Beecore (and also another one that is used on Eachine QX70) is based off SPRacing F3_EVO platform, and all the basic hardware features do work. Hardware drivers that are not implemented yet are led strip ir transponder, sonar, buzzer and sdcard logging. On the firmware side, F3 support is more like F4 board than F1, so even gps navigation flight should be possible.

Flight controller boards that do work so far:

Install instructions:

For SPRacingF3 EVO, PikoBLX and tinyFISH FC which have full USB connectivity (unlike older non-evo spracingf3), one should first build bootloader in hex format.

Code: [Select]
make bl_spracingf3evo_hexor
Code: [Select]
make bl_pikoblx_hex
That will give fair amount of output, ending with line
Code: [Select]
BIN/HEX     ...../build/firmware/bl_pikoblx/bl_pikoblx.hex
This is full path to .hex file which is good for flashing with Cleanflight or Betaflight configurator. This is easiest way. After flashing the bootloader, CF/BF configurator will not connect to the board anymore. Time to use LP GCS: Disconnect your F3 board, hit 'Upgrade' button on Firmware tab and follow instructions.

The branch with F3 support, which is work-in-progress, currently being reviewed for merge in next can be found at https://bitbucket.org/mindnever/librepilot/branch/LP-512_Support_F3_boards

Update May 30, 2017:
- again new branch name (sorry), now accessible from pull-request: https://bitbucket.org/librepilot/librepilot/pull-requests/426 or as directly here https://bitbucket.org/mindnever/librepilot/branch/LP-512_Support_F3_boards
- tinyFISH FC board support

Update: April 28, 2017:
- New branch name - it is now https://bitbucket.org/mindnever/librepilot/branch/LP-512_F3_board_support
- PikoBLX board support
- Fixed PPM input on SPracingF3 EVO
- Merged in newest next
- Merged in DSHOT support
- Merged in LP-480
- make package builds all boards again

Update: March 16, 2017:
- WS2811 led strip driver is now included (Betaflight port ;)). Notifications are the same as on F4 boards (Revo, Sparky2) [ https://librepilot.atlassian.net/wiki/display/LPDOC/Setup+WS281x+Led - with exception that configuration is not HWSettings > WS2811LED_Out, but rather HWBoardNameSettings -> LEDPort ]
- make package will build package with F3 firmware only

Update: March 01, 2017:
I have pushed some updates in F3 branch (which is still work in progress, but getting tested daily):

- ADC driver, so reading analog voltage/current/rssi sensors is now possible.
- Fix for settings save error / hang.
- Fix for usart initialization error that prevented some protocols from working (for example MSP for osd, etc).
- Fix for usb cdc (virtual com port) baud rate negotiation - so ComBridge is now working again.
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 12, 2017, 07:57:56 pm
That's great!  I was considering doing this myself as I have built several SP F3 brushed micro quads and wanted to run Librepilot.  If you can use any help testing or anything let me know.  I several SP F3 variants on hand.

Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 13, 2017, 12:24:44 pm
@jcoffman98

EVO versions are easier to work on, as they have USB port attached directly to F3, and it works with GCS just like any other LP supported board. non-evo has USB-UART bridge and fw updating is trickier - currently not possible from GCS. Also, it seems that currently non-evo have slightly higher cpu load than EVO boards, which might be due to different connection being used for gyro/acc connection. (EVO uses spi and non-evo i2c).
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 13, 2017, 11:09:05 pm
Hello,

I have both the brushed EVO and none EVO.  I was going to try the EVO version first.  So I've built the evo firmware and bootloader  from your branch.  I am not clear on how to reflash this since it had cleanflight on it originally.  I've searched around and found some instructions that use the STM32 flash demonstrator but this board comes up in DFU mode and it appears I need another tool.  I am new to STM uC's so I am muddling through it.  What is the best procedure to flash this board?

Thanks
Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 13, 2017, 11:12:24 pm
Best thing is to get dfu-util and then use it to flash .bin file to "Internal Flash" section.

For initial flash of the bootloader (and rest of it), do make ef_spracingf3evo
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 13, 2017, 11:48:44 pm
I was just trying this:

https://forum.librepilot.org/index.php?topic=208

I installed the boot loader and it appears to come up at least the activity light is on.  Getting there I think.  Once the bootloader is flashed, I should be able to use gcs to install the fw?  I assume there is a new board ID or somthing so will need to build gcs out of your branch?

Thanks for your help

Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 14, 2017, 12:15:00 am
Flashing only bootloader should work, but for a reason or two, this probably won't work as expected, yet ;) You will be better with flashing entire flash image (make ef_spracingf3evo), but after you get it running (familiar blinking led), GCS should connect just fine and you'll be able to update via GCS.

Title: Re: Re: TinyPilot F3?
Post by: DocHardinger on January 14, 2017, 12:36:08 am
i got everything working...but got still problems with output...used channel 1-4 with 32Hz (cause cleanflight uses a value of 32000), but when i connect battery, motors starts spinning, even if i put 500us to the output...any ideas? Do i need some special config? Different channels?
Another problem is that ATTI is red...

board is SPRacing F3 EVO Brush...
Title: Re: Re: TinyPilot F3?
Post by: hwh on January 14, 2017, 12:40:21 am
jcoffman98  since you mentioned CleanFlight I thought I'd pass on another tip.  For boards that go into DFU the CF configurator will flash anything on the board if you have a hex file.  So does the BetaFlight one.  For bin files I often use the RaceFlight configurator since unlike the other two it flashes bin files instead of hex. I use them to flash boards back and forth to different project's firmware all the time.

If you don't have the right format file (hex or bin) it's easy to convert between them.
Code: [Select]
arm-none-eabi-objcopy -I binary -O ihex --set-start 0x8000000 ef_blahblah.bin ef_blahblah.hex
Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 14, 2017, 12:43:08 am
To fix ATTI alarm, this is due to missing barometer. No problem, just go to Attitude / Settings / Attitude State Algorithm and select Acro (No Sensors).


Output is more tricky, as you need to use System tab and change

Settings, Actuator Settings and set BankUpdateFreq to 4000 for banks 1 and 2
Set ChannelMax to 250 for channels 0,1,2 & 3.
ChannelNeutral to 10
and ChannelMin to 0. (all for channels 0,1,2 & 3)

Note: if you go to Output tab and change something there, this will probably mess up the settings, as this page is not really brushed-friendly yet.

With this settings you will get 4khz PWM switching speed, which can be annoying, but this is best thing for the moment. The problem is that with classic PWM, timers run at 1Mhz only, and for 4khz switching speed maximum period is 250uS with resolution of 1uS, gives 250 levels.. any higher speed would degrade resolution.

The high frequency PWM is definitely the problem separate from F3 support and will be addressed as such, hopefully soon.

Title: Re: Re: TinyPilot F3?
Post by: DocHardinger on January 14, 2017, 12:57:31 am
Thx! Works perfect now...Now teach me how to fly like you did in your video  ;D
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 14, 2017, 01:14:53 am
Well the entire flash image worked :)  So now its alive, just trying to figure out how configure it to work with my frsky.

Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 14, 2017, 01:54:33 am
@DocHardinger

What TX are you using I can't seem to get my frsky with sbus working.
Title: Re: Re: TinyPilot F3?
Post by: DocHardinger on January 14, 2017, 01:57:39 am
Look under System>Settings>HWSPRacingF3EVOSettings>UARTPort and set Port 1 to S.Bus if you have connected your Receiver to Port 1
Then restart the board...Then you should be able to use the transmitter wizard

But be careful not to change to much settings because after changing to much settings my board wont accept saving anymore...after hit save anywhere, also under settings, the board disconnects and starts again and again and again.......only thing that helps then is to reflash the board ;-)
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 14, 2017, 02:11:37 am
Should be on UART 1 for me but no luck, I also set up the channel groups to be S.BUS for TRPY.  The receiver is bound and its the same board I had setup with cleanflight so I must still have something setup wrong.  Did you have to do anything for s.bus inversion?  Trying to remember if this board had an inverter built in
Title: Re: Re: TinyPilot F3?
Post by: DocHardinger on January 14, 2017, 02:55:06 am
no just activated it under system and restart the board and then it worked for me...
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 14, 2017, 03:49:29 am
bummer, I can get telemetry out of the RX on UART 3(2) but no luck on the input. 
Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 14, 2017, 09:46:06 am
Are you sure about SBUS being on UART1? All the boards I have seen so far had integrated rx connected to UART2.

@DocHardinger do you mean too many different settings, or just saved too many times?
Title: Re: Re: TinyPilot F3?
Post by: DocHardinger on January 14, 2017, 10:54:19 am
Dont really know but when i play too lot with different settings...like changing all three stab banks and using them and then hit save the board goes down and for then on i cant save anymore( i need to reflash the board with dfuutil then)...but could be coincidence...first time this happened was when i played with vehicle settings changing motor channels(but before i changed a lot of other stuff)...
Anyway i will activate log for gcs so next time this happen i can give you more details...looks like some kind of memory problem
Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 14, 2017, 11:53:56 am
EVO board does not have external flash chip, but saves settings on internal mcu flash, which is not all that big, and there could indeed be a problem with free space management. I will hopefully have my full EVO board at Mon/Tue to debug these issues properly.
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 14, 2017, 07:19:07 pm
I'm using this board:

http://www.crazepony.com/products/f3-brushed-fc.html

It list the UARTS as 1,2,3 which I assume corresponds to 0,1,2 in the settings.  I have telemetry on uart 3(2) which works fine, and sbus on 2(1) which worked fine in clean flight but not now.    I also tried setting sbus on all the uarts at first.  Still no luck. 

I did hook up my scope to the sbus line and there is information coming from the RX. 

I could try hooking up a ppm or dsm to it.

I haven't seen any issue with saving settings getting corrupted yet.

Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 14, 2017, 08:48:12 pm
So the sbus receiver you have is standalone? Can you try getting it first to work, to output valid sbus signal, before connecting to fc?
Title: Re: Re: TinyPilot F3?
Post by: jcoffman98 on January 14, 2017, 09:07:03 pm
Yes indeed its a standalone micro RX.  I have used it before, this quad flew in the current configuration with clean flight.  I can reflash cleanflight and make sure it still works.
Title: Re: Re: TinyPilot F3?
Post by: mr_w on January 14, 2017, 09:46:13 pm
Would be good to see how it works and if you can see the sbus signal there. Also if you can share that cf configuration file here, maybe it could help.
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 14, 2017, 11:06:53 pm
Hello,

I reverted to baseflight and was able to see the sbus rx functioning.  Attached is the BF dump for this 90mm quad, this for the makerfire F3 evo brushed with a standalone furious fpv frsky RX. So at least that confirms the hardware is functioning.  *note:  I lied before when I said cleanflight, this one was betaflight.

I decided to try another brushed evo and this time used a banggood F3 evo, with a cheapo banggood frsky sbus micro rx.  I was able to flash it with librepilot and get the sbus working.  I think I have it setup should be flying it soon.
Title: Re: F3 based flight controller firmware support
Post by: mr_w on January 14, 2017, 11:34:06 pm
@jcoffman98


Ah, there it is

set sbus_inversion = OFF

There is no such setting at the moment in LP. Let me see if I can come up with something just for test.
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 14, 2017, 11:59:50 pm
The furious fpv version I have, has a built in inverter, while the cheaper bang good model I used doesn't.  So LP assumes your sbus input is always inverted I guess?
Title: Re: F3 based flight controller firmware support
Post by: mr_w on January 15, 2017, 12:05:15 am
Hmm, well, yes, but for F3 controller inverted or not should not matter as it is just a matter of UART setting - there is no need for external inverted circuit. It could be however that receiver itself is not capable of outputting regular inverted sbus, therefore requires sbus_inversion = OFF

Can you try fetching my latest commit, there should be new SBUSInverted field in HwSettings UAVO. You can try changing it, to see if it makes any difference.

You will need to make gcs again though.

Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 15, 2017, 12:15:40 am
I had just hard coded it before I saw your message, essentially the same thing you did sans the uavobject; just for a quick test. While testing this it seems something is still not right, it sees activity on channel 9 which there isn't a channel 9, and only the throttle seems to work, the other channels aren't picked up.  I should note this is on a working taranis setup.

Let me back out my hack and pull in yours and test again.

**update:

Ok so I went back and doubled checked what I was doing, and with your changes I noticed the same behavior as when I had just hard coded the UART to not be inverted, which we would expect.  Taking a closer look at it, it appears to think there is activity on channel 9 all the time.  I can see the other channels activate when I move the stick but channel 9 showing up active all the time is messing everything else up, i.e. I can't do receiver setup.  I didn't notice the other channel activity before because it is hard to see the text change in gcs as channel 9 activity dominates everything. 
Title: Re: Re: TinyPilot F3?
Post by: TheOtherCliff on January 15, 2017, 05:50:17 am
But be careful not to change to much settings because after changing to much settings my board wont accept saving anymore...after hit save anywhere, also under settings, the board disconnects and starts again and again and again.......only thing that helps then is to reflash the board ;-)

The best way to fix this is to export settings, erase settings, import settings.  Then it should work (allow more saves) again.
Title: Re: F3 based flight controller firmware support
Post by: DocHardinger on January 15, 2017, 12:13:04 pm
But be careful not to change to much settings because after changing to much settings my board wont accept saving anymore...after hit save anywhere, also under settings, the board disconnects and starts again and again and again.......only thing that helps then is to reflash the board ;-)

The best way to fix this is to export settings, erase settings, import settings.  Then it should work (allow more saves) again.
Yes thats exactly how im doing it now ;-)

Gesendet von meinem SM-G930F mit Tapatalk

Title: Re: F3 based flight controller firmware support
Post by: mr_w on January 16, 2017, 03:54:16 pm
@jcoffman98

What brand/type of SBUS receiver is that one you are using? Can you check it with LP on some other known good board, like Revo or CC3D? I am really curious about this chan 9 activity.



Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on January 16, 2017, 06:34:25 pm
We are discussing whether this could be an RSSI channel that is always fluctuating.

A solution might be to turn off your wifi and other 2.4ghz stuff, and put RC tx close to rc receiver before starting wizard, so that RSSI is always at maximum and not changing.

Of course, you can set channels manually in Configuration -> Input
Title: Re: F3 based flight controller firmware support
Post by: mr_w on January 16, 2017, 06:46:24 pm
I was also wondering about System->Data Objects->ManualControlCommand, Channels array. How do the values there reflect the stick positions correctly? Note that default update period for this object is 2 seconds, so GCS display will be lagging, but channel values should be sane. How about the values for that channel #9? Could this indeed be the rssi value which rx is outputting on its own?
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 16, 2017, 08:47:14 pm
So its working thank you all for your patience.  Channel 9 was indeed rssi, I had to manually select it and then the activity bar stopped going berserk and it would then update changes to the other channels.  It seems like all the activity on channel 9 was overwhelming GCS and it wouldn't update the other channels. 

I will do some flying after work today.

 
Title: Re: F3 based flight controller firmware support
Post by: f5soh on January 16, 2017, 08:58:12 pm
Channel 9 was indeed rssi

iRangeX RX800 ?

Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 16, 2017, 09:00:02 pm
The RX is a furious fpv micro frsky.  They seem to have replaced it with this model:

http://furiousfpv.com/product_info.php?products_id=159

Which is essentially the same minus the full range.

If its helpful I can list and link all the boards and RX's I have tested so far?
Title: Re: F3 based flight controller firmware support
Post by: f5soh on January 16, 2017, 09:04:37 pm
Should not need a list, just check if you have a bad one :)
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 16, 2017, 11:12:58 pm
Not meaning to hijack this thread but I am in general interested in learning the flight software and maybe helping out.  Whats the best way to go about that?
Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on January 17, 2017, 08:08:35 am
You just did it.  :)

One of the devs that usually handles the invitations will probably PM you in the next few days.  If not, remind us.  :)
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 18, 2017, 06:15:06 pm
One of the devs that usually handles the invitations will probably PM you in the next few days.  If not, remind us.  :)

Sounds good thanks
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 25, 2017, 10:49:44 pm
  If not, remind us.  :)

Alright I am reminding you  :)
Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on January 26, 2017, 04:12:54 am
I will post a note for the dev team members that usually do this.

Have you read the wiki about building from source code and done it?  :)

Having a change in mind to do is the best way to learn your way around the source code.  ;)
Title: Re: F3 based flight controller firmware support
Post by: jcoffman98 on January 27, 2017, 12:17:21 am
Yes i've built from source on Debian, and I've been poking around the flight code a little as well.  I've been busy building drones as well and learning to fly as I am new to the hobby.  I'm better at the building right now than flying :) 
I figured there would be something needing doing I could help with.  I have a fairly extensive embedded software background, and I've used FreeRTOS on a few projects at work although not in the last year or so.

I was thinking of porting to Naze32 to get familiar with things, however I'm not sure how many people would find that useful.   I see a few Naze32 out there with an F3 but most are F1's so maybe that's a deadend?


Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on January 27, 2017, 05:50:12 am
One of the devs (mr_w) has started a branch for F3 support.  That would be a good place to look.

We have a bit of an issue with adding new FC's.  The most recent addition was Sparky2, and that was a non-trivial group effort to get it all in there with firmware and GCS and pictures and documentation, etc.  We need to refactor the code to streamline the process before we add much more.

Maybe just grep -ir for sparky2 through all the files to get an idea of how many files were changed or added.  :)
Title: Re: F3 based flight controller firmware support
Post by: mr_w on March 01, 2017, 02:05:09 am
I have pushed some updates in F3 branch (which is still work in progress, but getting tested daily):

- ADC driver, so reading analog voltage/current/rssi sensors is now possible.
- Fix for settings save error / hang.
- Fix for usart initialization error that prevented some protocols from working (for example MSP for osd, etc).
- Fix for usb cdc (virtual com port) baud rate negotiation - so ComBridge is now working again.

Title: Re: F3 based flight controller firmware support
Post by: mr_w on March 16, 2017, 11:08:59 pm
Update: March 16, 2017:
- WS2811 led strip driver is now included (Betaflight port ;)). Notifications are the same as on F4 boards (Revo, Sparky2) [ https://librepilot.atlassian.net/wiki/display/LPDOC/Setup+WS281x+Led - with exception that configuration is not HWSettings > WS2811LED_Out, but rather HWBoardNameSettings -> LEDPort ]
- make package will build package with F3 firmware only
Title: Re: F3 based flight controller firmware support
Post by: Daxo on April 23, 2017, 02:29:33 pm
OMG, this is so awesome!!!

LibrePilot is the best, but it was lacking support for at least f3 boards, mostly because of newer fc hardware designs which are more practical overall.

Big thumbs up for doing this, LP is all I want to use and now there's hope :)

Thank you! :D 
Title: Re: F3 based flight controller firmware support
Post by: mr_w on April 28, 2017, 12:08:36 am
Update: April 28, 2017:
- New branch name - it is now https://bitbucket.org/mindnever/librepilot/branch/LP-512_F3_board_support
- PikoBLX board support
- Fixed PPM input on SPracingF3 EVO
- Merged in newest next
- Merged in DSHOT support
- Merged in LP-480
- make package builds all boards again
Title: Re: F3 based flight controller firmware support
Post by: trike_flyer on April 29, 2017, 06:01:20 pm
Hello

Thank you for the link to here mr_w.  After reading through the posts I went looking for a board I would want to use.  Here is a link to what I want to go with or something like it.

https://www.banggood.com/Mini-20x20mm-PBF3-EVO-6DOF-F3-Flgiht-Contorl-Board-with-MPU6000-SPI-5V-3A-BEC-Support-Soldering-ESC-p-1108332.html

Will it work with the F3 code? 

Thanks for the help.

TF
Title: Re: F3 based flight controller firmware support
Post by: mr_w on April 29, 2017, 06:09:53 pm
This layout looks very similar to PikoBLX and as it seems it identifies itself as pikoblx to betaflight, so yes, I'd say its a pretty good bet that it will work just fine.

Title: Re: F3 based flight controller firmware support
Post by: mr_w on May 30, 2017, 10:42:20 pm
There are some updates to F3 branch, which will hopefully be merged in next soon enough.

Update May 30, 2017:
- again new branch name (sorry), now accessible from pull-request: https://bitbucket.org/librepilot/librepilot/pull-requests/426 or as directly here https://bitbucket.org/mindnever/librepilot/branch/LP-512_Support_F3_boards
- tinyFISH FC board support
Title: Re: F3 based flight controller firmware support
Post by: fboriero on May 31, 2017, 10:56:31 pm
mmmm so is there any possibility to control this board with the joystick trough bluetooth telemetry?
I mean... there is no yaw estimation at all???

Thanks for your time
Title: Re: F3 based flight controller firmware support
Post by: mr_w on May 31, 2017, 11:03:55 pm
There are joysticks that allow you to twist the stick around Z axis, and that is commonly used for yaw control. So yes, controlling should be possible.


Title: Re: F3 based flight controller firmware support
Post by: f5soh on June 04, 2017, 06:51:08 pm
Initial F3 support branch merged to next

Windows build:
https://drive.google.com/open?id=0B5d_9OcqQj8BdWxJYjY0N08yMm8

Attached files are .hex bootloaders to be flashed using Betaflight software.

Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on June 04, 2017, 07:11:15 pm
Nice!  I am getting an itch to scratch.  I have an F3 mini (Tarot TL150H1).  I was going to take out the F3 and put a Nano in it, but I may try the F3 LP code now.  :)
Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on June 04, 2017, 07:53:46 pm
What are the chances of getting PathPlanner running in the F3 branch?  Maybe reduce the EKF rate (PIOS_SENSOR_RATE) to 300Hz or so.  Some versions may need to run without baro.

Are there other large issues?  Memory?
Title: Re: F3 based flight controller firmware support
Post by: f5soh on June 04, 2017, 08:08:46 pm
Not sure the F3 branch will help you, seems the Tarot TL150H1 uses a "Naze32 like" and F1.
http://www.flyingtech.co.uk/electronics/tarot-spare-part-mini-flight-controller-t120130140150

(https://static.rcgroups.net/forums/attachments/3/1/9/5/2/0/a9452804-28-P1120473.JPG)
Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 04, 2017, 08:23:07 pm
The F3 regarding CPU usage is pretty much the same as F1. It runs just slightly faster on same Mhz, so usage is still pretty high. There is space for improvement (overall in LP) on that. Autotune when running makes the CPU alarm orange. Not really an issue, but still.


Free ram is pretty low too (around 6k I'd say), cause of the stabilization code which is from Revo family, and not simplified one used on cc3d.

Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 05, 2017, 12:08:52 am
how to make it work on a spracingf3  (not evo)??? flashed bl already, but atached cgs doesn't recognize it.

thx

Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 05, 2017, 12:36:46 am
You will need to connect over /dev/tty.* something that is associated with cp2102 usb-serial bridge on that board, and take it from there.

Though I havent tested non-evo in a while, I do have some bootloader fixes pending (related to updating from gcs).

Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on June 05, 2017, 05:45:45 am
Maybe you didn't know that you must get the install program for the latest version called "next" posted earlier.  :)

or get "next" source code and build it (including GCS) yourself.
Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 05, 2017, 07:37:43 am
Maybe you didn't know that you must get the install program for the latest version called "next" posted earlier.  :)

or get "next" source code and build it (including GCS) yourself.

i downloaded and installed that "next" posted build from google drive. still not recognized two of well know working sprf3 boards. BTW i'm at windows.  and as i assume from mr_w post, maybe is just working for linux, isn't it?
Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on June 05, 2017, 08:01:07 am
First you have to use BetaFlight/CleanFlight etc. to install one of the bootloader hex files posted earlier.  Only after that will the 'next' LP GCS see the F3 FC.
Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 05, 2017, 09:05:41 am
F3 boards with native USB connection (without usb bridge chip) - which are all except the original spracing f3, connect automatically with GCS.

With Spracingf3 (non-evo) you need to manually pick serial connection from connections list at bottom right corner (GCS).
Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 05, 2017, 02:17:26 pm
Not working at "next" build posted earlier in this thread for Windows, can't select com port manually. Is grayed. Comport is mounted as com3 and recognizable from betaflight, but after bl_hex flashed no more communication to betaflight neither librepilotcgs. I'll try if I can select it in Linux later.

Enviado desde mi ONEPLUS A3003 mediante Tapatalk

Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 06, 2017, 12:06:03 pm
As far I tested, sprf3 board does not work with latest compiled firmware and GCS.

Compiled the "next" and the "lp-512" branches. Both, but on different tries.

Rolled back my sprf3 to betaflight using boot pins and st32flasher. This board does not populate dfu status outside because the ftdi chip connected to uart1

Used betaflight to flash black for sprf3. Rebooted, connect to com3 on CGS, tried to update. Nothing happens...

Flashed fw_spracingf3.bin on board using stflasher and connect to CGS... Com3 again. Nothing happens...

Tested on both boards. Rolled back again to betaflight... Everything is working. I can assume is not a hardware fault.

I also have a full revolution and everything is working fine in CGS with that board.

Weird.

Enviado desde mi ONEPLUS A3003 mediante Tapatalk
Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 06, 2017, 02:01:35 pm
Indeed. I guess a tutorial should be handy for these odd boards with usb serial bridge.

Btw, bridge manufacturer is Silabs, not FTDI. So the board does not have "ftdi" chip, but silabs cp2102.
Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 06, 2017, 07:17:11 pm
You'r right is the "be used" to use an "FTDI adapter" everytime I need to bridge USB to serial uart on some boards. Even if my "FTDI adapter" is using a silabs chip, same as the sprf3.

Enviado desde mi ONEPLUS A3003 mediante Tapatalk

Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 06, 2017, 08:40:08 pm
Yeeeehaaaaaa!  I got working.  The one to flash is the ef_spracingf3.bin file when doing "make all_flight" compilation.

I used stm32flash to flash it with boot pads shorted.

Now I can connect to sprf3 board at CGS.

Let's have some fun with this.

Testing...

Enviado desde mi ONEPLUS A3003 mediante Tapatalk

Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 06, 2017, 09:09:15 pm
Is your board deluxe version or acro without mag/baro?
Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 06, 2017, 09:36:07 pm
both i have are deluxe 10DOF version

BTW, after few minutes.... i'm still trying to figure how to say it where is the receiver connected and wich protocol, i assumed wizards will not work as usual on betas. but on simple selection and save windows neither.  i suppose have to mess with the system/settings windows, right?
Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 06, 2017, 09:52:11 pm
Yes, I am currently working on that missing hardware page for this and other f3 boards. In the meantime, you do need to go to System, HWSPracingF3Settings and change it to your liking, then hit the icon with red arrow pointing up (that means save permanently to FC). Clicking will save only currently selected object, so be sure that HWSPracingF3Settings or its items are selected when saving.
Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 06, 2017, 10:28:41 pm
Yes, I am currently working on that missing hardware page for this and other f3 boards. In the meantime, you do need to go to System, HWSPracingF3Settings and change it to your liking, then hit the icon with red arrow pointing up (that means save permanently to FC). Clicking will save only currently selected object, so be sure that HWSPracingF3Settings or its items are selected when saving.

as far i can see, is not "permanent" reset or power cycle the fc makes all settings go to defaults

so i can't set the receiver at s.bus cause need a power cycle to change mode

well, nice work anyways. i'll be looking around for the progress
Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on June 07, 2017, 01:09:20 am
Use red up arrow, save", arrow at top of System page.  Green up arrow is "send" which is not permanent.
Title: Re: F3 based flight controller firmware support
Post by: mr_w on June 07, 2017, 01:19:17 am
@TheOtherCliff

There is actually a "problem" with SPI flash on that board, as it appears they used few different types of flash (from different manufacturers) and our current spi flash code does not allow for that type of flexibility, so .. yeah, it probably sees 0 amount of settings storage free, therefore no saving possible.

I did already move settings to mcu flash in my private branch on this board for that exact reason (the other types of f3 do not even have spi flash, so they use internal flash anyway), and have plans to use external flash (or sdcard) for logging only, together with some improvements in jedec flash code for chip type and geometry detection at runtime.

Title: Re: F3 based flight controller firmware support
Post by: ehrans on June 07, 2017, 01:43:55 am
Use red up arrow, save", arrow at top of System page.  Green up arrow is "send" which is not permanent.

i know....  but power cycle set everything to default.

@mr_w

if you need some test on the boards or data collection i can do for you, just ask for it.
Title: Re: F3 based flight controller firmware support
Post by: Oguzhan on September 19, 2018, 06:00:13 am
I want to intall librepilot for my sp racing f3 deluxe. Please help me. Thanks
Title: Re: F3 based flight controller firmware support
Post by: TheOtherCliff on September 19, 2018, 11:51:40 pm
This thread should have enough information to get you going?  The F3 code is not in the release version (16.09), but it has been merged into "next".  Build or get a recent next.