MQX Corruption and unhandled interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX Corruption and unhandled interrupt

Jump to solution
1,086 Views
VinGanZ
Contributor III

HI,

we have a custom board design with K60Z device and after running for a few days successfully, the same goes to unhanded exception

and when we connect the debugger we are seeing a few tasks are corrupted and a few tasks are seen in TAD. We are using MQX 4.0

Any Clue how to trace the problem?

Even with the exception handler printf directed to TTYB , we do not see anything printed to the console also

Please help

best regards

Vinod Ganesh

0 Kudos
1 Solution
737 Views
VinGanZ
Contributor III

HI All,

Looks like i have nailed the problem.

If i am trying to access the serial port transmit of the K60 faster than 50 milliseconds, it goes generates an exception.

I have a program that reads followed by write the serial port every 50 msec. if i do reads faster than 50 msec it survives but if i try to write it faster

than 50 msec it will throw and exception faster than expected in the previous situation where it threw an exception after a few days of operation.

The baud rate is 19200 data 8N1 and ITTY buffer size is 2048 bytes. I am writing about 48 bytes which means that 25 msec it takes to send it.

i am under the assumption that when i try to write it faster than 50 msec, it violates the buffer size vs transmitted characters going out !!

But it should not happen if i stay at 50 milliseconds

Thanks for the help

best regards

Vinod Ganesh

View solution in original post

0 Kudos
5 Replies
738 Views
VinGanZ
Contributor III

HI All,

Looks like i have nailed the problem.

If i am trying to access the serial port transmit of the K60 faster than 50 milliseconds, it goes generates an exception.

I have a program that reads followed by write the serial port every 50 msec. if i do reads faster than 50 msec it survives but if i try to write it faster

than 50 msec it will throw and exception faster than expected in the previous situation where it threw an exception after a few days of operation.

The baud rate is 19200 data 8N1 and ITTY buffer size is 2048 bytes. I am writing about 48 bytes which means that 25 msec it takes to send it.

i am under the assumption that when i try to write it faster than 50 msec, it violates the buffer size vs transmitted characters going out !!

But it should not happen if i stay at 50 milliseconds

Thanks for the help

best regards

Vinod Ganesh

0 Kudos
737 Views
soledad
NXP Employee
NXP Employee

Hi Vinod Ganesh,

Could please try increasing the stack size of the task? For example if the task has 1500 of stack, then try using 3000.

Please let me know if this helps.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
737 Views
VinGanZ
Contributor III

Switching compiler revisions seemed to better the situation.

What is the recommended IAR version for MQX 4.0 ?

0 Kudos
737 Views
soledad
NXP Employee
NXP Employee

Hi,

Freescale MQX RTOS version 4.0.2 release was compiled and tested with IAR Embedded Workbench® for ARM® Version 6.50.5


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
737 Views
DavidS
NXP Employee
NXP Employee

Hi Vinod,

The MQX_Release_Notes.pdf in the MQX4.0/doc folder tells you which version of IAR was used for testing.

In general newer versions of an IDE will work too.

Regards,

David

0 Kudos