MQX RTOS program always got stuck in "_mqx_idle_task"

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

MQX RTOS program always got stuck in "_mqx_idle_task"

Jump to solution
4,523 Views
titusstalin
Contributor V

HI All,

I'm working with FRDMK64F board.

Not able to debug and run any RTOS code on this board.

Always got stuck at "_mqx_idle_task" function.

It was working perfectly yesterday.

Just today I was soldered the board for for VIN line power up and did some RTC section.

I have two board with the same condition.

I hope it could be some hardware problem.

Please note that I'm able to run the "helloworld_k64f.bin" LED code on that problematic board.

Could any one help me to address this problem.

Any insights on this and it will be greatly appreciated?

Regards,

Titus S.

1 Solution
3,815 Views
titusstalin
Contributor V

Hi David,

Thank you so much for your support so far.

Yes, I've checked the pictures and confirmed that I'm using the same board.

Yes, I'm not able to get anything on console (terminal) since it is not able to execute any tasks so its hung at "idletask"

Just now I got new board and its working flawlessly. So no issues with terminal or RTOS code or our won sw code etc.,

My problematic board version is "700-28163 REV A"

New board version is "700-28163 REV C"

I have two problematic boards, I've discussed with hw team and we probed each and every power sections, seems good.

I've no idea on this issue, its mysterious, :-)

I can run every code on my new board.

The problem is started when I've soldered the board for some requirements but its working good for a couple of weeks then stopped working, I given in the following link which I communicated in forums for various requirements and issues.

https://developer.mbed.org/questions/6766/Not-able-to-drive-5V-for-my-RFID-reader-/

https://developer.mbed.org/questions/6465/RTC-connection-for-FRDMK64F/

http://developer.mbed.org/questions/6109/How-to-supply-the-external-power-to-the-/?sort=date

Anything I want to probe/check on hardware side for this issue.

View solution in original post

0 Kudos
Reply
32 Replies
2,655 Views
louef
Contributor II

You will get stuck in _mqx_idle_task if BSPCFG_ENABLE_RTCDEV is defined to 1 and RTC is not functional or present.

2,655 Views
titusstalin
Contributor V

Yes, you are right.

Thank you.

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Even I'm not able to run "mbed_blinky" code which has size ~22KiB.

I'm able to run pre-build "HelloWorld_K64F.bin" which has ~14KiB size on board.

https://developer.mbed.org/platforms/frdm-k64f/

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

While debugging "hello_world_frdmk64f120m",always it get hang at the following line.

Its under MQS RTOS version "MQX_KSDK_1.0.0"

File : startup_MK64F12.S

Default_Handler:

  b    .

  .size    Default_Handler, . - Default_Handler

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

Please download and try the latest KDS_2.0.0 and KSDK_1.1.0 to see if that resolves your problem.

Please list what debugger firmware interface you are using: PEMicro, Segger JLink, MBED ???  Maybe the firmware needs updating.

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Hi David,

Thanks for your reply.

I've tried KSDK_1.1.0 version too but with no success.

In that version, code always got stuck with "idle task" ie executing idle tasks.

I think, its a hardware problem.

I'm curious about this behavior, since I'm able to running LED blinking code which has size about 14KiB but not anyother code.

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

When you enter Debug mode, are you step or look at memory?  Maybe more details of your steps will help me to help you.

When/if you are in the Debug mode, delete all breakpoints.  Sometimes "old" breakpoints cause issues.

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Thanks Dave.

I've tried already and no improvement.

Actually the problem seems either debug mode problem nor software problem but seems hardware issue.

Because the simple "hello world" program itself not working but as I told you  "HelloWorld_K64F.bin" this program is working good.

Also I suspect that any internal memory got corrupted since it was working with "HelloWorld_K64F.bin" which has just ~14KiB.

I have configured the board to "mbed" and copied the same binary which worked already and now it is not at all working.

I don't want to work with "DEBUG" mode but need "MBED" configuration.

Even I'm not able to run any "hello world" UART code and getting nothing output from USB"

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

Zip and post your MBED hello world.

I just resurrected my frdm-k64 MBED board.  I updated the firmware (hold reset when you connect USB cable then drag firmware onto the BOOTLOADER MSD) and re-compiled an example project that prints out to the terminal (not MBED terminal should be 9600 and not 115200).

The Green LED blinks once a second.  I'll attach it as a ZIP too.

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Thanks Dave for your support.

I've updated the attached firmware (In fact I've tried already) and still facing the same problem.

One mysterious thing is the following "Hello world" program is working good (RED LED blinking)(~14KiB)

http://developer.mbed.org/platforms/frdm-k64f/#downloading-a-program

Also I build the following program and not working(~20KiB).

FRDM-K64F | mbed

"mbed_blinky_K64F.bin"

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

I imported that code and it is working for me.  Sorry.

One last project for you to try to load.  It displays following on terminal:

Hello World!

0

1

2

3

4

.

.

.

Might be worth getting another board.

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Thanks Dave for your support.

