Thread Tools
Jan 26, 2017, 04:15 PM
Registered User
midelic's Avatar
Thread OP
I updated the docs on multi_STM32 to be more easy to read.
https://github.com/pascallanger/DIY-...iling_STM32.md
https://github.com/pascallanger/DIY-...M_DIY_STM32.md

Enjoy!
Sign up now
to remove ads between posts
Jan 26, 2017, 04:53 PM
Flying a Chipmunk in Portugal
jhsa's Avatar
Very easy to read those docs.. Will try to compile later. Thank you..

João
Jan 26, 2017, 05:19 PM
Registered User
Quote:
Originally Posted by midelic
Completely clear, now I hope I can finally get to assembling my module and make use of it
Jan 26, 2017, 06:47 PM
Registered User
stingrr's Avatar
Quote:
Originally Posted by hpnuts
Can you tell me which TX and TX firmware you are using?
Let me know if it still works after the update (try to update the module only and not the radio so we can see the result). Only if it doesn't, can you share the source your build is based on?

Pascal
Not sure you still need my testing, but if you do:

Taranis x9d+ running 2.2 RC8, updated to latest master, did not update radio, was already running RC8.

Created new model, set to x22, autobind checked, bound fine.
Jan 27, 2017, 12:25 AM
Registered User
Quote:
Originally Posted by stingrr
Not sure you still need my testing, but if you do:

Taranis x9d+ running 2.2 RC8, updated to latest master, did not update radio, was already running RC8.

Created new model, set to x22, autobind checked, bound fine.
Taranis x9d+, OpenTx 2.2 RC9, multi master from Jan 24, 2017, Banggood 4-in-1.

The R615x binds in autodetect mode.

The following defines are in my _Config.h (not sure which ones are actually required for the auto-select to work):

#define TELEMETRY

//Comment to invert the polarity of the output telemetry serial signal.
//This function takes quite some flash space and processor power on an atmega.
//For OpenTX and ersky9x it must be uncommented.
//On a 9XR_PRO running ersky9x both commented and uncommented will work depending on the radio setting Invert COM1 under the Telemetry menu.
//On other addon/replacement boards like the 9xtreme board or the Ar9x board, you need to uncomment the line below.
//For er9x it depends if you have an inveter mod or not on the telemetry pin. If you don't have an inverter comment this line.
#define INVERT_TELEMETRY

//Uncomment to send also Multi status and wrap other telemetry to allow TX to autodetect the format
//Only for newest OpenTX version
#define MULTI_TELEMETRY

//Comment a line to disable a protocol telemetry
#define DSM_TELEMETRY // Forward received telemetry packet directly to TX to be decoded
Jan 27, 2017, 02:31 AM
Pascal
hpnuts's Avatar
Quote:
Originally Posted by TinuZ
I do have a big collection of Orange crap here so if you want to have tests done with Atmel code against those to see if it behaves differently on the regular multimodule just let me know.
Hey Tinuz,
I'm interrested if you could do a test of all your DSM stuff so we are sure there is no regression.
For the R615X, I'm going to add in the doc that you have to manually bind it to DSMX_22. When I'll receive Joao's rx I'll try to do some dumps to see what the RX is receiving/expecting and may be go to the bottom of it.

Pascal
Jan 27, 2017, 03:07 AM
Registered User
Quote:
Originally Posted by hpnuts
I'm thinking PPM with ENABLE_SERIAL does not work since you have uncommented #define MULTI_TELEMETRY.
Could you verify my assumption by commenting #define MULTI_TELEMETRY and verifying that PPM works when ENABLE_SERIAL is not commented?
Yes, you are right. Compile and upload sketch with multi_telemetry commented, enable serial and PPM let me works on ppm connecting S1 and S2 to GND. Radio works and have control on servo using PPM.

Comment multi_telemetry let me use frsky telemetry?

Quote:
Originally Posted by hpnuts
Next step Serial:
Side note: you don't need to solder/unsolder S1 and S2 to GND. Commenting #define ENABLE_PPM is forcing serial whatever the dial position is.
Something is preventing the module to sync with the incoming serial signal. It should be a standard serial stream @100Kbps 8e2. When the signal is idle you should see a "1". Do you confirm?
With a TTL adaptor on serial output and terminal software configured as 100kbps 8 bit even 2 stop bits I have tons of garbage (see serial.png), but I think you are not asking about this test, isn´t it?

Quote:
Originally Posted by hpnuts
The only way to troubleshoot what's happening is to play with an output port at the different stage of the serial interruption and check with an oscilloscope. I'm using for that #define DEBUG_TX which is commented at the start of Multiprotocol.ino. If you uncomment it then the TX pin instead of being telemetry is now a simple output. After use the instructions DEBUG_TX_off; DEBUG_TX_on; DEBUG_TX_off; somewhere in the serial interrup to see where it fails. For example you can check if a packet has been accepted by placing them on line 1219. If you don't see anything on the ouput then we know something is discarding the packet and we can move upward until we figure out where it fails.

