AnsweredAssumed Answered

KL27 I2c slave address recognition

Question asked by Neil Hancock on Oct 5, 2017
Latest reply on Oct 10, 2017 by Neil Hancock

HI I'm creating an I2C Slave to a Beagle Bone Linux distribtution that emulates DS1374 RTC. The RTC supplies 32bit time, and 24bit alarm + status.

The Cape is designed to manage the BBB through power down and repower it on an alarm

Linux and BBB states it supports SMBus primarily (over I2C I think)

I started off with the FrdmKL27Za\fkl27z_rtos_examples_freertos_i2c demo and got it working, then expanded it to a ping-pong and ran it reliably for a day, and took a snapshot with a logic analyzer.

Then I switched to interfacing to the BBB and modifed the rtos_examples_freertos_i2c to respond on the basic cmds.

did the appropriate steps on the BBB

 

$sudo modprobe rtc-ds1374

$sudo /bin/bash -c "echo ds1374 0x68 > /sys/class/i2c-adapter/i2c-2/new_device"

 $  dmesg | grep ds1374

[ 3408.183413] rtc-ds1374: probe of 2-0068 failed with error -121

[ 3408.183667] i2c i2c-2: new_device: Instantiated device ds1374 at 0x68

 

To cut a long story to the essentials, On inspecting the logic anaylyzer and walking through the code

1) The kl27z was not responding with an ACK on the address

2) The demo code never actually utilizes the address match - it only utilizes the start and completion.

3) The FSL interface doesn't support SMBus even though its well documented in other areas of Freescale/Kinetis literature,

 

So my quick question - has anybody else got to use the I2C subsystem device mode interfacing to linux? 

At this point I'm switching to the FRDM-KL43 which specifies more closely matches my target 48QFP KL27Z128 with USB regulator.

Outcomes