Surprisingly its working (Green LED with UART o/p as you said) but not my latest project code which is worked already:-(

Also, not working which I rebuild binary through "MBED online compiler" and KDS (RTOS code)

Where did you get this code ?

It seems pre-built code.

I last :-(, I don't know whats going on my FRDMK64F board.

I've two boards with the same condition so I need to find out the root cause and solution.

Could you please help me.

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

I'm just using my online MBED account to compile the project which then automagically downloads the binary for me to them drag-n-drop onto my MBED device (frdm-k64f freedom board).

The code is:

#include "mbed.h"

DigitalOut myled(LED_GREEN);

Serial pc(USBTX, USBRX);

int main() {

    int i = 0;

    pc.printf("\nHello World!\n");

    while (true) {

        wait(0.5);

        pc.printf("%d \n", i);

        i++;

        myled = !myled;

    }

}

Other things to try:

1) Use KDS_2.0.0 and KSDK_1.1.0 with attached frdm-k64 example code placed into the following folder:

C:\Freescale\KSDK_1.1.0

In KDS (after you did eclipse update for KSDK) and opened and compiled example, then using the Debug Configuration "OpenOCD" debugger interface to download and debug example.  Great reference for this and magic settings update is at: 

http://mcuoneclipse.com/2015/03/22/openocdcmsis-dap-debugging-with-eclipse-and-without-an-ide/

2) Use KSD/KSDK but load PEMicro debugger firmaware onto the frdm-k64 freedom board.  You have to get it from PEMicro.com

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Hi Dave,

Thanks for your support.

Already I have tried to debug with "PEMicro debugger" and "JLINK" but no success.

I'm hang at "IDLE" task.

I'm curious that why its behaving like this since its worked past 3 months and suddenly stuck like this.

Could you please check that anyone have faced this sort of problem ?

Thanks again for your support.

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

I tried Firefox and that worked for me.  Please make sure your terminal is 9600 for MBED.

For KDS/KSDK the baud is 115200.

Once in the Debug perspective, please remove/delete all breakpoints that are set.  Exit and re-download.

Attached is my example project to place into the C:\Freescale\KSDK_1.1.0 folder and import.  I forgot to attached in previous post.  Sorry.

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Hi David,

Thank you so much for your support.

Done, no progress.

I've removed the all break points and reloaded the code but no success.

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Hi David,

Any other ideas or insights ?

I don't want to work with "Debug" mode as of now.

Just I want to put my serial code which is built through "MBED" online compiler.

Could you provide the example compiled on your machine (it could be better if example support for button,UART print and LED glow up etc.,)

So that I will try that example on my board and confirm that no HW issues and might have SW issue which need some sw upgrade etc.,

Thanks for your support.

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

The attached MBED generated binary has UART baud set to 115200.

Press and hold SW2 or SW3 and the terminal output will indicate which SW was pressed.  Also the LED color changes.

With SW3, if you input a character, it will display the last 5 characters input (actually 6 but who's counting).

Use space bar to clear to clear that buffer.

Releasing the SW will also output the change.

Example terminal output:

Hello World from FRDM-K64F board.

SW2 released

SW3 released

SW2 pressed

SW2 released

SW3 pressed

Last 5 characters received were

SW3 released

SW3 pressed

Last 5 characters received were

SW3 released

SW3 pressed

Last 5 characters received were

SW3 released

SW3 pressed

Last 5 characters received were

SW3 released

SW2 pressed

SW2 released

SW3 pressed

Last 5 characters received were

SW3 released

SW3 pressed

Last 5 characters received were

SW3 released

SW3 pressed

Last 5 characters received were jhjhjh

SW3 released

SW3 pressed

Last 5 characters received were    

SW3 released

SW3 pressed

Last 5 characters received were   

5

SW3 released

SW3 pressed

Last 5 characters received were  

58

SW3 released

SW3 pressed

Last 5 characters received were 58 

SW3 released

SW3 pressed

Last 5 characters received were 58 

SW3 released

SW2 pressed

SW2 released

SW3 pressed

Last 5 characters received were tyuiop

SW3 released

SW3 pressed

Last 5 characters received were      

SW3 released

SW3 pressed

Last 5 characters received were  ppppp

SW3 released

SW3 pressed

Last 5 characters received were p    

SW3 released

FYI - to attach click on the "use advanced editor" link in upper right hand corner...then "Attach" link appears lower right corner.

Also attached is my MBED source.

Regards,

David

0 Kudos
Reply
2,655 Views
titusstalin
Contributor V

Hi David,

Thanks for your support.

Given binary is working good.

I don't know that why the same code is not working if I built the code myself.

I have worked already and able to compile and run every thing okay.

I don't know whats going on :-(

As of now, I don't want to work with DEBUG mode and need to check that why its not working when I built via MBED online compiler.

Any ideas on this question ?

Thanks again.

0 Kudos
Reply
2,655 Views
DavidS
NXP Employee
NXP Employee

Hi Titus,

I'm running out of ideas.

I tried FireFox and Chrome and both browsers work for me.

Make sure your MBED account is setup correctly for FRDM-K64F.

You could try setting up a new MBED account as a test.

Sorry for your issues.

Regards,

David

0 Kudos
Reply