Brian Webb
b824c87056
Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2
2012-05-25 06:26:29 -07:00
Brian Webb
701a480f01
Tuning configutation of PipX.
2012-05-24 18:08:29 -07:00
Brian Webb
a434688b42
Zero out watchdog register on init.
2012-05-24 18:04:42 -07:00
Stacey Sheldon
dff43d5156
board_info: add guard for multiple includes of .h file
2012-05-22 21:50:53 -04:00
Brian Webb
8b98d48fc4
Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2
2012-05-22 06:27:45 -07:00
Stacey Sheldon
dab400c80d
usb: decouple "available" from "cable connected"
...
The bootloader needs to understand whether the USB cable
is connected. The HID and CDC drivers need to know if
the cable is connected _and_ the device has been enumerated
already. Separate these two concepts in the API.
Combining these was resulting in the BL not properly
detecting that the cable was plugged in, and trying to boot
the firmware image immediately. This effectively bricked
the board if you ever had an invalid firmware image.
It also happens to be the case that the BU images automatically
invalidate themselves after updating the BL so they don't run
again. The cable detect bug + this intended behaviour of the
BU image resulted in a bricked board after upgrading the BL.
2012-05-22 00:21:24 -04:00
Brian Webb
6cb13aa2ba
Fixed failed merge with next.
2012-05-20 18:36:08 -07:00
Brian Webb
2f1a9e3e7d
Added PPM input to the PipXtreme. Also added configurable GCSReceiver timeout.
2012-05-20 18:30:37 -07:00
Stacey Sheldon
d7d670036b
usb: make sure USB device is off limits until it has been init'ed
...
USB device was being accessed prior to being initialized.
This resulted in a hard-fault or NMI when using any endpoint
beyond 0 or 1 which are init'ed by the BL. This broke VCP which
is on endpoint 2 (control) and 3 (data).
This bug was introduced in 5ad37e69
which stopped checking the
transfer_possible variable.
2012-05-20 13:28:16 -04:00
Stacey Sheldon
698ea8e86e
usb util: Add common utility functions for USB descriptors
...
Make a home for generic functions related to USB.
2012-05-19 16:14:10 -04:00
Stacey Sheldon
3e0a9bc47e
usb: Change supported LANGID in USB descriptor to be English US
...
Some versions of Windows will ignore the USB device serial number
if the string is not delivered with LANGID = English US 0x0409.
This is true regardless of the configured locale of the machine.
2012-05-19 16:12:34 -04:00
Stacey Sheldon
b905607dc7
serial: use defines for serial number lengths
...
Use #defined sizes for returned serial number lengths instead
of hard-coded values.
2012-05-19 16:06:48 -04:00
Stacey Sheldon
ba8d60301c
usb: remove run-time selectable device descriptors
...
BL images now always use hid-only.
FW images can use hid-only or hid+vcp but this is selected
ONLY at compile time based on whether PIOS_INCLUDE_USB_CDC
is defined.
CC uses HID+VCP by default now.
2012-05-19 16:06:48 -04:00
Stacey Sheldon
48cb20dc81
hid+vcp: change default USB descriptor to HID+VCP
...
Now that we have a USB descriptor for HID+VCP that works
on Ubuntu 11.10, MacOS 10.7.3, Win7-SP1-32bit,
WinXP-SP3-32bit, Win7-SP1-64bit.
VCP is known to not work on WinXP without service pack 3.
2012-05-19 16:06:30 -04:00
zedamota
eb83afdcf1
Working compliant VCP+HID descriptors for Windows.
2012-05-19 15:40:46 -04:00
Brian Webb
00a83f3984
Reverted change to link_STM32103CB_PIPXTREME_memory.ld
2012-05-18 19:08:44 -07:00
Brian Webb
563b454693
Fixed compiling of PipX bootloader.
2012-05-13 20:19:04 -07:00
Brian Webb
ec67742ff6
Added configuration of COM ports on PipX.
2012-05-12 13:16:36 -07:00
Brian Webb
1f5dbcf57c
Mostly complete PipX configuration GUI.
2012-05-11 17:51:18 -07:00
Brian Webb
454144f46c
Pairing and saving settings working.
2012-05-06 20:47:21 -07:00
Brian Webb
3cf4fe6512
Reverted some USB changes.
2012-05-05 10:10:40 -07:00
Brian Webb
480371a43e
Resolving merge with origin/next
2012-05-05 09:53:54 -07:00
Brian Webb
e83fec0463
Merged latest origin/next.
2012-05-05 09:40:44 -07:00
James Cotton
3155324384
Merge branch 'next' into cc3d
...
Conflicts:
Makefile
ground/openpilotgcs/src/plugins/config/configahrswidget.cpp
shared/uavobjectdefinition/ahrscalibration.xml
shared/uavobjectdefinition/ahrssettings.xml
shared/uavobjectdefinition/attituderaw.xml
2012-05-03 16:31:49 -05:00
Brian Webb
8da4b9c745
Merge remote-tracking branch 'origin/stac/pt-win-vcp-fix' into Brian-PipXtreme-V2
2012-05-02 06:42:30 -07:00
Brian Webb
290acf0398
Fixed watchdog timeouts.
2012-05-01 20:48:35 -07:00
Brian Webb
217aad8c37
Now using read and write threads for both radio and com ports on PipX. Also cleaned up UAVTalk message handling.
2012-05-01 19:14:58 -07:00
James Cotton
3f63051df8
PiOS ADC: This could still use a lot of cleanup and needs to be implemented in
...
the non-FreeRTOS case but now the ADC device is allocated dynamically which
means CC3D won't waste heap on it.
2012-05-01 11:11:31 -05:00
Brian Webb
84a19ebeab
Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2
2012-04-28 19:30:35 -07:00
Brian Webb
25ffb99cee
Added initialization of flash eeprom for saving settings to PipX.
2012-04-28 19:29:56 -07:00
Brian Webb
1048eb7e2c
Added pios_eeprom for saving settings.
2012-04-28 19:29:25 -07:00
Brian Webb
f726cc6a9d
Added a RTC supervisor timer to RFM22B driver.
2012-04-21 18:31:49 -07:00
Stacey Sheldon
41d4ba4b1a
hid+vcp: change default USB descriptor to HID+VCP
...
Now that we have a USB descriptor for HID+VCP that works
on Ubuntu 11.10, MacOS 10.7.3, Win7-SP1-32bit,
WinXP-SP3-32bit, Win7-SP1-64bit.
VCP will is known to not work on WinXP without service pack 3.
2012-04-20 08:39:04 -04:00
zedamota
4968df183a
Working compliant VCP+HID descriptors for Windows.
2012-04-20 08:38:24 -04:00
Brian Webb
62c5036220
Added PipXStatus and PipXSetting UAVobjects and some initial support for them.
2012-04-17 17:36:05 -07:00
Stacey Sheldon
62fb009acd
gpio: stop enabling pull-ups on all GPIOs in bootloader
...
The bootloader has been enabling pull-ups on all GPIO
pins during early init. These pull-ups are disabled
immediately before jumping to the firmware. This transition
results in all servos seeing a wide pulse as the board
resets making them jerk sideways aggresively and then snap
back to neutral.
2012-04-16 14:41:25 -04:00
Stacey Sheldon
5ca4ec7934
ppm: adjust min frame pulse width for 8ch x 18ms frames
...
All channels at max when using the FrSKY 4ch D4FR in PPM
mode results in the frame pulse shrinking well below our
threshold of 3800us and we lose frame.
With all 8 channels at max, the frame pulse becomes
indistinguishable from the other channels. Using all 8
channels with the FrSKY in PPM mode is NOT recommended
even after this change.
Recommend using at most 7 active channels in this mode so
we can still find the frame pulse.
2012-04-16 14:33:28 -04:00
Brian Webb
4936cd8fd2
Added PipXStatus and PipXSettings UAVObjects and added support the sending/receiving UAVTalk objects on the PipX.
2012-04-10 20:22:53 -07:00
Brian Webb
e639d173a0
Create ID from a hashed CPU serial number.
2012-04-07 19:41:23 -07:00
Brian Webb
7b49a6b820
Added watchdog to radio com bridge in PipXtreme.
2012-04-07 19:12:49 -07:00
Brian Webb
0f9f897870
Added PPM packet to packet handler, created replacement system module for PipXtreme (PipXtreme module), removed all UAVObjects from PipXtreme, and added parsing of incoming (over USB/COM) UAVTalk stream.
2012-04-07 18:17:32 -07:00
Brian Webb
56a2006fd8
Reconfigured to run on the real PipX board.
2012-04-06 18:44:31 -07:00
Brian Webb
eeb96955f9
Fixed ADC configuration
2012-04-06 17:43:43 -07:00
Brian Webb
bc1adb2519
Some cleanup of rfm22 driver.
2012-04-06 17:36:35 -07:00
Brian Webb
fff93910e2
RFM22B device now fully interrupt driven. Packet handeling moved to RadioComBridge module.
2012-04-05 20:24:50 -07:00
James Cotton
e82323af32
Make revolution work with the FreeRTOS queue based MPU6000 driver
2012-04-03 03:41:52 -05:00
James Cotton
d7cb232315
Add MPU6000 accel range to config structure. Also put in correct values.
2012-04-03 02:07:04 -05:00
James Cotton
35854b35f6
MPU6000 accel value coming out twice as high as it should. Need to store scale
...
in cfg structure to fix this properly.
2012-04-03 02:07:04 -05:00
James Cotton
a960f3d07e
Switch the MPU6000 driver to using a FreeRTOS queue. Need to update Revo code
...
to take advantage of this.
2012-04-03 02:07:03 -05:00
James Cotton
1415728762
Get the MPU6000 CC3D working. Right now the ADC system is commented out, which
...
will break regular CC.
2012-04-03 02:07:03 -05:00
Stacey Sheldon
eab923fee0
revo: move fw image into 128KB sectors
...
This saves the more versatile 16KB and 64KB sectors
for other purposes.
2012-03-28 21:52:43 -04:00
Stacey Sheldon
91cffb1809
f4 usb: don't skip yield from ISR
...
Function was returning prior to the code that might
need to yield from within the ISR.
2012-03-27 00:18:44 -04:00
Stacey Sheldon
730defb698
f4 flash: fix flash voltage range setting in bl_helper
...
F4 boards are powered by 3.3V which corresponds to
VoltageRange_3. Fix this to match actual VDD so we
get faster erase/write times.
2012-03-22 22:37:31 -04:00
James Cotton
c7ff2a46c7
Merge remote-tracking branch 'origin/laurent/modelview' into revolution
...
Conflicts:
flight/CopterControl/Makefile
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configgadgetwidget.h
2012-03-22 02:58:24 -05:00
Brian Webb
823b111d60
Added Reed-Solomon error correction to PipXtreme. The code is a slight modification of rsscode ( http://rscode.sourceforge.net ). Packet acking has also been turned on as the default, so each packet is error corrected, and if errors remain, the packet is NACKed, otherwise it is ACKed. Also temporarily turned off UAVTalk parsing. This was causing the CC to be identified as a PipX due to the PipX sending UAVObjects (I believe) from the system module. The system module is going to have to be modified/replaced for the PipX.
2012-03-18 17:43:29 -07:00
Brian Webb
ecdf150946
Moved RFM22B code from PipXtreme to pios_rfm22b.c driver. The radio is now passing data.
2012-03-18 10:22:05 -07:00
Brian Webb
78b622a8d8
Merge branch 'next' of ssh://git.openpilot.org/OpenPilot into PipXtreme
2012-03-15 19:31:18 -07:00
Brian Webb
b34b849453
Added start at a modified PipX packet handler.
2012-03-15 19:29:54 -07:00
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
3782cdc58e
bu: drop CC and PipX from BU targets since they don't build
...
The CC and PipX bootloader updater (BU) builds don't currently
work due to some recent changes in how LEDs are handled.
Remove them from the default BU targets so that the all_flight
target can build clean again.
Also fix a linker warning in OP build.
2012-03-10 20:41:15 -05: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
Brian Webb
d73895de7d
Working PipX com relay.
2012-03-07 18:05:42 -07: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
Brian Webb
a0bdc58e5b
Added framework for rfm22b com device.
2012-02-28 21:30:06 -07:00
Brian Webb
992aa3bec6
Updated PipX branch to use CDC device with a VCP (not working yet).
2012-02-25 09:07:37 -07:00
Brian Webb
01f314724b
Updates to USB configuration on the PipXtreme.
2012-02-24 15:54:26 -07:00
Brian Webb
483a96c31d
Some more cleanup to PipXtreme codebase.
2012-02-24 07:49:41 -07:00
Brian Webb
b69b285f58
Fixed PipXtreme bootloader.
2012-02-23 20:40:24 -07:00
Brian Webb
182f285e60
Added missing startup file for PipXtreme.
2012-02-23 20:06:34 -07:00
Brian Webb
cf34baec69
Some cleanup on PipXtreme codebase.
2012-02-23 19:58:23 -07:00
Brian Webb
f0dfba6fc0
Re-baslined the PipX codebase using the experimental Transmitter codebase.
2012-02-21 20:29:06 -07: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