Radio problem - code from repository

Info and discussion about the autonomous Micro FC, suitable for nanos, micros and mini multirotors

Radio problem - code from repository

Postby Matthew » Wed Nov 18, 2015 9:46 pm

Hi

I'm working on custom code for M4. Up until now I didn't need to use radio so I didn't choose any radio option in QGC. At this point I have to make a couple of tests with radio connection using internal CYRF receiver. Unfortunatelly I experienced a problem. Compiled in CrossWorks code worked great until I changed "Radio Type (RC1)" in QGC from "No radio" to "CYRF (onboard M4v2+)". After writing changed parameters to flash and restarting a board only red power LED lighten up. It's possible to connect the board to QGC but it seems like no data is transfered between a board and a computer.

I made some changes to the code so my first thought was that it's the source of a problem. Unfotunatelly after trying the clean code compiled straight from the repository the same problem occured after changing radio option to CYRF. It's probably everything ok with a board because I can flash the firmeware from "Download wizard", change a radio option to CYRF and everything goes back to working perfectly.

Did anybody experienced similar problem?
Matthew
 
Posts: 14
Joined: Sun Aug 16, 2015 9:10 pm

Re: Radio problem - code from repository

Postby kinderkram » Wed Nov 18, 2015 10:26 pm

Hi Matthew,
sounds like a compiling problem. Make sure to compile a Thumb release, not debug.

Other than that - what changes did you make?
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Radio problem - code from repository

Postby Matthew » Thu Nov 19, 2015 12:20 am

Thanks for the answer. I'm compiling a Thumb release and generating .bin file to flash it through USB port.

I've been making changes in the code for quite some time. What I already achieved is to connect a button to GPIO port. The push of a button causes an interruption. Depinding on how many times user pushed a button: after the first time motors are armed, after the second time throttle is changed to 700 and mode is changed to posittion hold, after the third time throttle is back to 0 and mode is back to manual. All of this was tested and almost working. I just couldn get good enough position hold with PX4Flow and I have to perform a couple of tests with manual mode and radio. I guess applications like that are not encouraged but my multi rotor is small, propellers ale shielded from all sides so there is no risk of getting hurt and I only fly indoors.

Short list with and order of events to make my situation more clear:
1. Flash compiled code from repository with changes I made in recent weeks and no radio option chosen in QGC - working
2. Change radio otpion in QGC to CYRF (that is the only change, I didn't flash the new version of the software) - not working (only red LED is lightning up)
3. Cannot change back radio option because connection with QGC is not working so I flash newest version from download wizard - board and radio both work correctly
4. Change back radio option to "No radio" in QGC
5. Flash compiled clear code from repository (without any changes I made recently) - working
6. Change radio otpion in QGC to CYRF - not working (only red LED is lightning up)
7. Cannot change back radio option because connection with QGC is not working so I flash newest version from download wizard - board and radio both work correctly

Hope that will help. I use CrossStudio 2.3.5 and QGC for Autoquad 1.6.3.1
Matthew
 
Posts: 14
Joined: Sun Aug 16, 2015 9:10 pm

Re: Radio problem - code from repository

Postby aBUGSworstnightmare » Thu Nov 19, 2015 8:46 am

Matthew wrote:Thanks for the answer. I'm compiling a Thumb release and generating .bin file to flash it through USB port.

I've been making changes in the code for quite some time. What I already achieved is to connect a button to GPIO port. The push of a button causes an interruption. Depinding on how many times user pushed a button: after the first time motors are armed, after the second time throttle is changed to 700 and mode is changed to posittion hold, after the third time throttle is back to 0 and mode is back to manual. All of this was tested and almost working. I just couldn get good enough position hold with PX4Flow and I have to perform a couple of tests with manual mode and radio. I guess applications like that are not encouraged but my multi rotor is small, propellers ale shielded from all sides so there is no risk of getting hurt and I only fly indoors.

Short list with and order of events to make my situation more clear:
1. Flash compiled code from repository with changes I made in recent weeks and no radio option chosen in QGC - working
2. Change radio otpion in QGC to CYRF (that is the only change, I didn't flash the new version of the software) - not working (only red LED is lightning up)
3. Cannot change back radio option because connection with QGC is not working so I flash newest version from download wizard - board and radio both work correctly
4. Change back radio option to "No radio" in QGC
5. Flash compiled clear code from repository (without any changes I made recently) - working
6. Change radio otpion in QGC to CYRF - not working (only red LED is lightning up)
7. Cannot change back radio option because connection with QGC is not working so I flash newest version from download wizard - board and radio both work correctly

Hope that will help. I use CrossStudio 2.3.5 and QGC for Autoquad 1.6.3.1


Hi, sorry for not understanding what you intend to do with the M4, but regarding Cypress chip: Is the chip powered, means is the solder jumper at motor2 position closed? http://autoquad.org/wiki/wiki/m4-microc ... o-options/
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Radio problem - code from repository

Postby Matthew » Thu Nov 19, 2015 3:03 pm

Yes, I soldered it before I switched radio options in QGC. I can normally bind radio and control autoquad as long as I use pre-compiled version from download wizard. Is it possible that there is a problem with the code in repository?
Matthew
 
Posts: 14
Joined: Sun Aug 16, 2015 9:10 pm

Re: Radio problem - code from repository

Postby chschmid » Thu Nov 19, 2015 5:58 pm

what repo do you use?
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Radio problem - code from repository

Postby aBUGSworstnightmare » Thu Nov 19, 2015 6:28 pm

Matthew wrote:Yes, I soldered it before I switched radio options in QGC. I can normally bind radio and control autoquad as long as I use pre-compiled version from download wizard. Is it possible that there is a problem with the code in repository?


I've used this one https://github.com/bn999/autoquad to compile this (experimental FW) viewtopic.php?f=31&t=4690&start=10#p35387

You can use the M4 code to test if you can bind now.

This was compiled with Crossworks 2.3.4 on Mac.

You can also try to compile a version with my changes; so we can figure out if it is a compiler problem or related to your changes.
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: Radio problem - code from repository

Postby Matthew » Fri Nov 20, 2015 2:33 pm

Thank you for your help. Everythink works now. I forgot to change board version and revision before I compiled clean version of the code. Now I am able to bind the radio and I have to test which of mine changes to a code causes problems.
Matthew
 
Posts: 14
Joined: Sun Aug 16, 2015 9:10 pm


Return to AutoQuad M4 Micro Controller

Who is online

Users browsing this forum: No registered users and 3 guests

cron