Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRO X2.1-777 DSM(X) voltage switches off and no GPS in #15595

Closed
taileron opened this issue Aug 21, 2020 · 18 comments
Closed

MRO X2.1-777 DSM(X) voltage switches off and no GPS in #15595

taileron opened this issue Aug 21, 2020 · 18 comments
Labels

Comments

@taileron
Copy link
Contributor

taileron commented Aug 21, 2020

Describe the bug
when the fc is booted no 3.3V goes to Spektrum Sat
GPS doesn´t work
could be a relation to #15527

To Reproduce
Steps to reproduce the behaviour:
while the fc boots there is Spektrum 3.3V then it disappears finally no rc-in is detected
the receiver is not recognized even if 3.3V is supplied externally
GPS uart tx (202) or Tel 1 (101) sends initialization to GPS module (measured) but the fc doesn´t detect a GPS module on uart rx (baud=0 and others tested) while it´s external I2C mag gets detected and works perfect.

Expected behavior
rc receiver works and shows channels
GPS works on one of the fc´s uarts

@dagar
Copy link
Member

dagar commented Aug 31, 2020

rc receiver works and shows channels

This is handled by the px4_io-v2.

@taileron
Copy link
Contributor Author

taileron commented Aug 31, 2020

How can I force to flash a firmware to the IO unit expect of pressing safety button or:
px4io forceupdate MAGIC /etc/extras/px4_io-v2_default.bin
Could the px4io bootloader be spoofed?

Firmware of px4_io-v2 still gets rejected by:

[PX4IO] using firmware from /etc/extras/px4_io-v2_default.bin
[PX4IO] bad sync 0x7f,0x7f
[PX4IO] found unsupported bootloader revision 269619218, exiting 

@taileron
Copy link
Contributor Author

taileron commented Sep 3, 2020

Could the IO possibly be flashed from outside despite the wrong bootloader via SWD ... what would be necessary for this?

@taileron
Copy link
Contributor Author

taileron commented Oct 8, 2020

With the meanwhile successfully flashed IO by SWD almost all of the above mentioned issues are fixed.
Only (Ublox M8) GPS can not be used on any UART (I2C works). Telemetry (57600 or wifi 921600) can be used on all this UARTs without problems. Even with 9600 baud the GPS module gets not initialized correctly. The whole systems work on PixRacer that has the same connectors and pinouts for UARTs. The GPS initialisation signal looks in the ocilloscope very similar to that Pixracer sends but the GPS sends back 9600 each second instead of 115200 with 5Hz.
Something, telemetry doesn´t use goes wrong e.g. RX DMA

@taileron
Copy link
Contributor Author

taileron commented Oct 14, 2020

It´s definitely only the rx part of the uart and only when the interface concerned is used for gps. For telemetry all uarts work perfect. The gps module receives the commands to negotiate bitrate etc. but nothing comes back to PX4.
The signal from the GPS module is perfectly measurable at the RX pin.

nsh> gps status
INFO  [gps] Main GPS
INFO  [gps] protocol: UBX
INFO  [gps] status: NOT OK, port: /dev/ttyS3, baudrate: 0
INFO  [gps] sat info: disabled

#15907 probably the similar issue?

A fc hardware problem is now practically impossible, because Mavlink works perfect even at the same uarts:

nsh> mavlink status

instance #0:
	mavlink chan: #0
	type:		USB CDC
	flow control: OFF
	rates:
	  tx: 0.000 kB/s
	  txerr: 1.195 kB/s
	  tx rate mult: 0.050
	  tx rate max: 800000 B/s
	  rx: 0.000 kB/s
	FTP enabled: YES, TX enabled: YES
	mode: Config
	MAVLink version: 2
	transport protocol: serial (/dev/ttyACM0 @2000000)

instance #1:
	mavlink chan: #1
	type:		RADIO Link
	  rssi:		0
	  remote rssi:	0
	  txbuf:	100
	  noise:	0
	  remote noise:	0
	  rx errors:	0
	  fixed:	0
	flow control: OFF
	rates:
	  tx: 1.102 kB/s
	  txerr: 0.000 kB/s
	  tx rate mult: 1.000
	  tx rate max: 24000 B/s
	  rx: 0.032 kB/s
	FTP enabled: YES, TX enabled: YES
	mode: Normal
	MAVLink version: 2
	transport protocol: serial (/dev/ttyS1 @921600)

@taileron
Copy link
Contributor Author

@dagar what else could I test to get GPS working, the interfaces are basically working, only to all GPS modules there is no connection via the RX side of the UART. Either something is wrong with BAUD, timings, RX DMA or frequencies, that do not interfere when ESP 8266 telemetry connected to this GPS uart connector.
All parameters are correct in any case but behave incorrectly for GPS use.
UART4 and USART2 has the same behaviour.
(to test GPS on (101 / USART2) Tel1 baud=0 or 9600 and Tel1 on (201 / UART4) GPS UART baud=921200)
No matter on which serial port it is always only GPS which is not detected.
If negotiating the baud rate was the reason, it should work with 9600

What would make sense to change for tests in the code ? e.g. Boards/NuttX

@taileron
Copy link
Contributor Author

U(S)ART ports also used as telemetry generate more transmission errors than controllers, e.g. Pixracer on which GPS is detected.
Can the clock frequency of the F777's U(S)ARTs be increased extremely fine for testing?
IMU_GYRO_RATEMAX=800 results in Sensors Status a loop rate of only approx 792 Hz
Pixracer results above 799 Hz which seems to be much more accurate

@taileron
Copy link
Contributor Author

@dagar Disabling RXDMA for UART4 boards/nsh/defconfig enables GPS.
But this does not reduce the transmission errors for USART2, telemetry does not seem to work at all without RXDMA

@dagar
Copy link
Member

dagar commented Oct 21, 2020

@dagar Disabling RXDMA for UART4 boards/nsh/defconfig enables GPS.
But this does not reduce the transmission errors for USART2, telemetry does not seem to work at all without RXDMA

Where/how are you measuring transmission errors?

@dagar dagar added the bug label Oct 21, 2020
@taileron
Copy link
Contributor Author

taileron commented Oct 22, 2020

So far only from the feedback like percentage of lost packets and interruptions or time outs during log download from QGC.
Unfortunately, the different QGCs do not behave identically and therefore are not really objective measurement methods ...
From time to time even the attempt of a log download killed the whole connection.

@taileron
Copy link
Contributor Author

@dagar To make it more objective, I have now taken the master from September 5th (currently my most stable) and switched off RXDMA for UART4 and USART2.
Now also the lost packets in the telemetry and aborts or timeouts in the log download disappear along with all working GPS.
For further testing I switched off the RXDMA for the cross connection UART8 to the IO but even after I undid it, I can't get the IO to start from now on anyhow the FW doesn't accept the checksum of the IO after the external Flash via SWD

@taileron
Copy link
Contributor Author

@dagar later IO firmwares are a few bytes bigger, if you flash an older one via SWD, the area above the smaller FW will remain with the previous code.
If you delete F000-FC00 manually before, the IO works again, but I can't determine if the connection to the IO is better with or without UART8 RXDMA. If RXDMA would work correctly, it should be more tolerant of wrong timings etc.

@LorenzMeier
Copy link
Member

Could you re-try current master? A bunch of safety checks got into the way of upgrading IO firmware which might have affected you.

@taileron
Copy link
Contributor Author

taileron commented Jan 4, 2021

The IO is still not automatically updated (with and without pressing SB at start).
Which IO bootloader is expected by this procedure? So far I have tested the PX4 BL Master and one I got from MRO/APM https://firmware.ardupilot.org/Tools/Bootloaders/px4io_bl.bin

@taileron
Copy link
Contributor Author

taileron commented Jan 13, 2021

most aspects of the board are already full functional: sensors, rc in, mavlink, io, uavcan all works quite stable.

a few issues are left:

  • uarts are not working smooth (compared to e.g. PixRacer) especially with active RX or TX dma
  • gps is only recognised with rx dma = off
  • io fw update can only be carried out via swd, not from fmu
  • CONFIG_ARMV7M_LAZYFPU=y causes hardfault X2.1-777 doesn´t boot anymore with current master #16548
  • mtd driver doesn´t start
    ERROR [PX4_MTD] failed to initialize mtd driver
    ERROR [PX4_MTD] mtd failure: -5 bus 2 address 0 class 1

@taileron
Copy link
Contributor Author

can be closed only #17558 is left for this board

mRo Hardware automation moved this from To do to Done Jan 11, 2022
@taileron
Copy link
Contributor Author

the dsm input always worked perfect with the board because rx dma was never set to that correponding port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

3 participants