Closed RobertK66 closed 2 years ago
With a code commit :
https://github.com/RobertK66/obc_1769_core/commit/6231abd36073e861503235f9ec31631412e3558e
I am able to transmit message over I2C from OBC to Arduino
Amount of bytes received by arduino is always correct (when changing "read_request" length)
However received bytes are wrong.
During initialization of LPC_I2C
I enabled switches
which should activate LPC_I2C2 on A and B sides
Then I checked pinning_climb.h
All those switches are by default initialized with HIGH value.
Meaning that all switches are enabled by default ?
However the strange thing that I noticed :
If I manually set those switches to LOW - I2C still works (with wrong bytes)
Maybe the clock pulses are not compleetly 'cut off' by the Switch ICs!?
Primary goal of this EN pins is to get rid of short circuited pins in SP connectors. I am not sure, why you see your behaviour. Maybe we have to define a better test case for this "saftey feature". To make funvtional tests just have all EN pins initilaized to High and connect to any of the buses.....
Remark: You can easily test all Enable Pins with my hw_check command:
| 'h' | \<pinIdx> \<mode> | sets an GPIO pin to mode (0: initVal, 1: high, 2: low, 3: slow blink, 4: fast osz.) |
The Pin Idx for the 4 I2C EN pins are:
PINIDX_I2C_A_EN 31
PINIDX_I2C_D_EN 32
PINIDX_I2C_C_EN 33
PINIDX_I2C_B_EN 42
After latest remark regarding enabling C/D in pinning_climbobc.h :
I2C works correctly on every sidepanel.
Switches also work as expected.
also see discussions here: #23