Hi all,
I am using the MCBSTR9 board and I am running the RTX OS with two concurrent tasks. All is well but after it runs for awhile, it stops. When I break in, it sits in the OS idle loop. Have anyone experience this before? It does not crash but it somehow stopped running the two tasks that was initially running. The stop time is intermediate. It can run up to 30 minutes or as short as 5 minutes.
Any ideas?
Thanks, Tom
Are the two threads waiting for any resource that isn't available?
There is a mutex between these two threads. One thread handles USB commands from the PC. The other is constantly constantly using the I2C peripheral for writing/reading from devices. Once there's a USB command to retrieve something from the device via I2C, it stops the other thread (at an appropriate place) and continues to perform I2C commands until it's done. Upon completion, it releases the mutex and the other task continues. I have tested it without connecting the USB to the PC, and it is the same result.
So they are sharing a mutex, but you get a lockup even if neither of the threads takes this mutex?
Is your timer tick still running?
Are you able to use a JTAG interface to check the current state of the two tasks?
Actually, after further testing, I found out that the I2C and UART interrupts are conflicting. Which I think is another topic dealing with nested interrupts.