Commit Graph

3817 Commits

Author SHA1 Message Date
borisbstyle 92dbd68d9c Fix serial.h 2016-02-02 23:36:44 +01:00
Dominic Clifton c8c5eaf677 Prevent serial tx buffer overflow.
Note: this is likely not the best solution, we can investigate further
in due course.

See  #1753
2016-02-02 23:36:44 +01:00
borisbstyle 2ca14ed3a6 Add target to fake_travis 2016-02-02 23:36:44 +01:00
borisbstyle 220850e429 Fix Spracing Mini merge 2016-02-02 23:36:43 +01:00
Dominic Clifton a259a49db1 SPRacingF3Mini - Reduce current draw when using transponder while
connected via USB cable.
2016-02-02 23:36:43 +01:00
Dominic Clifton 6d32aa5d7b SPRacingF3Mini - First cut of transponder system.
Implementation is DMA buffer based, just like the WS2811 LED Strip code,
so that there is minimal impact on flight performance.

Currently the code is mutually exclusive with the LED_STRIP code and
there is no means to set the transponder code.
2016-02-02 23:36:42 +01:00
Nicholas Sherlock 360ea84a14 SDCard: multi-block write, card profiling. AFATFS: Bugfixes 2016-02-02 23:36:42 +01:00
Nicholas Sherlock 518c765620 Robustness improvements for Blackbox SD card log start 2016-02-02 23:36:41 +01:00
Nicholas Sherlock 09904b2206 Better reporting of fatal SD card states 2016-02-02 23:36:41 +01:00
Dominic Clifton ea0df5d1a1 Enable MSP on first non USB VCP serial port for all VCP targets by
default.  This also helps with 1WIRE passthough as VCP to 1WIRE is not
implemented yet.
2016-02-02 23:36:41 +01:00
Nicholas Sherlock 67e425f416 Enable Blackbox on SD card by default on SPRACINGF3MINI 2016-02-02 23:36:40 +01:00
Nicholas Sherlock 9d29efdd5d Only look for SD card during initial startup and give up after timeout 2016-02-02 23:36:40 +01:00
Nicholas Sherlock e9b6867d40 Add MSPs for Blackbox and SD card status/configuration 2016-02-02 23:36:39 +01:00
Dominic Clifton 28c8a918db Add 1WIRE configuration. 2016-02-02 23:36:39 +01:00
Nicholas Sherlock 4700bb638c More detailed afatfs state reporting for CLI 2016-02-02 23:36:38 +01:00
Nicholas Sherlock 9389cc4a29 Remove "SDCARD" toggleable feature 2016-02-02 23:36:38 +01:00
Nicholas Sherlock 536579e83a Retain SD card log data when power is lost in flight 2016-02-02 23:36:38 +01:00
Nicholas Sherlock 6055ab2432 Updates to use newly merged SD card code 2016-02-02 23:36:37 +01:00
Nicholas Sherlock dce49d4abb Delete interim SD card support 2016-02-02 23:36:36 +01:00
Nicholas Sherlock 71335dc65d Support enabling DMA for sdcard write at runtime 2016-02-02 23:36:36 +01:00
Nicholas Sherlock 75d5c64b33 Flush SD card pages in write order 2016-02-02 23:36:35 +01:00
Nicholas Sherlock 392ec7412a Reset the card when a timeout/fault is detected during init/read/write 2016-02-02 23:36:35 +01:00
Nicholas Sherlock e572ccebad Discard logged files when blackbox was paused for the entire flight 2016-02-02 23:36:35 +01:00
Nicholas Sherlock a35ccd28de DMA support for SD-card write 2016-02-02 23:36:34 +01:00
Nicholas Sherlock 97ee6142a9 Fix timing bugs during SD card init which become visible with -Os 2016-02-02 23:36:34 +01:00
borisbstyle efda3f86c1 fix merge 2016-02-02 23:36:33 +01:00
Nicholas Sherlock 14c13085b7 Add AFATFS support to Blackbox 2016-02-02 23:36:33 +01:00
Nicholas Sherlock 04d8dd27bf Move SDCard SPI clock dividers into target.h (they depend on the bus Hz) 2016-02-02 23:36:32 +01:00
Nicholas Sherlock 96182c7c07 Working on using AFATFS from Blackbox 2016-02-02 23:36:32 +01:00
Nicholas Sherlock 84d3cc6175 Basic SDCard block read / write (minimal timeout/error handling) 2016-02-02 23:36:32 +01:00
Nicholas Sherlock 3941c6c252 Delete dubious SPI timeout mechanism
The result from this mechanism is never checked, and SPI is not a bus
prone to timeouts anyway (the master generates the clock and the
transmission happens in a deterministic amount of time no matter if the
slave is cooperative, absent, or uncooperative.)

The timeout counter was set *per transfer*, and is fixed no matter what
the SPI clock speed. If the transfer size is large, and the SPI clock is
slow, stalls on the SPI bus are unavoidable (as we can generate data
faster than SPI can transmit it). These accumulate over the length of a
long transfer and trigger a "timeout". Detecting these as fatal timeouts
is not helpful.
2016-02-02 23:36:31 +01:00
Nicholas Sherlock 264c094eef Add ability to check for SPI bus busy condition 2016-02-02 23:36:31 +01:00
Dominic Clifton 77f0fb716d Fix MPU6500 bypass configuration. 2016-02-02 23:36:30 +01:00
Dominic Clifton 180e1cb7b6 SPRacingF3Mini - Quick hack to allow configuration to be reset when
holding buttons A and B down for 5 seconds when powering on.
2016-02-02 23:36:30 +01:00
Dominic Clifton b030d494c8 SPRacingF3Mini - Change configuration defaults. 2016-02-02 23:36:30 +01:00
Dominic Clifton 0ef8f08f10 SPRacingF3Mini - Enter spektrum bind mode when button A is pressed on
cold boot.
2016-02-02 23:36:29 +01:00
Dominic Clifton 680acc518f SPRacingF3Mini - Clarify timer usage. 2016-02-02 23:36:29 +01:00
Dominic Clifton 52d97869b8 SPRacingF3Mini - Initial support for new target. 2016-02-02 23:36:28 +01:00
Dominic Clifton 7f398cbe4b Cleanup sdcard info messaging. 2016-02-02 23:36:27 +01:00
Dominic Clifton 8f461b3942 Allow SD card detect signal to be inverted. 2016-02-02 23:36:27 +01:00
Dominic Clifton 4b955f09da SDCard - Basic functionality.
Detect card, query capacity, read data.
2016-02-02 23:36:26 +01:00
Dominic Clifton b1ba72c162 Update MPU6050 so it works with later versions. 2016-02-02 23:36:26 +01:00
Michael Hope cf7c9d4100 cli: add buffering.
This greatly speeds up the CLI when running over USB VCP under a
virtual machine.

Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:26 +01:00
Michael Hope 195456f9ac serial: allow buffering to speed up USB virtual COM ports.
Add begin write and end write hints.  If implemented by the serial
driver, then the driver can buffer up data sent via serialWrite() and
flush it when serialEndWrite() is called.

Implemented at the buffer level as it requires the least change to how
serial_msp and serial_cli are architected.

Also tidy up the visibility in the VCP driver.

Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:25 +01:00
Michael Hope 0e460c18b0 msp: add buffering around the writes.
This bulks up the writes and lets the USB VCP driver send one 20 byte
frame instead of 20 one byte frames.  This speeds up the blackbox
download and makes VCP much more reliable when running under a virtual
machine.

Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:25 +01:00
Michael Hope 96306ff9ab serial: add writeBuf() and implement for USB.
This lets USB send up to 32 bytes in a frame instead of 32 one byte
frames.  Add a fallback for drivers that don't implement writeBuf().

Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:24 +01:00
Michael Hope 75c86825f7 drivers: add a buffering writer.
This wraps around the serial API and buffers a configurable number of
characters before flushing.

Signed-off-by: Michael Hope <mlhx@google.com>
2016-02-02 23:36:24 +01:00
Dominic Clifton 0344fa22f4 Syncronsise I2C timeouts of F1 and F3 targets 2016-02-02 23:36:24 +01:00
borisbstyle 35defbb27b Sonar merge 2016-02-02 23:36:23 +01:00
Dominic Clifton 75cd1d88eb CHEBUZZF3 - Enable I2C display support. 2016-02-02 23:36:23 +01:00