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 with Keil RTX doesn't work

Hi

When I use I2C library without Keil RTX to communicate with I2C EEPROM the program works fine, but when I start the RTX the program stuck at:

while(!Status) Status=I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED); // Test on EV6 and clear it

Somebody know how to fix this?

Ps: uVision3 V3.63 , MDK-ARM V3.24 , RL-ARM V3.40

Parents
  • I can say that I2C works well with RTX (using NXP though)

    I'd suggest that you walk two steps away and try to look at the problem from a different viewpoint.

    What might get changed by the presence of a RTX ? Typically interrupts. Timer usage.. ? Does that Lib need Interrupts? (I guess..) Do you see a single IRQ ? Any ports mis-set ? Are the priorities of the tasks set correctly ?

    I would start with a bare OS with only one task (your program) set to a high prio and let it run. Be arware that the OS wants one timer and its interrupt. And that'S it. Nothing else. Does your task alone (without I2C code) run well?

    So just try to get closer to the problem.
    good luck !
    Uli

Reply
  • I can say that I2C works well with RTX (using NXP though)

    I'd suggest that you walk two steps away and try to look at the problem from a different viewpoint.

    What might get changed by the presence of a RTX ? Typically interrupts. Timer usage.. ? Does that Lib need Interrupts? (I guess..) Do you see a single IRQ ? Any ports mis-set ? Are the priorities of the tasks set correctly ?

    I would start with a bare OS with only one task (your program) set to a high prio and let it run. Be arware that the OS wants one timer and its interrupt. And that'S it. Nothing else. Does your task alone (without I2C code) run well?

    So just try to get closer to the problem.
    good luck !
    Uli

Children