I2C seems to be broken - no communication - no relay



  • Hi,
    I have my i2c not working on the unipi v1.1. Relays does'nt work anymore.
    I have no communication in system status -> I2C.
    0_1499694937144_i2c.png
    i2c-detect -y 1 give me:

    root@unipi:~# i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
    20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: UU -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- UU
    70: -- -- -- -- -- -- -- --
    

    Version of Mervis IDE is 57589 and the runtime is up to date.
    Please, can someone tell me what's happening ?


  • administrators

    @Giamba Can you share the project? The address 0x20 (which are the relays on UniPi 1 and Lite) is visible with i2cdetect so it should be OK. Do you have anything other connected to the I2C port? Has it been working before? If so, what has changed?



  • Hi tomas,
    Now I see it's happening only when I add a task with a new fdb program.
    I create a program named "ligths" with just DI1 -> Relay1. I add the task as 50% ratio priority 0, the same as the main.fdb.
    I build, deploy, and there is no more i2c.
    When I remove the task, that's work again!

    Maybe a bug ? What do you think ?


  • administrators

    @Giamba Can you plese try to map the program to the task 0 and do not add it to a new task so that you have only one task?



  • @tomas_hora, I don't know how to do that, the task with id 0 seems to can't be edited.


  • administrators

    @Giamba you have to switch to the main Profile (upper level from dev and site) and also switch the project to full mode, then go to task editing and you should be able to do that.



  • @tomas_hora.
    Thanks, now I can!
    If I understand, we can't set multiple "normalOperationTask" because it's impossible to load multiple intances of hardware resources. Tow tasks means two loads of ic2 (and others protocols) witch is impossible beacuse of opening the same port/protocol. So I can't have a multithreading project as one for ligths and one for heating for example. How to do that? If not, by your side, why to not make it possible, by use for example program shared memory for hardward resources instantiations int the RT. Maybe it will be a thing to do. What about it ?
    Giamba


  • administrators

    @Giamba That is the theory how it is meant to work. I have just tried the same setup but could not get the relays stop working... Could you please share your project?



  • Hi, tomas,
    My project is at this address: https://we.tl/W7Yzk6xjzw.
    You can test to remove i2c_test from the main task to put in a new one. When it's done, i2c and 1-wire doesn't work anymore.
    Thank you.



  • @tomas_hora.
    Hi.
    So tomas, have you been able to test my configuration? What about your side? Do relays are working with my project files?
    Tanks again.