Pascal
I´ll try. Two days ago I used led on board to check. I get someting until 1190 line nothing after this point, but I suspect something is wrong with serial.

Thank you Pascal.

Regards.

--Edit--

On stm32 debug is working? I have an error about non defined DEBUG_TX_on/off.
Last edited by Drashiel; Jan 27, 2017 at 03:21 AM.
Jan 27, 2017, 05:37 AM
Registered User
Quote:
Originally Posted by jhsa
The firmware I use is ErSky9x and as far as I know it is the only one that supports this feature on all radios as long as they have the required hardware.
The Taranis radio and 9xtreme upgrade board for the 9x radio already have the hardware for this.
For the 9XR-PRO radio, Ar9x board, and Sky9x board, a small circuit based on an ATtiny85 or 45 can be built so ErSky9x can control the power to both internal and external RF modules.
here is the link to the project:

http://openrcforums.com/forum/viewtopic.php?f=85&t=8471

João
Interesting idea got me tinkering - PCB is oshpark enroute (1"x1" size).
Any advice or spot-the-error is appreciated.

--
Mozz
Jan 27, 2017, 06:58 AM
Flying a Chipmunk in Portugal
jhsa's Avatar
Nice job, but I asked you a couple questions on the other thread :I)

João
Jan 27, 2017, 07:06 AM
Pascal
hpnuts's Avatar
Quote:
Originally Posted by Drashiel
Comment multi_telemetry let me use frsky telemetry?
Yes you don't need multi_telemetry to get frsky telemetry to work. I'll remove it when in PPM mode as this is an edge case.
Quote:
Originally Posted by Drashiel
With a TTL adaptor on serial output and terminal software configured as 100kbps 8 bit even 2 stop bits I have tons of garbage (see serial.png), but I think you are not asking about this test, isn´t it?
That "garbage" could look right if viewed in hexa. At least there is a repetitive pattern. You need to install something like this: https://realterm.sourceforge.io/
Quote:
Originally Posted by Drashiel
I´ll try. Two days ago I used led on board to check. I get someting until 1190 line nothing after this point, but I suspect something is wrong with serial.
If you don't get anything when inserting on line 1192, it means that all bytes are being discarded due to a frame/parity error...
Quote:
Originally Posted by Drashiel
On stm32 debug is working? I have an error about non defined DEBUG_TX_on/off.
Debug_tx is only for atmega. I don't have yet a STM32 board since I haven't put the time yet into it...

Pascal
Jan 27, 2017, 07:14 AM
Registered User
midelic's Avatar
Thread OP
On STM32 is nice that you can use freely arduino Serial.print() for debugging as USART1 is free .
If you connected the FTDI you can output any value on serial like that.

If serial not working but PPM , I;m thinking maybe a pulldown on PA4,PA5,PA6,PA7 the dial switch pins.
This can be checked with serial.,adding at the end of setup function( and dial set on zero) .

Serial.begin(115200);
Serial.println(mode select);
Last edited by midelic; Jan 27, 2017 at 07:36 AM.
Jan 27, 2017, 07:40 AM
Registered User
Hi Guys,

i'm trying to flash a V1.2 Mutliprotocol Card, but i've a problem with the Sketch compilation.

i'va always the sames error :
Quote:
Arduino : 1.6.5 (Windows 7), TD: 1.26, Carte : "Multi 4-in-1, ATmega328 (3.3V, 16 MHz)"

Multiprotocol.ino: In function 'void setup()':
Multiprotocol:455: error: 'random_init' was not declared in this scope
Multiprotocol:484: error: 'memcpy' was not declared in this scope
Multiprotocol:488: error: 'delayMilliseconds' was not declared in this scope
Multiprotocol:513: error: 'modules_reset' was not declared in this scope
Multiprotocol:520: error: 'random_value' was not declared in this scope
Multiprotocol:520: error: 'randomSeed' was not declared in this scope
Multiprotocol:525: error: 'random_id' was not declared in this scope
Multiprotocol:543: error: 'protocol_init' was not declared in this scope
Multiprotocol:561: error: 'PPM_Telemetry_serial_init' was not declared in this scope
Multiprotocol:573: error: 'Mprotocol_serial_init' was not declared in this scope
Multiprotocol.ino: In function 'void loop()':
Multiprotocol:591: error: 'Update_All' was not declared in this scope
Multiprotocol:598: error: 'cli' was not declared in this scope
Multiprotocol:600: error: 'sei' was not declared in this scope
Multiprotocol:617: error: 'tx_pause' was not declared in this scope
Multiprotocol:623: error: 'tx_resume' was not declared in this scope
Multiprotocol:627: error: 'cli' was not declared in this scope
Multiprotocol:634: error: 'sei' was not declared in this scope
Multiprotocol:635: error: 'Update_All' was not declared in this scope
Multiprotocol:646: error: 'cli' was not declared in this scope
Multiprotocol:654: error: 'sei' was not declared in this scope
Multiprotocol.ino: In function 'void Update_All()':
Multiprotocol:666: error: 'update_serial_data' was not declared in this scope
Multiprotocol:668: error: 'millis' was not declared in this scope
Multiprotocol:677: error: 'cli' was not declared in this scope
Multiprotocol:679: error: 'sei' was not declared in this scope
Multiprotocol:686: error: 'millis' was not declared in this scope
Multiprotocol:701: error: 'modules_reset' was not declared in this scope
Multiprotocol:702: error: 'protocol_init' was not declared in this scope
Multiprotocol:704: error: 'update_channels_aux' was not declared in this scope
Multiprotocol:709: error: 'TelemetryUpdate' was not declared in this scope
Multiprotocol:711: error: 'update_led_status' was not declared in this scope
Multiprotocol.ino: In function 'void update_led_status()':
Multiprotocol:741: error: 'millis' was not declared in this scope
Multiprotocol:743: error: 'millis' was not declared in this scope
Multiprotocol.ino: In function 'void tx_resume()':
Multiprotocol:806: error: 'resumeBashSerial' was not declared in this scope
Multiprotocol.ino: In function 'void protocol_init()':
Multiprotocol:851: error: 'set_rx_tx_addr' was not declared in this scope
Multiprotocol:853: error: 'millis' was not declared in this scope
Multiprotocol:871: error: 'initFlySky' was not declared in this scope
Multiprotocol:872: error: 'ReadFlySky' was not declared in this scope
Multiprotocol:878: error: 'initAFHDS2A' was not declared in this scope
Multiprotocol:879: error: 'ReadAFHDS2A' was not declared in this scope
Multiprotocol:885: error: 'random_id' was not declared in this scope
Multiprotocol:886: error: 'initHubsan' was not declared in this scope
Multiprotocol:887: error: 'ReadHubsan' was not declared in this scope
Multiprotocol:896: error: 'initFrSky_2way' was not declared in this scope
Multiprotocol:897: error: 'ReadFrSky_2way' was not declared in this scope
Multiprotocol:904: error: 'initFRSKYV' was not declared in this scope
Multiprotocol:905: error: 'ReadFRSKYV' was not declared in this scope
Multiprotocol:912: error: 'initFrSkyX' was not declared in this scope
Multiprotocol:913: error: 'ReadFrSkyX' was not declared in this scope
Multiprotocol:920: error: 'initSFHSS' was not declared in this scope
Multiprotocol:921: error: 'ReadSFHSS' was not declared in this scope
Multiprotocol:929: error: 'initDsm' was not declared in this scope
Multiprotocol:931: error: 'ReadDsm' was not declared in this scope
Multiprotocol:952: error: 'DevoInit' was not declared in this scope
Multiprotocol:953: error: 'devo_callback' was not declared in this scope
Multiprotocol:974: error: 'WK_setup' was not declared in this scope
Multiprotocol:975: error: 'WK_cb' was not declared in this scope
Multiprotocol:981: error: 'initJ6Pro' was not declared in this scope
Multiprotocol:982: error: 'ReadJ6Pro' was not declared in this scope
Multiprotocol:989: error: 'initHiSky' was not declared in this scope
Multiprotocol:990: error: 'hisky_cb' was not declared in this scope
Multiprotocol:995: error: 'initV2x2' was not declared in this scope
Multiprotocol:996: error: 'ReadV2x2' was not declared in this scope
Multiprotocol:1001: error: 'initYD717' was not declared in this scope
Multiprotocol:1002: error: 'yd717_callback' was not declared in this scope
Multiprotocol:1007: error: 'initKN' was not declared in this scope
Multiprotocol:1008: error: 'kn_callback' was not declared in this scope
Multiprotocol:1013: error: 'initSymax' was not declared in this scope
Multiprotocol:1014: error: 'symax_callback' was not declared in this scope
Multiprotocol:1019: error: 'initSLT' was not declared in this scope
Multiprotocol:1020: error: 'SLT_callback' was not declared in this scope
Multiprotocol:1027: error: 'initCX10' was not declared in this scope
Multiprotocol:1028: error: 'CX10_callback' was not declared in this scope
Multiprotocol:1033: error: 'initCG023' was not declared in this scope
Multiprotocol:1034: error: 'CG023_callback' was not declared in this scope
Multiprotocol:1039: error: 'initBAYANG' was not declared in this scope
Multiprotocol:1040: error: 'BAYANG_callback' was not declared in this scope
Multiprotocol:1045: error: 'initESKY' was not declared in this scope
Multiprotocol:1046: error: 'ESKY_callback' was not declared in this scope
Multiprotocol:1051: error: 'initMT99XX' was not declared in this scope
Multiprotocol:1052: error: 'MT99XX_callback' was not declared in this scope
Multiprotocol:1057: error: 'initMJXQ' was not declared in this scope
Multiprotocol:1058: error: 'MJXQ_callback' was not declared in this scope
Multiprotocol:1063: error: 'initSHENQI' was not declared in this scope
Multiprotocol:1064: error: 'SHENQI_callback' was not declared in this scope
Multiprotocol:1069: error: 'initFY326' was not declared in this scope
Multiprotocol:1070: error: 'FY326_callback' was not declared in this scope
Multiprotocol:1075: error: 'initFQ777' was not declared in this scope
Multiprotocol:1076: error: 'FQ777_callback' was not declared in this scope
Multiprotocol:1081: error: 'initASSAN' was not declared in this scope
Multiprotocol:1082: error: 'ASSAN_callback' was not declared in this scope
Multiprotocol:1087: error: 'initHONTAI' was not declared in this scope
Multiprotocol:1088: error: 'HONTAI_callback' was not declared in this scope
Multiprotocol:1093: error: 'initQ303' was not declared in this scope
Multiprotocol:1094: error: 'Q303_callback' was not declared in this scope
Multiprotocol:1103: error: 'delayMilliseconds' was not declared in this scope
Multiprotocol:1106: error: 'cli' was not declared in this scope
Multiprotocol:1108: error: 'sei' was not declared in this scope
Multiprotocol.ino: In function 'void update_serial_data()':
Multiprotocol:1173: error: 'memcpy' was not declared in this scope
Multiprotocol.ino: In function 'void modules_reset()':
Multiprotocol:1187: error: 'CC2500_Reset' was not declared in this scope
Multiprotocol:1190: error: 'A7105_Reset' was not declared in this scope
Multiprotocol:1193: error: 'CYRF_Reset' was not declared in this scope
Multiprotocol:1196: error: 'NRF24L01_Reset' was not declared in this scope
Multiprotocol:1200: error: 'delayMilliseconds' was not declared in this scope
Multiprotocol.ino: In function 'void Mprotocol_serial_init()':
Multiprotocol:1240: error: 'initTXSerial' was not declared in this scope
Multiprotocol.ino: In function 'void PPM_Telemetry_serial_init()':
Multiprotocol:1258: error: 'initTXSerial' was not declared in this scope
Multiprotocol:1260: error: 'initTXSerial' was not declared in this scope
Multiprotocol:1262: error: 'initTXSerial' was not declared in this scope
Multiprotocol.ino: In function 'void random_init()':
Multiprotocol:1280: error: 'cli' was not declared in this scope
Multiprotocol:1284: error: 'sei' was not declared in this scope
Multiprotocol.ino: In function 'uint32_t random_id(uint16_t, uint8_t)':
Multiprotocol:1314: error: 'random' was not declared in this scope
Multiprotocol.ino: At global scope:
Multiprotocol:1345: error: expected constructor, destructor, or type conversion before '(' token
'random_init' was not declared in this scope

