New FrSkyX protocol

More
19 Apr 2016 19:08 - 19 Apr 2016 19:09 #46818 by TomPeer
Replied by TomPeer on topic New FrSkyX protocol
I did this because Hexfet asked for it. I i like to help were i can.
Last edit: 19 Apr 2016 19:09 by TomPeer.

Please Log in or Create an account to join the conversation.

More
19 Apr 2016 20:16 #46820 by hexfet
Replied by hexfet on topic New FrSkyX protocol
Thanks! The reason is the test builds don't contain the filesystem. It's normally not an issue because the filesystem seldom changes, but wanted to check the possibility.

I'll start again from d76 and we'll see where the break happens.

Please Log in or Create an account to join the conversation.

More
19 Apr 2016 20:25 #46821 by rasqba
Replied by rasqba on topic New FrSkyX protocol

hexfet wrote: Thanks! The reason is the test builds don't contain the filesystem. It's normally not an issue because the filesystem seldom changes, but wanted to check the possibility.

I'll start again from d76 and we'll see where the break happens.


Does it mean when installing test builds, we should only flash the .dfu and not copy any files?

Thanks,
rasqba

Please Log in or Create an account to join the conversation.

More
20 Apr 2016 00:29 #46827 by hexfet
Replied by hexfet on topic New FrSkyX protocol
Okay, here we go. There's a 7e test version here . It is d76 plus the enabling of the PA during initialization. Hopefully this will still work on the 7e.

I can't upload a test build till I move to git so until that happens I'll just post links. There are 4 more commits to validate not counting the changes on the default (master) branch.

Does it mean when installing test builds, we should only flash the .dfu and not copy any files?

For the frskyx test builds there are no other files to copy (other than protocol directory for 7e). The files to copy to the USB drive should come from the nightly build. No issues if you want to copy other files of yours (e.g. models) onto a test build.

Please Log in or Create an account to join the conversation.

More
20 Apr 2016 09:31 - 20 Apr 2016 20:32 #46855 by Alexandro
Replied by Alexandro on topic New FrSkyX protocol
Hello,

EDIT:

The new Build does work now on on my Bench.

Some Traps here:
1. follow the Points from hexfet ( Install Nighly, update with FRSKYX Build 7c7 XXXXX .dfu, Copy Protocol Folder onto Drive )

2. Bind with a Distance of around 50 and more cm from the RX ( the new PA on command overdrive the RX input Stage at near Distance ! )
3. Switch it on at Distance to get save on Point 2.

doing Tomorrow a deep test with SBUS and SPORT

greetings Alex
Last edit: 20 Apr 2016 20:32 by Alexandro.

Please Log in or Create an account to join the conversation.

More
20 Apr 2016 11:58 - 20 Apr 2016 21:38 #46859 by darker44
Replied by darker44 on topic New FrSkyX protocol
Hello everyone.
Just wanted to give you a feedback.
I flashed newest nightly then new test build 7c7 on DEVO 7e . X4R-sb connected to sp-r-f3 and in cleanflight everything works. All 8 channels work perfectly.
Thanks hexfet for your work. I am waiting for next builds and I'm ready to test!

EDIT:

When do you plan to release new build to test ? I can't wait till frskyX will be in nightly :)
Last edit: 20 Apr 2016 21:38 by darker44.

Please Log in or Create an account to join the conversation.

More
20 Apr 2016 20:23 #46896 by 944storm
Replied by 944storm on topic New FrSkyX protocol
My X4RSB will be here on Friday. I will be able to do some testing on my 12s. I've haven't had any problems with the d4r-ii and sounds like the x4rsb will be good with all this work! Thanks!

Please Log in or Create an account to join the conversation.

More
20 Apr 2016 23:40 #46907 by hexfet
Replied by hexfet on topic New FrSkyX protocol
Next test version here - b3a. Fairly large changeset so seems the likely suspect, but only telemetry related - we'll see.

Thanks all for the testing!

Please Log in or Create an account to join the conversation.

More
21 Apr 2016 06:11 #46917 by Alexandro
Replied by Alexandro on topic New FrSkyX protocol
Hello,

Test Version b3a .

Bind does work normal.
Servos does not move on Channel Number set to greater 8 ( test with Servo on Channel 1)
Green Led is solid on.
Moving the Servo sounds good.

is it ok with max 8 Channel or is it a Bug ?

greetings Alex

Please Log in or Create an account to join the conversation.

