Hello everyone
I use MQX 3.6 to do a project,. The mcu is mcf52259,I modify m52259evb bsp for my board, and get it running.
Now, I have five tasks in my project, but something is wrong, the system halt about every 2-3hours. I debug and find the timer which generates OS tick seems stop running, (its interrupt routine isn't called when the system halt).
I don't know what is wrong. maybe the MQX has bug? or MCF52259 PSP has bug?
When I first started up my prototype I had a similar problem. VBAT is the voltage that runs the clock and backs up half of your internal RAM. Make sure that is is always at least 0.3V below VCC.
Power supply noise is also critical. Make sure that the input capacitor to the switch-mode regulator is as close as possible to the chip. I like to use a 1uF ceramic.
The task could be shutting down due to some firmware error.
To discover the cause include the following code:
_io_set_handle(IO_STDIN, ch1_fh); _io_set_handle(IO_STDOUT, ch1_fh); _int_install_unexpected_isr();
Setup your hardware so you can hyperterminal a comms channel. Send a wake-up message to ensure that the channel is good on start-up and wait and see.