This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C-Master in RTX

i have the same problem with an LPC1788 (Cortex M3)

It works with multitasking!
i use the i2c master!
As long as I do not use the function i2c master The program works fine works
But if I use the function i2c master Micro does not work!

Thank you for your help

Parents
  • Well, have you considered debugging?

    Why do I ask? Because your post doesn't give any indication that you have spent time checking where the function hangs.

    It will hang if you haven't correct values for I2CDEV_M.
    And it will hang if you don't get the interrupt that sets the completion flag.
    Have you even looked at the I2C pins and seen if there is any activity?

Reply
  • Well, have you considered debugging?

    Why do I ask? Because your post doesn't give any indication that you have spent time checking where the function hangs.

    It will hang if you haven't correct values for I2CDEV_M.
    And it will hang if you don't get the interrupt that sets the completion flag.
    Have you even looked at the I2C pins and seen if there is any activity?

Children
  • hello
    Thank you for your attention
    program i2c master Works well alone
    However, when this function is added to rtx
    the program (rtx+i2c ) hangs..
    in task1 blink led1
    and task2 blink led2
    When the program on hardware
    first led1 on
    second led2 on
    but when Performs task3 my code hangs
    (Note:i2c master code only works well)!!!
    but rtx + i2c master = hangs

  • If you do a task lock (or use a thread with highest priority) and call a function that hangs, then you are expected to get stuck.

    Still no indication that you have spent any time trying to figure out where in the I2C code you get stuck. That is still part of the debugging you should do.