- Posts: 271
Support for walkera telemetry.
- linux-user
- Offline
- 2x 'Rst CYRF' message until now.
Given that I previously got LOC usually within ~8h this a remarkable low rate of 'Rst CYRF'
Edit:
ee1b869 has been running for ~73h
- 4x 'Rst CYRF' message
Side note:
While telemetry values are updated instantly, it takes ~8s for telemetry values to become inverted when RX is powered off.
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
vlad_vy wrote: If you use it with "force" option, you can read buffer while receive is not completed, but error rise. I have bad experience with such reading.
It is okay to read while receiving, the chip is designed to do just that.
But with force it should read the buffer every time no matter what, even if no data. This will give the "force" option (used by DSMx) a consistent run time. I think you will find this results in a more reliable DSMx connection.
I've updated the code to do just that, and changed it to return packet length when data is good.
cyrf6936.c
int CYRF_ReadDataPacket(int force, u8 dpbuffer[]) // "force" if not set RXOW EN in RX_CFG
{
int ok = 0;
u8 rx_state = CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
if (rx_state & 0x01) // RXE=1 bad data
ok = -1;
else if (rx_state & 0x02) // receive complete
// RXC=1, RXE=0 then 2nd check is required (debouncing)
ok = (CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS) & 0x01) ? -1 : 1;
if (ok == 1 || force) {
CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80); // set RXOW before data read
u8 length = CYRF_ReadRegister(CYRF_09_RX_COUNT);
ReadRegisterMulti(CYRF_21_RX_BUFFER, dpbuffer, length);
return (ok == 1) ? length : ok ;
}
return ok;
}
A new test version a912b12 using the above is available in Test Builds
Please try it and see if gives a more reliable DSMx connection.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
I don't understand how consistent run time can help with reliable DSMx connection? Protocol timing is fixed.
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
A new test version 0098f45 with this change has been uploaded to Test Builds .
It should improve connection for both Telemetry ON and OFF, and also both Devo and DSMx.
Edit: I don't believe it. I left my DSMx model sitting 12m away and after 30 mins I have F:210 and H:2. Normally 'F' frame losses would be in the tens of thousands by now. The 2 holds was probably just me walking between tx and rx.
Edit2: (after 1 hr): F=304 H=2
I think 90% of the frame losses was caused by me getting close enough to read the screen.
First 20min was with Telemetry OFF. When I switched Telemetry On it was F=183, H=2.
Please Log in or Create an account to join the conversation.
- Gyrfalcon
- Offline
- Posts: 23
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- Indigo
- Offline
- Posts: 230
Sorry, I'm unable to test Devo protocol, but I have recreated the build with changes to Devo protocol only which I hope will fix bind problem. Please download again and retry, thanks.Gyrfalcon wrote: I just tried test version 0098f45, unfortunately the Devo "Auto" bind function does not work. Was that to be expected?
What I did was remove:
CYRF_SetTxRxMode(TX_EN);
CYRF_WriteRegister(CYRF_03_TX_CFG, 0x08 | Model.tx_power);
From this:
static void cyrf_set_bound_sop_code()
{
/* crc == 0 isn't allowed, so use 1 if the math results in 0 */
u8 crc = (cyrfmfg_id[0] + (cyrfmfg_id[1] >> 6) + cyrfmfg_id[2]);
if(! crc)
crc = 1;
u8 sopidx = (0xff &((cyrfmfg_id[0] << 2) + cyrfmfg_id[1] + cyrfmfg_id[2])) % 10;
CYRF_ConfigCRCSeed((crc << 8) + crc);
CYRF_ConfigSOPCode(sopcodes[sopidx]);
}
Yes, 100uW.vlad_vy wrote: Indigo, what power setting do you use for testing? 100uW?
I just tried repeating my test and I got more holds occurring this time, not just at long distance but some only 2 meters away. Frame losses were still much lower than I'd normally get. I guess there must be more RF interference now (3:30pm). My earlier test was 6-7am..
Please Log in or Create an account to join the conversation.
- Gyrfalcon
- Offline
- Posts: 23
Please Log in or Create an account to join the conversation.
- linux-user
- Offline
- Posts: 271
DSMX might be improved at 100uW - needs more testing (e.g. at full 100mW)
@Indigo
The same version-naming for different builds is confusing - at least to me
I would appreciate if you could comment your builds in some way:
e.g.
- What should we look for
- What is believed / hoped to be improved
- Where do you expect potential problems
- Which protocols are affected.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
AR8000+TM1000
FadesA: 128
FadesL: 140
Loss: 0
Holds: 0
Every 1-2 min someone walk between Tx and Rx. Last 10 minutes I had closed wood door between Tx and Rx.
One more 30 minutes DSMX test:
AR8000+TM1000
FadesA: 61
FadesL: 81
Loss: 1
Holds: 0
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
PB, can you build test version?
Changed files (printf(" Rst CYRF\n") commented out):
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
www.deviationtx.com/downloads-new/catego...lad-vy-devo-dsm-test
Build recently changed, but it has not any influence to result.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
static void parse_telemetry_packet()
and
parse_telemetry_packet(packet);
look different BUT it works!
Please Log in or Create an account to join the conversation.
- linux-user
- Offline
- Posts: 271
-6x 'Rst CYRF" on my Devo10
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- linux-user
- Offline
- Posts: 271
Well,vlad_vy wrote: At any case you have higher "Rst CYRF" rate, than with Indigo build. On average every 8 hours you have one "Rst CYRF".
indigo-deviation-devo10-v4.0.1-ee1b869 ...~73h, 4x 'Rst CYRF' =~1Rst / 18h
Vlad-devo10_v401b46-temp16 "Changes" ~48h, 6x 'Rst CYRF" =~1Rst / 8h
indigo-deviation-devo10-v4.0.1-0098f45 ....~16h, 3x 'Rst CYRF" =~1Rst / 5h (test time probably to short for statistic)
What about DSMX?
Edit:
As long as we don't understand why 'Rst CYRF' is happening and we can't avoid it completely,
I don't care if (on a few TX e.g. my Devo10) we have 1Rst / 4h or 1Rst / 18h as log as connection is maintained.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
vlad_vy wrote: With my latest test code I have for 100uW, 30 minutes, 9 meters (I have not more open air in my apartments) test:
AR8000+TM1000
FadesA: 128
FadesL: 140
Loss: 0
Holds: 0
Every 1-2 min someone walk between Tx and Rx. Last 10 minutes I had closed wood door between Tx and Rx.
One more 30 minutes DSMX test:
AR8000+TM1000
FadesA: 61
FadesL: 81
Loss: 1
Holds: 0
6 channels Rx 30 minutes DSMX test:
AR6210+TM1000
FadesA: 20
FadesL: 93
Loss:9
Holds:0
One more 30 minutes DSMX test:
AR6210+TM1000
FadesA: 18
FadesL: 50
Loss:12
Holds:0
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
1st:
#include <libopencm3/stm32/timer.h>
volatile u32 tmax = 0;
u32 t1 = TIM4_CNT;
at the end add:
u32 t2 = TIM4_CNT;
u32 tdiff = t2 < t1 ? 65536 + t2 - t1 : t2 - t1;
if (tdiff > tmax)
tmax = tdiff;
now you just need to print tmax every once in a while.
I would do it in main.c EvenetLoop():
at the top of main.c (after the includes):
extern volatile u32 tmax;
In EventLoop:
if (priority_ready & (1 << LOW_PRIORITY)) {
priority_ready &= ~(1 << LOW_PRIORITY);
static int loop = 0;
if (loop++ >= 50) { //5 seconds
printf("tmax: %d\n", tmax);
loop = 0;
}
PAGE_Event();
Make sure to compile with 'TYPE=dev' to enable the log screen
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Without GPS, time=12usec
With GPS, time=17usec.
Total time (for my version of code), from starting check CYRF_07_RX_IRQ_STATUS register to exit from cb() ("return delay") = 155usec.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Protocol Development
- Support for walkera telemetry.