1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

854 Commits

Author SHA1 Message Date
James Cotton
bbbca319d8 Merge commit 'c4df0c0ceff8ba985bb20d815f27910b9e59d992' into revolution 2012-03-11 13:14:06 -05:00
Alessio Morale
c4df0c0cef Support for port remapping on serial ports
Support for receiver configuration (PPM, PWM and DSM)
There are still problems with Flexi port (not sure if related to a problem with my board) and Uart/SBUS that has the input always inverted.
2012-03-11 18:38:49 +01:00
Stacey Sheldon
3210bd3f9c f4 usb_dcd: disable FIFO empty IRQ while waiting for tx completion
CPU was being hammered with FIFO empty IRQs if we queued data but
the host wasn't actively draining the FIFO.

This was entirely unexpected so this hack should probably be
removed once we can figure out why this was happening.

This is almost certainly hiding some other issue.
2012-03-07 20:36:37 -05:00
Stacey Sheldon
c4bd286739 f4 usb_hid: track whether we have buffers queued on endpoints
Make sure we don't clobber our endpoint configuration by
double configuring an Rx or Tx buffer against it.  Wait for
the completion of the previous operation before allowing
endpoint configuration again.
2012-03-07 20:36:36 -05:00
Stacey Sheldon
65fc6104e6 f4 usb_hid: ignore upper layers if USB IF not yet enabled
Upper (COM) layer was calling down into the HID layer before
the HID interface had been enabled.  This was leading to
interacting with the endpoint Rx and Tx FIFOs prior to init.
The FIFO config was then being clobbered when we the USB IF
was eventually enabled.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
1f37806eab f4 usb_hid: fix typo in EP IN registration call
Code was using the size of the Rx buffer instead of the Tx
buffer when registering.  Buffers are currently the same
size so wasn't causing any issues.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
bc3ee6209c f4 usbhook: drop in/out bit from EP numbers before using as index
USBHOOK endpoint callback arrays should not be indexed with the
0x80 (in/out) bit set.  Oops.
2012-03-07 20:01:35 -05:00
Stacey Sheldon
6832a62872 f4 bl_helper: clear all flash errors as we unlock the flash
Error flags being set were causing flash erase operations to
fail.  Not sure why these flags were set though so this might
be hiding some other problem.
2012-03-07 19:53:18 -05:00
Stacey Sheldon
4ea1156e7b f4 bl_helper: teach bl_helper about f4 flash sector map 2012-03-07 19:53:17 -05:00
Stacey Sheldon
d1d123e4f6 revo bl: turn on USB and add support for OP DFU protocol 2012-03-07 19:53:17 -05:00
Stacey Sheldon
c854c3f4a4 usbhook: add support in API for deactivating USB 2012-03-07 19:53:17 -05:00
Stacey Sheldon
cb9c3a9b7e usbhook: delete dead code
Remove old code left-over from porting from F1 to F4.
2012-03-07 19:53:17 -05:00
Stacey Sheldon
fdf54ab86c hid: fix response to HID descriptor
HID driver was incorrectly giving back the HID interface
descriptor when asked for the HID descriptor.  This should
let OP boards interact better with generic HID layer drivers
and also gives us nicer output in lsusb once the HID descriptor
is read.
2012-03-07 19:52:54 -05:00
James Cotton
7961aba83c Clean up a few more compiler warnings
Conflicts:

	flight/PiOS/Common/pios_ms5611.c
2012-03-03 13:32:56 -06:00
James Cotton
bc8b72623e Get rid of some unused variables 2012-03-03 11:54:09 -06:00
James Cotton
f20e5da9ed Merge branch 'next' into revolution
Conflicts:
	ground/openpilotgcs/src/plugins/config/config.pro
	ground/openpilotgcs/src/plugins/config/configrevowidget.h
	ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp
2012-03-03 11:41:41 -06:00
James Cotton
e3df261213 Merge branch 'stac/revo-usb' into revolution
Conflicts:
	flight/Revolution/System/pios_board.c
