Running TauLabs software on hardware that isn't supported? Work with others to get a new platform supported.

Naze32

no avatar
User

GrouchoDuke

Posts

11

Joined

Mon Mar 30, 2015 5:49 am

Re: Naze32

by GrouchoDuke » Thu Apr 02, 2015 5:27 am

Just a status update on what I've been testing...

I spent several hours with Peabody124's Oneshot enabled naze32-next branch over the last 24 hours. Because of the github DDOS that was still going on yesterday, I got a patch straight from him. I've been building GCS and the Naze firmware on OS X.

My D4R-II receiver is talking correctly to the firmware with PPM set on RcvrPort. I have not attempted outputting data to my MinimOSD or Taranis telemetry.

With Oneshot disabled one of my KISS ESCs would intermittently spin up for a fraction of a second. It seemed fairly random, but I didn't notice it within the first couple minutes of connecting the battery. After enabling Oneshot (set on ChannelType 0 through 3 with 1500 min, 1575 mid, and 3000 max), I didn't notice any random motor spin ups. The KISS ESCs appear to only operate in the mode selected by the solderable jumper on them. So, it's not surprising that things don't operate normally when sending non-Oneshot commands to Oneshot ESCs.

For non-autodetecting Oneshot-capable ESCs like the KISS 18A v1.1 ESCs, I recommend setting the ChannelType to the correct type (PWM or Oneshot) before connecting a battery. Also, everyone should remove your props when doing any config work.

With Oneshot disabled, my Naze32 (full version, rev 5) connected easily and quickly to GCS via USB. With the gyro set to 500Hz and running in Stability 1 (default settings), it sits at about 75-77% CPU load. The flight data and other settings data stream to GCS was solid.

With Oneshot enabled on channels 0-3, the CPU load increased to 87-88% with Stability 1 selected. Connection times beween the Naze and GCS increased to a random time between approximately 10 and 30 seconds. Data flow to GCS was intermittent on the flight data page, the scopes page and everywhere else I checked. I did notice that some parameters on the Scopes page seemed to continue to update while others dropped off for several seconds at a time.

On nearly every connection I made with Oneshot enabled, the Event System Warning flag was thrown on the flight data page with a "There were problems with UAVObject events or callbacks" explanation. The servo output critical warning was also flagged with an explanation of "System is in failsafe or... one or more servo outputs failed to update." Despite these warnings, I was still able to see the mode select switch move on the inputs page. My guess is there's something not quite right with the Oneshot outputs. The 88% CPU load could also be causing problems. I did not try a lower gyro update rate to lower the CPU load.

I did not try other ChannelType settings. I tried a gyro update rate of 1000Hz yesterday and had even more connectivity issues. I tried both 57k and 115k USB baud rates, but didn't notice any difference in the connection quality with GCS and Oneshot enabled.

I'm game for more testing whenever there's something new to test. I hope this helps...
no avatar
User

quadcfan

Posts

1

Joined

Thu Apr 02, 2015 8:05 am

Re: Naze32

by quadcfan » Thu Apr 02, 2015 8:08 am

franko wrote:Hi,

i have compiled the bin for my Naze32 Rev.3 FC and it works.
Is gps now supported? Where can i see the pin layout for TL@Naze32?

BR
Frank

Edit: Where can i enable Mag to test?

