The STM32 I2C block has a number of errata associated with it.
These errata are primarily related to timing sensitivities between
the peripheral and the interrupt handler. In particular, the
correct generation of the stop bit relies on the I2C IRQ running
immediately and not being held off for any reason.
NOTE: The I2C interrupts must be the highest priority IRQs in the
system to ensure correct operation.
I2C protocol is now implemented as a formal state machine.
See: stm32_i2c_fsm.{dot,jpg} for FSM description.
I2C init is now expressed by const initializers in pios_board.c
for both OP and AHRS boards.
I2C device drivers (ie. bmp085/hmc5843) now pass in const arrays
of an unlimited number of bus transfers to be done atomically.
The I2C adapter driver now handles all bus-level locking across the
list of transactions. Generation of start/restart/stop conditions
are handled automatically over the list of transactions.
Timeouts have been removed from the API for now. May be added
back later.
This driver has run error free on both the OP and AHRS boards for
up to 48hrs but it still sometimes fails earlier than that on the OP
board. There is another possible set of improvements to the driver
that could employ the DMA engine for transfers of >= 2bytes. This
change would reduce the timing sensitivities between the peripheral
and the driver but unfortunately, both the SPI and I2C interfaces
share the DMA1 engine. That means only one of these two peripherals
can use the DMA engine and right now, SPI between OP and AHRS is
already using it.
Failures are currently fatal and will lock up the CPU. This allows
useful information to be obtained in the failure cases.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1241 ebee16cc-31ac-478f-84a7-5cbb03baadba
Mark the I2C_InitStruct parameter as const so that we can pass
const data as the initializer.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1240 ebee16cc-31ac-478f-84a7-5cbb03baadba
The modules were disabled for some reason in r1172.
This just turns them back on for the real targets.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1237 ebee16cc-31ac-478f-84a7-5cbb03baadba
The gdb init files would previously reset the target immediately
when gdb started up. This is sometimes an unpleasant side-effect
of running gdb.
In order to connect to the target, use the new "connect" function.
To reset the target use "mon reset".
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1236 ebee16cc-31ac-478f-84a7-5cbb03baadba
This should be removed at some point but can wait till we have a working bootloader.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1234 ebee16cc-31ac-478f-84a7-5cbb03baadba
- syntax error in pios_board_posix.c introduced with Doxygen comment blocks
- platform dependant code had been added to openpilot.c instead of pios_board.c
- redundant header inclusion (stm32... already included by PiOS)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1171 ebee16cc-31ac-478f-84a7-5cbb03baadba
- Added FlighSituation Module (development module for sensor fusion, mostly stub, possibly renamed later)
- Added Navigation Module (development module for navigating towards a point in space - DEVELOPMENT CODE, NOT STABLE YET (I am testing around with this))
- Changed Stabilization Module (uses local reference frame now. Stable except for code cleanup/review. Tested in simulator and outperforms old code.)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1154 ebee16cc-31ac-478f-84a7-5cbb03baadba
1) floss-jtag.arhs.cfg
2) floss-jtag.openpilot.cfg
But the Eclipse project the "external tools configurations" for the OpenOCD Debug is looking for the "floss-jtag.cfg" file in the command line arguments. The added file "floss-jtag.cfg" is a simply a copy of "floss-jtag.openpilot.cfg". The .arhs.cfg doesn't play well by itself.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1129 ebee16cc-31ac-478f-84a7-5cbb03baadba