2012-03-02 13:00:13 -06:00
James Cotton
72a93dbae5 Fix from PT for OSX/Windows F4 USB HID to send the full report size even if not
all used.
2012-03-02 11:11:36 -06:00
James Cotton
d018d93e88 Clean up previous commit a bit and make the sampling rate a variable (and adapt
the sampling time accordingly).
2012-02-13 01:49:54 -06:00
James Cotton
3acbfbe96c Convert the pressure sensor code to most of the calculations as int64 to retain
precision.
2012-02-13 01:22:48 -06:00
James Cotton
d8f0494e57 Merge branch 'revolution' into revolution_overo 2012-02-11 20:02:20 -06:00
Alessio Morale
22b211167c Ported pios_iap.c to F4
restored failed boot count check on pios_board.c for revo
2012-02-11 13:49:32 +01:00
Stacey Sheldon
e2939dae2a revo usb: Add support for USB to Revo 2012-02-07 02:25:31 -05:00
Stacey Sheldon
3c1b1001f9 f4 usb: Allow USB descriptors to be const through ST APIs 2012-02-07 02:25:31 -05:00
Stacey Sheldon
56102013aa f4 usb: correct function prototypes in bsp template
This file is not actually used but it should still be accurate.
2012-02-07 02:25:31 -05:00
Stacey Sheldon
57f9f6e3d1 f4 usb: configure and build ST USB OTG and USB DEV libraries 2012-02-07 02:25:31 -05:00
Stacey Sheldon
1e79ed6d54 f4 usb: fix invalid reference to stm32f4_discovery.h 2012-02-07 02:25:31 -05:00
Stacey Sheldon
04b81f13a7 f4 usb: fix invalid references to stm32f2xx.h 2012-02-07 02:25:31 -05:00
Stacey Sheldon
266b95561f f4 usb: rename device template to real config file 2012-02-07 02:25:30 -05:00
Stacey Sheldon
a4ae844f2b f4 usb: rename otg template to real config file 2012-02-07 02:25:30 -05:00
Stacey Sheldon
58bbe0870d f4 usb: allow device->host data to be const
This allows the application code to pass const
descriptors to the Tx APIs in the STM32 USB
library.
2012-02-07 02:25:30 -05:00
Stacey Sheldon
4b911bb3be f4 usb: remove unused device class examples 2012-02-07 02:25:30 -05:00
Stacey Sheldon
efbe8bbfdd f4 usb: convert all line endings to LF-only
Line ending changes only.  No functional changes.
2012-02-07 02:25:30 -05:00
Stacey Sheldon
6a43d1c7ed f4 usb: Import pristine STM32F4 USB Library v1.1.0
Taken from version STM32F4-Discovery_FW_V1.1.0 of the
library from ST.
2012-02-07 02:25:30 -05:00
Brian Webb
3f66afd74a Removed emacs mode header from pios_gcsrcvr.c 2012-02-04 08:42:16 -07:00
Stacey Sheldon
4fafbb13ed makefile: Add EF (Entire Flash) targets for all boards
These new build targets will construct a flash image that
includes both a bootloader as well as a firmware image all
in one.  Examples:
  make ef_coptercontrol
  make ef_revolution

This also adds support for a new target for writing this EF
image to boards that support a DFU interface (only F4-based
boards).  This can be done by running:
  make dfuutil_install
  # Boot board with SBL asserted to activate STM32 DFU ROM
  # Attach USB cable
  make ef_revolution_dfu

Bootloader images are also now padded out to occupy the full
BL flash region.
2012-02-03 00:59:36 -05:00
Brian Webb
a314604f9b Added failsafe to GCS Receiver device. 2012-02-02 19:59:42 -07:00
James Cotton
18a64e261f Going a bit overkill with this - deinit who SPI block between transactions. 2012-02-02 12:32:57 -06:00
James Cotton
03cfb1453a DeInit SPI DMA between transactions. Somehow if this doesn't happen the next
transaction doesn't start at the beginning again.  Something is still not quite
right because first few bytes aren't getting across.  Need logic analyzer.
2012-02-02 11:37:35 -06:00
James Cotton
77a6abb341 For PIOS_SPI F4 do not enable the TX irq. Also do not wait for the
transmission to finish either.
2012-02-02 11:24:14 -06:00
James Cotton
0a71a48c57 Sending all FF finally again 2012-02-02 10:36:09 -06:00
James Cotton
29237f97ae For SPI slave devices we need to handle the interrupt differently since
transactions should already be completed.  Also reset the callback so in the
case of noise on the IRQ line it will not keep firing interrupts.

I suspect we should probably disable interrupts in this handler to prevent
refiring.
2012-02-02 10:13:09 -06:00
Alessio Morale
5449408763 Merge branch 'amorale/timerprescaler' into inoutch8 2012-02-01 00:23:53 +01:00
Alessio Morale
820e8ac062 Handle different prescaler values for timers on APB1 and APB2.
The PIOS_MASTER_CLOCK has been removed in favor of
PIOS_SYSCLK (the master clock value,168000000 for revolution)
PIOS_PERIPHERAL_APB1_CLOCK and
PIOS_PERIPHERAL_APB2_CLOCK
Look at STM32F4xx_Revolution.h for the list of timer/peripheral and APB them belongs.
2012-01-28 20:04:55 +01:00
James Cotton
13447ac907 Fix the MPU6000 implementation 2012-01-28 00:21:58 -06:00
James Cotton
f311700804 Flashfs: Whenever failing out of a transaction unlock the semaphore 2012-01-26 14:14:50 -06:00
James Cotton
85bfa7dcf9 Flashfs: Missed calculation of the header crc for monolitihic write 2012-01-26 13:32:53 -06:00
James Cotton
ad3d470f40 Flashfs and Flash: Add new function to write a series of blocks in one flash
write transaction to improve efficieny.
2012-01-26 12:39:35 -06:00
James Cotton
80705cdba1 Flash: Because on CC/CC3D the flash is initialized before FreeRTOS is started
we cannot use the transaction lock or the delay while saving.
2012-01-26 11:50:05 -06:00
James Cotton
4fc907ad0d Add a transaction semaphore to flash and flashfs to make sure multiple saves
or loads can't be attempted between threads
2012-01-26 11:36:07 -06:00