AnsweredAssumed Answered

msgq_receive after printf causes unhandled interrupt

Question asked by Petr Sysel on Dec 6, 2011
Latest reply on Mar 15, 2012 by Petr MacHala

I am using MQX 3.7 on Kinetis K60, standard output is connected to ttyf serial port and I have the following problem.

If I print debug info before the tasks is waiting for a message from message queue

_io_printf("wait for message");msg = _msgq_receive( KODEK_queue, 0);

 I usually get the unhandled interrupt error


*** UNHANDLED INTERRUPT ***Vector #: 0x03 Task Id: 0x10003 Td_ptr 0x1fff5fccPC: 0x000006ea LR: 0x00004d9f PSP: 0x1fff6758 MSP: 0x1fff45a8 PSR: 0x00000003Memory dump:0x1fff6758 : 0x00000000 0xdff2cff3 0x00000073 0x000000000x1fff6768 : 0x1fff77f8 0x00005145 0x00005474 0x810002000x1fff6778 : 0x00005145 0x00000020 0x00000000 0x000000000x1fff6788 : 0x00000000 0x00000000 0x00000000 0x000000000x1fff6798 : 0x00000000 0x00000000 0x00000000 0x000000000x1fff67a8 : 0x00000020 0x00000000 0x1fff6fa0 0x000000000x1fff67b8 : 0x1fff3e80 0x1fff6fac 0x00006f97 0x000000000x1fff67c8 : 0x00000000 0x00000000 0x1fff67fc 0xdff2cff3Memory dump:0x1fff45a8 : 0x1fff3e80 0x00000002 0x1fff3e80 0x000000020x1fff45b8 : 0xdff2cff3 0x1fff6804 0x1fff116a 0x00004ff90x1fff45c8 : 0x00000000 0x00000000 0x1fff4e0c 0x000006210x1fff45d8 : 0x1fff3e80 0x00000000 0x00000003 0x000000c00x1fff45e8 : 0x00000000 0xfffffffd 0x7374616b 0x7374616b0x1fff45f8 : 0x7374616b 0x0b5845a2 0x00000160 0x1fff41a40x1fff4608 : 0x0001ffff 0xb9df3c4d 0x604b9d36 0xcbde07cb0x1fff4618 : 0x8257e5b2 0x868ab5bc 0x45a2a288 0xcf2fbbc3

When I comment _io_printf function

//_io_printf("wait for message");msg = _msgq_receive( KODEK_queue, 0);

 the error does not raise.