1 2 Previous Next 22 Replies Latest reply on Apr 18, 2016 7:51 AM by Intel Corporation Go to original post
      • 15. Re: I²C bus freezes randomly
        LeonY

        Hey nemrod indeed this has been attempted. Have a look at this thread Intel MID SSP SPI driver getting stuck in kernel space

        • 16. Re: I²C bus freezes randomly
          JPMontero_Intel

          Hi nemrod,

           

          Could you share the code and the steps you are following to get this behavior in the I2C?

           

          Regards,

          JPMontero_Intel

          • 17. Re: I²C bus freezes randomly
            nemrod

            JPMontero_Intel: Basically I'm just using mraa in C++ to set up and communicate with an MPU9250. The file/class doing it is currently over 500 lines and I don't have time to create an MWE, not to mention I'm not on 2.1 anymore so I can't replicate the steps or verify that the problem persists. If you still want the class (which is part of a larger system, but can simply be run by instantiating it and calling a single member function repeatedly to replicate the behaviour of my system) I can pastebin it, I suppose.

             

            In the current iteration (that works on 2.0 and is the exact same code that didn't work on 2.1) it's just writing some registers to set settings in the device, reading/writing calibration data and self-test values from it, and then in an infinite loop (I'd estimate it runs at around 200Hz) checking a register for if data is ready and if so reading a bunch of registers for the data, which is then handled in a different part of the system.

             

            I've tried two devices (though both from the same manufacturer/class of devices, MPU6050 and MPU9250), I've tried all the different I²C speed settings, I've tried running the polling loop at a lower frequency (slowing it down with usleep()), I've tried to not do any setup or self-testing or calibration and just getting the values, I've tried both I²C buses, I've tried a couple of different level converters... Not sure what else I can tell you; it's my experience that it doesn't really matter what you do or what steps are taken---the I²C bus will eventually freeze on 2.1, at least with the devices I've tried and polling in a loop the way I am.

             

            I threw weeks of testing on this with a bunch of different software approaches (from as barebones as possible to thoroughly scanning the datasheets to configure each register that seemed relevant to optimise the chances of things working) and hardware wiring/configurations (hence the different level converters and plain resistive voltage dividers, two different IMUs that do the same thing, two different Edisons on two different mini breakout boards, different breadboards in case of dodgy internals to eventually soldering things thoroughly on prototype boards) and it just didn't matter. Turns out the problem was seemingly in the Edison kernel/drivers themselves. Ugh.

            • 18. Re: I²C bus freezes randomly
              nemrod

              Can anyone verify if this issue/regression is fixed in 3.0? LeonY JPMontero_Intel

              • 19. Re: I²C bus freezes randomly
                LeonY

                I threw out all my Intel boards when they crippled the sdk.

                • 20. Re: I²C bus freezes randomly
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi nemrod,

                  The issue is still present in Yocto 3.0 release, it seems to be an issue with the mraa library. We can suggest to use the command strace with his program and check if mraa is closing properly the device being used, if is not closing the device then it will go over the limit of 1024 files/devices that can be opened and cause the crash. This issue has been reported and we hope to get a fix soon.

                  Regards,

                  JPMontero_Intel 
                   

                  • 21. Re: I²C bus freezes randomly
                    nemrod

                    No upgrading from 2.0 yet then, but good to hear the issue has finally been identified, reported and is on the table for fixing! Could you post here when there's a fix available?

                     

                    Thanks,

                    Anders

                    • 22. Re: I²C bus freezes randomly
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Sure, once we have a fix we will let you know.  

                      Regards,
                      JPMontero_Intel 
                       

                      1 2 Previous Next