Ce rapport contiendrait plus d'informations si l'option
"Montrer les informations de sortie pendant la compilation"
était activée dans Fichier > Préférences.
If you can help me cos i'searching for days and i'haven't find a solution
Thanks
@+
Jan 27, 2017, 08:03 AM
Registered User
Quote:
Originally Posted by Ticasso
Hi Guys,

i'm trying to flash a V1.2 Mutliprotocol Card, but i've a problem with the Sketch compilation.
Update your Arduino IDE to latest version.

Fred
Jan 27, 2017, 09:26 AM
Registered User
Thanks a lot Mister Flarssen !
it works really better now

I've choose my protocol to enable Walkera one but i can't find it in my Taranis (witch is flash with ...opentx22-5e00436-multi-2016-12-28-x9d+.bin)

//The protocols below need a CYRF6936 to be installed
#define DEVO_CYRF6936_INO
//#define DSM_CYRF6936_INO
//#define J6PRO_CYRF6936_INO
#define WK2x01_CYRF6936_INO <<< - The protocol i would like to activate

does it is normal ???
thanks
@+
Jan 27, 2017, 09:34 AM
Pascal
hpnuts's Avatar
If it does not appear on your Taranis, just select custom protocol: 30 and the sub protocol you want from this list:
WK2801 number 0, 8 channels
WK2401 number 1, 4 channels
W6_5_1 number 2, 6 channels
W6_6_1 number 3, 7 channels
W6_HEL number 4, 6 channels, option is used to limit COL
W6_HEL_I number 5, 6 channels, COL inverted, option is used to limit COL

Pascal


Quick Reply
Message:

Thread Tools