olsndot/tests/i2c-master
Karl Palsson d339255511 i2c-master: add parallel make and fix errors
Fix bugs from outof date libopencm3
2018-02-25 22:50:09 +00:00
..
hw.h i2c-master: working on l1 too. 2017-03-08 23:05:52 +00:00
i2c-master.c i2c-master: use library form of transfer functions 2017-03-24 00:13:23 +00:00
i2c-master.h i2c-master: tidy up more. 2017-03-01 22:53:58 +00:00
main-stm32f4-disco.c i2c-master: tidy up more. 2017-03-01 22:53:58 +00:00
main-stm32f072-disco.c i2c-master: add parallel make and fix errors 2018-02-25 22:50:09 +00:00
main-stm32l1-generic.c i2c-master: working on l1 too. 2017-03-08 23:05:52 +00:00
Makefile i2c-master: add parallel make and fix errors 2018-02-25 22:50:09 +00:00
Makefile.stm32f4-disco i2c-master: start progressing to extracting common i2c code 2017-02-21 23:11:43 +00:00
Makefile.stm32f072-disco f0 working with repeated start properly. need to squish lots of this 2017-03-22 22:50:37 +00:00
Makefile.stm32l1-generic i2c-master: working on l1 too. 2017-03-08 23:05:52 +00:00
README.md i2c: fix uart notes for f0 2017-04-05 21:30:42 +00:00

i2c master mode tests.

While many of the disco boards have some form of i2c device onboard, which would, on the face of it, make testing easy, it's a different device on each board, and there are boards without it.

Instead, use a known I2C peripheral on all boards, and require/expect a known fixed i2c slave device. (Eventually, this will be a soft controllable i2c slave in the auto test setup ;)

the "trigger" pin is bounced when each iteration of the test code starts, allowing synchronization with a sigrok script that helps assure that results are as expected.

Debug is via SWO wherever possible, uart (tx only) on less capable cores

Pinouts: (External PullUps REQUIRED!)

board SCLK SDA i2cperiph trigger uart f4-disco PB8 PB9 i2c1 PB13 l1-disco PB8 PB9 i2c1 PB13 f072-disco PB8 PB9 i2c1 PB12 PA9!

Notes for monitoring with sigrok: $ sigrok-cli -d fx2lafw -C D0=SDA,D1=SCL,D2=Trig -c samplerate=4Mhz:captureratio=4 --time=150ms -t Trig=r -o cap2.cli.sr

Then open the .sr file in pulseview. something's wrong with decoding

directly from the cli!

or....

$ sigrok-cli -d fx2lafw -C D0=SDA,D1=SCL,D2=Trig -c samplerate=4Mhz:captureratio=4 --time=150ms -t Trig=r -P i2c:scl=SCL:sda=SDA