Sending multiple byte over I2C in a slave mode (DA14580 is the slave)

8 posts / 0 new
Last post
yassin.bennaceur
Offline
Last seen:5 years 9 months ago
加入:2015-04-10 15:32
Sending multiple byte over I2C in a slave mode (DA14580 is the slave)

Hello I managed to send one byte over the ic2 from DA to another host processor using this function :

bool
i2c_slave_send(uint8_t data)
{
if(i2c_slave_read_requested()) {
SetWord16(I2C_DATA_CMD_REG, data);
GetWord16(I2C_CLR_RD_REQ_REG);
return true;
}
return false;
}

Now I want to extend it to be able to send multiple bytes. I did the fallowing :
bool
i2c_slave_send(uint8_t *data, uint8_t len)
{

GLOBAL_INT_DISABLE();

if(i2c_slave_read_requested()) {
SEND_I2C_COMMAND(*data & 0xFF);
GetWord16(I2C_CLR_RD_REQ_REG);
len --;
data++;
}

while(len){
if(i2c_slave_read_requested()) {
SEND_I2C_COMMAND((*data & 0xFF));
GetWord16(I2C_CLR_RD_REQ_REG);
len--;
data++;
}
}

GLOBAL_INT_RESTORE();

if(len == 0){
return true;
}

return false;
}

but This is not working at all, I can not find what other registers I should clear or use ?
Could you please help me ?

HeYQ
Offline
Last seen:5 years 8 months ago
加入:2015-06-02 02:46
In My System, DA14580 act as

In My System, DA14580 act as the Slave Devic, I want Send data to it and can Read Dataform it too. In I2C Protocal, for Examle I want set Da1480's REG , I send (Addr+Write)+RegAddr+Data1+Data2 to Da14580, But where I can read the Data in DA14580?

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
嗨HeYQ yassin.bennceur,

嗨HeYQ yassin.bennceur,

Sorry, but I2C in slave mode, although supported by the hardware, isn't widely used, so there is no support from dialog in the SDK about this kind of mode.

Thanks MT_dialog

LoialOtter
Offline
Last seen:3 years 5 days ago
加入:2018-03-03 10:37
Okay, on seeing this and

Okay, on seeing this and after today's entire day trying to get the SDK (or should I say, demo kit) working... I've just hit my limit for what's acceptable from a vendor.

You are not getting into my product. Not supporting something as simple and useful as an I2C slave-mode device because you don't feel like it is pretty ******. Having a website that makes finding your SDK impossible without watching the "intro video" which doesn't even show how to use your software is ******. As a developer, I'm just going to go to Nordic or someone else who has their product together.

JE_Dialog
Offline
Last seen:1 month 5 days ago
Staff
加入:2013-12-05 14:02
Thanks for our feedback. I've

Thanks for our feedback. I've sent you a message to your registered email . BR JE_Dialog

YehudaNovodes
Offline
Last seen:2 years 3 months ago
加入:2018-11-11 12:38
Did you found any solution

Did you found any solution yet?
I'm having the same problem and they gave me the same idiotic answer (we are not supporting ...)

PDonchev
Offline
Last seen:2 years 7 months ago
加入:2015-06-21 14:37
Usually I2C slave should be

Usually I2C slave should be interrupt driven due asynchronous requests. I successfully implemented I2C slave device in my design and everything is working as expected.
It's not clear what's doing function "i2c_slave_read_requested()" in your source.

YehudaNovodes
Offline
Last seen:2 years 3 months ago
加入:2018-11-11 12:38
Can you send some data or

Can you send some data or function or even something to start with?
Because I did try and it's not that easy and I really don't think that developers should deal with that. All of other manufacturer are doing it!!