More
21 Apr 2016 06:35 #46918 by cmpang
Replied by cmpang on topic New FrSkyX protocol
any latency on the servo movement?

Please Log in or Create an account to join the conversation.

More
21 Apr 2016 07:20 - 21 Apr 2016 12:51 #46922 by darker44
Replied by darker44 on topic New FrSkyX protocol
Test report : version 'b3a'. With x4r-sb , sp-r-f3 , devo 7e .
Same as on the last version. I've got bind, solid green light, all my 8 channels works perfectly in cleanflight, I can't see any lags in the charts.
I haven't checked more channels than 8, don't need them
Waiting for the next version - Thanks! :)
Last edit: 21 Apr 2016 12:51 by darker44.

Please Log in or Create an account to join the conversation.

More
21 Apr 2016 08:20 #46925 by Alexandro
Replied by Alexandro on topic New FrSkyX protocol
@cmpang

no delay on Stick

->x8r with Dymond d47 on Channel 1

Please Log in or Create an account to join the conversation.

More
21 Apr 2016 14:33 #46938 by cmpang
Replied by cmpang on topic New FrSkyX protocol
Test report : version 'b3a'. With x4r-sb

set number of channels to 8: binding and working ok, no delay on servo movement
set number of channels to 12: binding light ok but servo not working

Please Log in or Create an account to join the conversation.

More
22 Apr 2016 01:31 #46966 by hexfet
Replied by hexfet on topic New FrSkyX protocol
What does the channel monitor show for mixer outputs when the number of channels is more than eight? Looks good in the emulator which makes me concerned maybe some 7e memory constraint is being broken.

New test build here . I reverted about half the changes of the last test build.

Please Log in or Create an account to join the conversation.

More
22 Apr 2016 05:33 #46971 by Alexandro
Replied by Alexandro on topic New FrSkyX protocol
Hello,
Test Ver. 739

Bind at 12 Channel ok
Servos are working at Channel number more then 8

looking good .

doing Deep Test later

greetings Alex

Please Log in or Create an account to join the conversation.

More
22 Apr 2016 15:37 #46995 by Alexandro
Replied by Alexandro on topic New FrSkyX protocol
Hello,
Deep Test Ver. 739:
RX X8R
Pwm to Sbus Converter from Frsky (4 Channel Version )
TX Devo 7e
CC2500 Version ( BG with Blue Foil on RF Shield on Picture )

RX Channel out 1-8 : Ok , no Delay
SBus out 1-12 : Ok , no Delay
Volt 1: Ok
RSSI: Ok

all looks Ok, Time for Flight Test at Sunday :)

greetings Alex

Please Log in or Create an account to join the conversation.

More
22 Apr 2016 23:12 #47014 by hexfet
Replied by hexfet on topic New FrSkyX protocol
Thanks Alex. Still a ways to go - haven't spotted the bug yet. Next test version here .

Please Log in or Create an account to join the conversation.

More
23 Apr 2016 08:56 - 23 Apr 2016 09:08 #47028 by darker44
Replied by darker44 on topic New FrSkyX protocol
Test report : version '739'. With x4r-sb , sp-r-f3 , devo 7e .
I've got bind, solid green light, tested 12 channels, everything works without lags.

Test report : version '19a'. With x4r-sb , sp-r-f3 , devo 7e .

Green light is blinking, in cleanflight, there are big lags and channels are rewired. (doesn't correspond proper channels in cleanflight)

Waiting for the next version to test :)
Last edit: 23 Apr 2016 09:08 by darker44.

Please Log in or Create an account to join the conversation.

More
23 Apr 2016 21:52 #47076 by hexfet
Replied by hexfet on topic New FrSkyX protocol
Good news: Zeroed in on the problem and have a potential fix. Test version here .

Bad news: Can't explain why the problem occurs, so hopefully someone will see what I'm missing.

The difference between the working and non-working versions is only the addition of the "static" qualifier to the frsky_check_telemetry function. On the 7e this causes the function to be inlined since it's only called from one place and the function size is reduced by excluding some extended telemetry code. Also (strangely) the compiler generates some different code in an unrelated function. That code is related to the failsafe function.

I don't know ARM assembly and it's not obvious that the different code produces the same result. I'd appreciate if someone compares the code excerpts below and can say if they're equivalent. The problem is either in that code or in the way the function is inlined. The test build at the link prevents the inlining with a compiler directive. The reported issues of some/all channels not working would be consistent with a problem in the failsafe assembly code below.