CC flight/targets/naze32/fw/main.c
CC flight/targets/naze32/fw/pios_board.c
pios_board.c:83:29: error: 'pios_exti_hmc5883_cfg_v5' defined but not used [-Werror=unused-variable]
static struct pios_exti_cfg pios_exti_hmc5883_cfg_v5 __exti_config = {
^
cc1: all warnings being treated as errors
make[1]: *** [/home/fhu/code/TauLabs/build/fw_naze32/pios_board.o] Error 1
make: *** [fw_naze32_tlfw] Error 2
fhu@taulabs:~/code/TauLabs$

Same issue. Any ideas?
User avatar
User

peabody124

Posts

1339

Joined

Tue Feb 18, 2014 12:33 pm

Re: Naze32

by peabody124 » Thu Apr 02, 2015 8:35 pm

GrouchoDuke wrote:With Oneshot enabled on channels 0-3, the CPU load increased to 87-88% with Stability 1 selected. Connection times beween the Naze and GCS increased to a random time between approximately 10 and 30 seconds. Data flow to GCS was intermittent on the flight data page, the scopes page and everywhere else I checked. I did notice that some parameters on the Scopes page seemed to continue to update while others dropped off for several seconds at a time.

On nearly every connection I made with Oneshot enabled, the Event System Warning flag was thrown on the flight data page with a "There were problems with UAVObject events or callbacks" explanation. The servo output critical warning was also flagged with an explanation of "System is in failsafe or... one or more servo outputs failed to update." Despite these warnings, I was still able to see the mode select switch move on the inputs page. My guess is there's something not quite right with the Oneshot outputs. The 88% CPU load could also be causing problems. I did not try a lower gyro update rate to lower the CPU load.

I did not try other ChannelType settings. I tried a gyro update rate of 1000Hz yesterday and had even more connectivity issues. I tried both 57k and 115k USB baud rates, but didn't notice any difference in the connection quality with GCS and Oneshot enabled.

I'm game for more testing whenever there's something new to test. I hope this helps...


Interesting report. I'm surprised that OneShot alone changed the CPU utilization as it doesn't add anything that is processor intensive. Did you change anything else at the same time? (e.g. SensorRate being the obvious one - I'd leave it at 330 Hz on an F1 processor).
User avatar
User

peabody124

Posts

1339

Joined

Tue Feb 18, 2014 12:33 pm

Re: Naze32

by peabody124 » Thu Apr 02, 2015 8:36 pm

quadcfan wrote:
franko wrote:Hi,

i have compiled the bin for my Naze32 Rev.3 FC and it works.
Is gps now supported? Where can i see the pin layout for TL@Naze32?

BR
Frank

Edit: Where can i enable Mag to test?

CC flight/targets/naze32/fw/main.c
CC flight/targets/naze32/fw/pios_board.c
pios_board.c:83:29: error: 'pios_exti_hmc5883_cfg_v5' defined but not used [-Werror=unused-variable]
static struct pios_exti_cfg pios_exti_hmc5883_cfg_v5 __exti_config = {
^
cc1: all warnings being treated as errors
make[1]: *** [/home/fhu/code/TauLabs/build/fw_naze32/pios_board.o] Error 1
make: *** [fw_naze32_tlfw] Error 2
fhu@taulabs:~/code/TauLabs$

Same issue. Any ideas?


I wouldn't expect RTH or PH to work on an F1 - it's just too cpu/memory intensive.

Where is that error coming from? Are you enabling various sensors? We don't have a pin map since the hardware is not open source, but what is used currently should be documented in the code.
no avatar
User

GrouchoDuke

Posts

11

Joined

Mon Mar 30, 2015 5:49 am

Re: Naze32

by GrouchoDuke » Thu Apr 02, 2015 11:21 pm

peabody124 wrote:Interesting report. I'm surprised that OneShot alone changed the CPU utilization as it doesn't add anything that is processor intensive. Did you change anything else at the same time? (e.g. SensorRate being the obvious one - I'd leave it at 330 Hz on an F1 processor).
From the docs, it looks like Oneshot update rate is tied to the gyro rate. So, when I changed from PWM to Oneshot, the update rate should have changed from the 400 I had set for PWM to the 500Hz gyro update rate. I only tried 500 & 1000Hz update rates, but it's easy to drop that down.
User avatar
User

peabody124

Posts

1339

Joined

Tue Feb 18, 2014 12:33 pm

Re: Naze32

by peabody124 » Mon Apr 06, 2015 5:02 am

Ok summarizing my test on oneshot:

firmware (compiled from my latest branch) https://www.dropbox.com/s/85v07ublyan7u ... 2.bin?dl=0

configuration (minimal oneshot configuration, no tuning or input configuration) https://www.dropbox.com/s/2sdx4b3max012 ... g.uav?dl=0

you have to set up the mixer first:
Image

then enable oneshot mode:
Image

and on the scope i see pulses 150 µs long.
no avatar
User

GrouchoDuke

Posts

11

Joined

Mon Mar 30, 2015 5:49 am

Re: Naze32

by GrouchoDuke » Mon Apr 06, 2015 6:31 am

Thanks for all the help with this, peabody124. Like I mentioned on IRC, my old version of GCS was getting in the way. I cloned it on Mar 31st, but it didn't have all the changes for some reason. I did a fresh pull and recompiled GCS for OS X. Everything's working great now and the motors are spinning with Oneshot enabled.

I'll fly as soon as the weather gets good enough.
no avatar
User

tracernz

Posts

119

Joined

Mon Apr 06, 2015 7:46 am

Re: Naze32

by tracernz » Mon Apr 06, 2015 12:54 pm

I built and flashed the latest code earlier this evening on an acro (no mag, baro, flash) NAZE rev. 5. It worked well with a PPM receiver. One thing I couldn't do was get the makefile to produce a hex file, instead I had to do it by hand in the shell. Everything appears in order in the target Makefile, any clues? One thing that would be really nice is to have a software method of entering the STM32 bootloader mode so the firmware can be flashed over UART (the usual method for the NAZE), even if the actual flashing needs to be done by a 3rd party tool. I'm completely new to Taulabs as of today so not really sure where to look for the code which receives the bootloader commands, any clues are appreciated. :)
no avatar
User

tracernz

Posts

119

Joined

Mon Apr 06, 2015 7:46 am

Re: Naze32

by tracernz » Mon Apr 06, 2015 10:55 pm

I think the way to enter the STM boot loader on the NAZE would be to add some code to the ResetHandler in the startup.S code which checks for the magic words set by the IAP and jump to the ST boot loader section in ROM if needed. I'll try this later today if I get time. Then the flash can be loaded using the ST Flash Loader demo or any other tool such as the Clmeanflight Configurator app in Google Chrome.
User avatar
User

peabody124

Posts

1339

Joined

Tue Feb 18, 2014 12:33 pm

Re: Naze32

by peabody124 » Mon Apr 06, 2015 11:01 pm

You can look at the last two commits from my ESC here:

https://github.com/peabody124/TauLabs/c ... 2f10x_MD.S

If you really want to get fancy I also wrote an STM32 serial flash GCS plugin in that branch so you could program the naze from GCS.
PreviousNext

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron