-
Couldn't load subscription status.
- Fork 42
Open
Labels
Description
Versions
- OS:
Ubuntu 16.04 - Erlang:
Erlang/OTP 20 Erts 9.2 - Rebar:
rebar 3.5.3 on Erlang/OTP 20 Erts 9.2 - rebar3-grisp:
master
Description
When a short message is sent before a longer message, the grisp_i2c module only transmits $SHORTMSGLENGTH bytes of the longer message correctly and 0x00 after that.
Reproduce:
grisp_i2c:msgs([16#40, {write, <<16#23, 16#24, 16#25>>}]).works finegrisp_i2c:msgs([16#40, {write, <<16#42>>}, {write, <<16#23, 16#24, 16#25>>}]).What happens on the I2C bus:I2C_START to Address 40,I2C_WRITE,0x23,0x00,0x00
Edit
The problem persisted even through several resets, but after connecting a debugger to take a look at the ATSAM's I2C registers, the problem mysteriously disappeared.