Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: nox771

Page 1 of 5 1 2 3 4

Search: Search took 0.00 seconds.

  1. Replies
    639
    Views
    322,926

    You cannot include both i2c_t3 and Wire libs in...

    You cannot include both i2c_t3 and Wire libs in the same project because they define the same objects. If you want to use i2c_t3, you need to replace all
    #include <Wire.h>
    with
    #include...
  2. Replies
    639
    Views
    322,926

    Back when I first started the lib the code was...

    Back when I first started the lib the code was based on whatever Wire was in Teensyduino at the time, which was listed as LGPL, that is why it uses LGPL (IIRC Arduino Wire has a LGPL header). ...
  3. Replies
    639
    Views
    322,926

    Ah, I have an idea of what it might be. Change...

    Ah, I have an idea of what it might be. Change your downloaded dir name from "i2c_t3-master" to "i2c_t3". Teensyduino ships with i2c_t3 by default, so it will pick that one first unless you have...
  4. Replies
    639
    Views
    322,926

    There seems to be some conversions between signed...

    There seems to be some conversions between signed and unsigned types going on. Try first working exclusively with unsigned types, and avoid int if possible. The original Arduino Wire lib annoyingly...
  5. Replies
    639
    Views
    322,926

    Increasing the buffer sizes should work. 258...

    Increasing the buffer sizes should work. 258 bytes sounds correct for the default buffer size, as 1st byte is used for slave address. Are you using size_t as your index? If you use uint8_t as a...
  6. Replies
    639
    Views
    322,926

    The library error tracking functions do not log...

    The library error tracking functions do not log addresses (it is more of an error "counting" system instead of an error "logging" system). This is really the only way to do it since a true error log...
  7. Replies
    639
    Views
    322,926

    All, I uploaded a v10.1 release on GitHub and the...

    All, I uploaded a v10.1 release on GitHub and the top-post.

    This has a fix for a subtle priority escalation bug involving nested Wire calls inside callbacks (refer to:...
  8. Replies
    639
    Views
    322,926

    Yes each bus has its own callback functions. ...

    Yes each bus has its own callback functions.

    There is a subtle priority escalation bug if you try doing Wire calls inside the callback, as described here:...
  9. Replies
    639
    Views
    322,926

    You can provide handling or not for unneeded...

    You can provide handling or not for unneeded addresses. Usually it is not a problem (since nothing talks to those addresses anyway). But something like that should work for emulating multiple...
  10. Replies
    639
    Views
    322,926

    You can make a Slave respond to a range of...

    You can make a Slave respond to a range of addresses, and then determine which one was addressed using the Wire.getRxAddr() function. If you look at the basic_slave_range example it shows something...
  11. Replies
    639
    Views
    322,926

    You don't use those functions to determine if the...

    You don't use those functions to determine if the buffer is empty, instead use Wire.available(). Those functions exist because at a hardware level the I2C moves data in bytes, so it is natural to...
  12. Replies
    639
    Views
    322,926

    GC is one of several things that are lacking, but...

    GC is one of several things that are lacking, but unfortunately at the moment I'm out of time, and it might be a while before I can look into it. I can add this as a future to-do.
  13. Replies
    639
    Views
    322,926

    All, I've uploaded a new v10.0 library to the top...

    All, I've uploaded a new v10.0 library to the top post and GitHub. Documentation has been updated.

    This has passed all my testing but it is a pretty involved change in some parts, so post here if...
  14. Replies
    639
    Views
    322,926

    sendRequest() will background a transfer, but it...

    sendRequest() will background a transfer, but it is correct you will need to poll or periodically check done() or finish() to know when the transfer is complete. The expectation was this is...
  15. Replies
    639
    Views
    322,926

    All - I've uploaded a v9.4 release to the top...

    All - I've uploaded a v9.4 release to the top post and GitHub. A couple other bugs showed up involving RepSTART into Slave ISR on LC/3.5/3.6. Changes are:


    Fixed Slave ISR for LC/3.5/3.6 not...
  16. Replies
    639
    Views
    322,926

    This looks like a problem in the build system,...

    This looks like a problem in the build system, not in the source code. It seems to be trying to link in default Wire lib (WireKinetis.cpp.o) at the same time as i2c_t3, which won't work because they...
  17. Replies
    639
    Views
    322,926

    Just FYI - I've uploaded a v9.3 release to the...

    Just FYI - I've uploaded a v9.3 release to the top post and GitHub. It fixes a Slave-mode bug in the ISR for LC/3.5/3.6 devices (STOP bit not properly triggering callback). Try the update if you...
  18. Replies
    639
    Views
    322,926

    Internally the library maintains its state...

    Internally the library maintains its state through several variables in the i2cStruct (refer to i2c_t3.h file, and look for i2cStruct, then "Current" variables). There are functions to access some...
  19. Replies
    639
    Views
    322,926

    No it cannot do this right now. When you do a...

    No it cannot do this right now. When you do a beginTransmission(addr) it will clear the Tx buffer, so your 2nd slave data will clear out the 1st slave data. You would have to create some wrapper...
  20. Replies
    639
    Views
    322,926

    You'll have to clarify what error you are...

    You'll have to clarify what error you are getting. I've not tried in combination with the audio lib. Note that there is a way to make it behave very similar to stock Wire lib by setting immediate...
  21. Replies
    639
    Views
    322,926

    tonton81 is right, you should try converting the...

    tonton81 is right, you should try converting the "i2c_t3::" method calls into "Wire.", such as "Wire.begin()" and see if that works for you.

    The way the library is structured is that in addition...
  22. Replies
    639
    Views
    322,926

    Your problem is this line in both sets of code...

    Your problem is this line in both sets of code (in the initialization section):

    while (!Serial); // wait for Leonardo enumeration, others continue immediately

    This halts the program until the...
  23. Replies
    639
    Views
    322,926

    Yes on a T3.2 you could specify internal pullups...

    Yes on a T3.2 you could specify internal pullups on the Master device, and for communicating just between two T3.2 devices that can work (note, this is generally not the case on other teensy...
  24. Replies
    639
    Views
    322,926

    w/pullups just means to make sure there are...

    w/pullups just means to make sure there are external pullups. To be clear, on T3.2 pins 29/30 means "arduino" pins 29/30 which are backside SMT pads, are you actually connecting to those pads? ...
  25. Replies
    639
    Views
    322,926

    I'll take a closer look tomorrow. However with...

    I'll take a closer look tomorrow. However with just a cursory look, one thing is a little odd. Presumably you are using your library that needs Wire on the Master device only, is that right? If...
  26. Replies
    639
    Views
    322,926

    To share the bus with a library you need to...

    To share the bus with a library you need to coordinate the transfers so they do not interfere with each other. That is purely application level code, i2c_t3 only manages single buffer transfers at a...
  27. Replies
    639
    Views
    322,926

    Is there supposed to be more context here? The...

    Is there supposed to be more context here? The library does not define auto retry by default in current version.
  28. Replies
    639
    Views
    322,926

    Nice of you to say, but the challenge I can't...

    Nice of you to say, but the challenge I can't ever get around is time. Like many here, my project stack is already much higher than available time (and unfortunately building a new AVR lib isn't...
  29. Replies
    639
    Views
    322,926

    Sorry but no. The original purpose of the...

    Sorry but no. The original purpose of the library was to support the advanced features and speed of the Teensy 3.x I2C hardware. Much of that simply doesn't exist on the AVR hardware. I would...
  30. Replies
    639
    Views
    322,926

    I would think controlling the STOP behavior via...

    I would think controlling the STOP behavior via some option setting is probably best, as it can be set depending on application.
  31. Replies
    639
    Views
    322,926

    The main purpose of not sending a STOP is to keep...

    The main purpose of not sending a STOP is to keep the bus locked. A secondary purpose is to accelerate a long chain of commands. So if your application has reason to keep the bus locked to a single...
  32. Replies
    639
    Views
    322,926

    I'm not sure what you are referring to. The...

    I'm not sure what you are referring to. The i2c_t3 library itself handles RepSTARTs as given by the i2c spec.

    If you are designing a master-side device, the most common thing is to send...
  33. Replies
    639
    Views
    322,926

    Multiple repeated starts can occur if there was a...

    Multiple repeated starts can occur if there was a chain of commands.

    Typical case for RepSTART might be some device with memory, whereby to read an address you first send the memory address then...
  34. Replies
    639
    Views
    322,926

    Yes keeping SCL low will drain power through the...

    Yes keeping SCL low will drain power through the pullup resistor, on the order of ~mA for typical component values. Recommended operation is to pair every START/repSTART with a STOP (eg. complete...
  35. Replies
    639
    Views
    322,926

    Yes the typical Wire commands should work if you...

    Yes the typical Wire commands should work if you swap Wire.h to i2c_t3.h. The library is designed specifically for that to work. It will also support having both Wire and Wire1 (as well as Wire2...
  36. Replies
    639
    Views
    322,926

    In a single master setup it has no practical...

    In a single master setup it has no practical effect if you don't send a stop. The effect of not sending a stop is that the bus is still "busy" (SCL remains low), but there is no problem leaving it...
  37. Replies
    639
    Views
    322,926

    I don't recommend any configuration whereby you...

    I don't recommend any configuration whereby you essentially trick the compiler into using both the Wire library and the i2c_t3 library at the same time. Both these libs are going to be possibly...
  38. Replies
    639
    Views
    322,926

    Those defines are in the kinetis.h file. It...

    Those defines are in the kinetis.h file. It means your Teensyduino version is too old. You need to update your install. The latest non-beta looks like 1.35:...
  39. Replies
    639
    Views
    322,926

    The problem is your directory name is wrong. For...

    The problem is your directory name is wrong. For Arduino linker to find the file the directory name has to match. In your libraries you need to change i2c_t3-master to just i2c_t3:...
  40. Replies
    639
    Views
    322,926

    It is strange to see ARB lost errors on...

    It is strange to see ARB lost errors on single-master. Perhaps some timing artifact or analog effect is confusing the hardware.

    For the error counters, I can try to add some in, but it may take...
  41. Replies
    639
    Views
    322,926

    Yes the GitHub files should be current. When I...

    Yes the GitHub files should be current. When I do updates to the library, I'll post them here, and on GitHub at the same time (and as you say, Paul will include them in Teensyduino, but only when TD...
  42. Replies
    639
    Views
    322,926

    What document are you referring to? I see a...

    What document are you referring to? I see a minor discrepancy, with I2C_BUF_OVF omitted near the end, is this what you are talking about?

    i2c_t3.h has this:

    //...
  43. Replies
    639
    Views
    322,926

    Good to hear, thanks for the update.

    Good to hear, thanks for the update.
  44. Replies
    639
    Views
    322,926

    Ok, thanks. That is the same as the latest...

    Ok, thanks. That is the same as the latest library release (v9.2).
  45. Replies
    639
    Views
    322,926

    Can you post what resetBus_() code you are using?...

    Can you post what resetBus_() code you are using? The auto retry is not a robust error recovery system in itself. All it is doing is this - if a Master device tries to send a command and SDA is...
  46. Replies
    639
    Views
    322,926

    Try this resetBus_() function, just copy/paste in...

    Try this resetBus_() function, just copy/paste in place of the original, or modify as shown in red (at the bottom - comment out the first section and add the three lines at the end). This will force...
  47. Replies
    639
    Views
    322,926

    I tested the registers and disabling/re-enabling...

    I tested the registers and disabling/re-enabling the module does not appear to change the settings. Specifically I added these lines around the new section (the if() is commented out to force the...
  48. Replies
    639
    Views
    322,926

    The SRW bit (Status bit 2) will be set when the...

    The SRW bit (Status bit 2) will be set when the Master receives data from the Slave. That is normal. The RXAK bit (Status bit 0) is used to check for Slave acknowledge, and it may be set as a...
  49. Replies
    639
    Views
    322,926

    Ok. Try the resetBus() routine that hw999...

    Ok. Try the resetBus() routine that hw999 posted. It is unclear to me what condition requires the I2C module to be disabled and re-enabled, but it if works for a larger set of error conditions then...
  50. Replies
    639
    Views
    322,926

    Also in addition to the above change, if that can...

    Also in addition to the above change, if that can fix the bus state when called manually, please let me know if having the I2C_AUTO_RETRY define set in the header file makes it work without...
Results 1 to 50 of 212
Page 1 of 5 1 2 3 4