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
  • Unfortunately did not work.
    Im using the STM32 in the MCBSTR32.
    I used the I2C1 and I2C2, but both present the same problem.
    I created a program only to test the I2C with RTX.
    This program have a function that write and read 10 address of a EEPROM.
    In program I configured the Clocks and I2C inside main function and after I called the os_sys_init function.
    If I call the test function of I2C before the os_sys_init function, the function runs perfectly. But if I call the test function of I2C after the os_sys_init function (inside a task) the problem occurs.

Reply
  • Unfortunately did not work.
    Im using the STM32 in the MCBSTR32.
    I used the I2C1 and I2C2, but both present the same problem.
    I created a program only to test the I2C with RTX.
    This program have a function that write and read 10 address of a EEPROM.
    In program I configured the Clocks and I2C inside main function and after I called the os_sys_init function.
    If I call the test function of I2C before the os_sys_init function, the function runs perfectly. But if I call the test function of I2C after the os_sys_init function (inside a task) the problem occurs.

Children