Are these snippets equivalent?

With frsky_check_telemetry marked static:
256:protocol/frskyx_cc2500.c ****         failsafe_chan += 1;
 1112              		.loc 1 256 0
 1113 014c BDBF     		ittte	lt
 1114 014e 0233     		addlt	r3, r3, #2
 1115 0150 03F00F03 		andlt	r3, r3, #15
 1116 0154 43F01003 		orrlt	r3, r3, #16
 259:protocol/frskyx_cc2500.c ****         failsafe_count = 0;
 1117              		.loc 1 259 0
 1118 0158 0023     		movge	r3, #0
 256:protocol/frskyx_cc2500.c ****         failsafe_chan += 1;
 1119              		.loc 1 256 0
 1120 015a BDBF     		ittte	lt
 1121 015c 88F80030 		strblt	r3, [r8]
 257:protocol/frskyx_cc2500.c ****     } else if (FS_flag & 0x10) {
 1122              		.loc 1 257 0
 1123 0160 4B1C     		addlt	r3, r1, #1
 1124 0162 2370     		strblt	r3, [r4]

With frsky_check_telemetry not marked static:
256:protocol/frskyx_cc2500.c ****         failsafe_chan += 1;
 1216              		.loc 1 256 0
 1217 014c BBBF     		ittet	lt
 1218 014e 0233     		addlt	r3, r3, #2
 1219 0150 03F00F03 		andlt	r3, r3, #15
 259:protocol/frskyx_cc2500.c ****         failsafe_count = 0;
 1220              		.loc 1 259 0
 1221 0154 0023     		movge	r3, #0
 256:protocol/frskyx_cc2500.c ****         failsafe_chan += 1;
 1222              		.loc 1 256 0
 1223 0156 43F01003 		orrlt	r3, r3, #16
 257:protocol/frskyx_cc2500.c ****     } else if (FS_flag & 0x10) {
 1224              		.loc 1 257 0
 1225 015a BDBF     		ittte	lt
 1226 015c 0131     		addlt	r1, r1, #1
 256:protocol/frskyx_cc2500.c ****         failsafe_chan += 1;
 1227              		.loc 1 256 0
 1228 015e 88F80030 		strblt	r3, [r8]
 257:protocol/frskyx_cc2500.c ****     } else if (FS_flag & 0x10) {
 1229              		.loc 1 257 0
 1230 0162 2170     		strblt	r1, [r4]

Relevant C source
    static u16 failsafe_count;
    static u8 chan_offset;
    static u8 FS_flag;
    static u8 failsafe_chan;
    u8 startChan = 0;


    // data frames sent every 9ms; failsafe every 9 seconds
    if (FS_flag == 0  &&  failsafe_count > FAILSAFE_TIMEOUT  &&  chan_offset == 0  &&  Model.proto_opts[PROTO_OPTS_FAILSAFE] != FAILSAFE_RX) {
        FS_flag = 0x10;
        failsafe_chan = 0;
    } else if (FS_flag & 0x10 && failsafe_chan < (Model.num_channels-1)) {
        FS_flag = 0x10 | ((FS_flag + 2) & 0x0f);
        failsafe_chan += 1;
    } else if (FS_flag & 0x10) {
        FS_flag = 0;
        failsafe_count = 0;
    }
    failsafe_count += 1;

Please Log in or Create an account to join the conversation.

More
24 Apr 2016 10:53 - 24 Apr 2016 10:55 #47085 by darker44
Replied by darker44 on topic New FrSkyX protocol
Test report : version '225'. With x4r-sb , sp-r-f3 , devo 7e .

After the flash Devo keeps restarting, there is no logo on the screen, just sound and blinking. There is a bootloop.

So I flashed newest nightly 23.04.2016 then I booted devo, changed protocol to ppm. Flashed '225', and turn on devo. It booted ok, I changed protocol to frskyx, and restarted.
The same happened, devo keeps rebooting in a bootloop. There is only turn on sound and flashing blank screen.
(with receiver off the same happened)

So for me the last build that is working is '739'

I wish I could help with the code, but I don't know anything about programming. But I can always help with testing.
Thanks!
Last edit: 24 Apr 2016 10:55 by darker44.

Please Log in or Create an account to join the conversation.

Time to create page: 0.120 seconds
Powered by Kunena Forum