summaryrefslogtreecommitdiff
path: root/src/stm/ao_i2c_stm.c
Commit message (Collapse)AuthorAge
* altos: Switch drivers to ao_arch_block/release_interruptsKeith Packard2012-10-25
| | | | | | Stop using cli/sei, which are avr-specific Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up STM I2C clock computationsKeith Packard2012-06-27
| | | | | | Fix both clock time and rise time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: get MPU6000 I2C link working reliablyKeith Packard2012-06-27
| | | | | | | | | | This slows the i2c bus to 100kHz (yuck), sets the rise time to spec (it was way off) and adds more delays during bus setup. I've run this for hours now without trouble. Will try to adjust things back to fast mode and see if I can make that work as 100kHz isn't fast enough to reliably get data at 100 samples/sec. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Wait for i2c START condition before setting interrupt bitsKeith Packard2012-06-27
| | | | | | | | This seems better than the random loop that it replaces, but I still have no idea why this is required; it doesn't coorespond to the docs at all... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: stm i2c debug code was calling flush() even when disabledKeith Packard2012-06-27
| | | | | | | | | The fancy stm i2c debugging code had calls to flush() that were invoked outside of the conditionals leading to all kinds of fun -- flush() may re-enable interrupts, yield or do all kinds of wacky stuff, none of which is appropriate from the middle of a device driver Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: mpu6000 requires a delay during startKeith Packard2012-06-27
| | | | | | | I have no idea why this is required, but the mpu6000 will not come up and run if this isn't present. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reset i2c controller at boot timeKeith Packard2012-06-02
| | | | | | In case it's wedged. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clear stm i2c transfer timeout alarmKeith Packard2012-05-28
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: stm: share i2c_stop code between send and recvKeith Packard2012-05-07
| | | | | | | This waits for the stop signal to appear on the bus, necessary before starting another transaction. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: stm i2c DMA for large recv appears to workKeith Packard2012-05-06
| | | | | | | | Transaction appears to be clean on the i2c bus now; correct number of bytes received, and the nack and stop at the right time. This tests > 2 length reads; should try that too. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: STM i2c work.Keith Packard2012-05-06
| | | | | | | Start now driven by interrupts Send now done with DMA and interrupts Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add STM I2C recv and stop funcsKeith Packard2012-04-25
| | | | | | Recv doesn't appear to work with more than one byte Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: add STM I2C driver.Keith Packard2012-04-09
Not well tested yet... Signed-off-by: Keith Packard <keithp@keithp.com>