2018-07-11 02:53 AM
My setup: STm32L053 nucleo and custum board with STm32L0.
I am running a scan from nucleo borad for all possible I2C slave devices address in order to obtain the address of slave device ds1337.
Both boards are connected on the same line. However, I can not receive the address unless custom boards is being disconnected from SDA and SCL lines.
Using voltmeter I have noticed that:
While both boards are connected SCL and SDA are in logic high.
Custom board is not made by me, moreover I do not have access to it's code. The board is for production and I have to test it's DS1337 clock.
Is it possible to read/write slave in this situation? How?
Best regards,
Ovidijus
Solved! Go to Solution.
2018-07-11 03:27 AM
I am running a scan from nucleo borad for all possible I2C slave devices address in order to obtain the address of slave device ds1337.
The slave address is fixed to E0/E1 for the device, no need for a search. See page 13 of the datasheet.
What the DS calls 'address' is the index (address) of the internal register you want to access. On I2C bus level, this is a data byte.
Using voltmeter I have noticed that:
While both boards are connected SCL and SDA are in logic high.
It is supposed to be so in idle state. I2C has (and needs) pull-up resistors.
2018-07-11 03:27 AM
I am running a scan from nucleo borad for all possible I2C slave devices address in order to obtain the address of slave device ds1337.
The slave address is fixed to E0/E1 for the device, no need for a search. See page 13 of the datasheet.
What the DS calls 'address' is the index (address) of the internal register you want to access. On I2C bus level, this is a data byte.
Using voltmeter I have noticed that:
While both boards are connected SCL and SDA are in logic high.
It is supposed to be so in idle state. I2C has (and needs) pull-up resistors.
2018-07-11 09:02 AM
Thank you for clarifying me. To make sure, I want to ask. Is it possibile to control DS1337 device despite the second MCU hanging on I2C?
I2C Lines ar pulled-up by the way.
2018-07-12 12:56 AM
Is it possibile to control DS1337 device despite the second MCU hanging on I2C?
Of course, as long as the addresses are not conflicting.
In the most common 7-bit mode, the I2C bus uses the LSB for read/write distinction, and the addresses 0x00/0x01 and 0xFE/0xFF are reserved.
This leaves room for 126 slave devices.
2018-07-12 04:27 PM
Thank you. I have tried to send and read to the address from datasheet instead of searching. It did worked out.