-
Notifications
You must be signed in to change notification settings - Fork 1k
could'nt recieve integers at master from slave #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Deadshot555 could you provide more information. |
OS: [ Windows10] |
master_sender |
slave_sender |
please ignore the comments there.... i have just modified the example code |
Please kept original code then update it to send/receive only one integer. |
yeah we are able to transfer master to slave by multiple bytes(as you said unit8_t) but unable to transfer from slave to master using same bytes, it is supporting only one byte transfer. i could'nt transfer two bytes or more.... |
the prescise problem is like to transfer two or more bytes from slave to master |
note: issue only on numerical bytes... character bytes are going good |
Transferring a char, a byte or a casted value to uint8_t is the same. Further reading: Wire API |
i have communicated between multiple arduino'susing i2c both ways and stm32 series with roger clark's stm32 addon... and also here in one way but there is bug for the other way..(.) i do too agree that char byte and numerical byte is same but the char on moodification in any way it is working but for numerical byte transfer only one byte is getting transferred, if i do request 2 or more bytes it strucks.. and when ever i reset the board it it prints once only the last byte not any other bytes. i tried most possible ways of i2c basic communication examples available online for 6 hours, none resulted luck. and last the screenshot was a mistaken one. one can consider those two codes are the real challange of this issue#488 master as promini and slave as stm32 |
if you make stm32 as a master and promini as slave it is working fine in both ways . but when stm32 was made to be slave and promini as master.. could not get numerical data from promini to stm32 |
i tried with a new pair of boards still could'nt get numerical bytes...can anyone verify the problem |
Frederic pillion, |
Of course this issue will be manage but don't know when. |
yup! |
Maybe linked to #472 |
but for one byte transfer it is working good ... and if there are two or more bytes it is getting problem so can it be a interrupt problem.., i think it is problem with onRequest handler |
that too could'nt solve the problem... and there is a percular property that can be seen in the screenshot. whenever i press reset button on stm32 there used to be a last byte transfer only once and stops not another byte...and if i press very fast i used to get -1 continously |
what if you try below code?
or
|
@rikykumar could'nt get data from STM32 Slave to PROMINI Master |
And have you tried as well : Wire.write(0x1234); ? |
yeah but if promini Master asks for one byte ..., if promini Master asks two or more bytes no more transfer |
yeah i'm checking that "protocol" all time, problem is not at all at that point .., those above screenshots are to represent its behaviour on different requests. if we do request 2 or more bytes it strucks |
|
in wire.onRequest(){ } after interrupt only one write is getting executed and that too the last byte |
Laurent Meunier |
what is your compilation error for easytransfer-arduino-library ? |
Sorry but are only supporting stm32duino/Arduino_Core_STM32 here. The backlog of issues is already high so unfortunately we cannot afford investigating issues of Roger's core. Note that supporting other instances of peripherals mainly depends on the pin mapping and alternate functions, you may change the default Wire instance of Roger's core from instance 1 to instance 2 for your need ? Concerning our issue here, can you unblock your situation with using of course we would keep this issue open and need to find a fix, but this may take more time. |
Ok I had a deeper look at Wire.h and discussed with @fpistm.
So you can create tables if you don't want to use string. Something like below should work
I agree that it would be nice to be able to make loops of write(uint8_t); like promini would but that requires more investigations, this is not supported for now. |
thanks a lot that's a great fix for now.., and i will be an active member in testing further developments involved in this topic |
and sorry for the misconception there i mean to resolve bug in stm32duino i2c slave from <wire_slave.h>. any ways i'm glad that the problem is fixed |
Is it ok between 2 pro mini ? |
yeah 2 way communication between two prominis is good |
well in 'Wire examples' for (stm32f10c bluepill) the character array works pretty good..., but when slave sender modified to send integer there is no serial print in master reader ... gets struck at some unknown point..., works fine for one byte transfer....,and not any more for two bytes or more.. can anyone fix this bug???
The text was updated successfully, but these errors were encountered: