Vybrid mqxboot

cancel
Showing results for 
Search instead for 
Did you mean: 

Vybrid mqxboot

Jump to solution
1,900 Views
Contributor III

For the Vybrid platform there is the linux user space program "mqxboot" which allows to load and start an M4 image. I have a short test application for M4 which is using MQX and looks like this:

void main_task ( )

{

    puts ("hello from M4");

    while (1)

    {

     // do nothing else

    }

}

When I load the image with mqxboot, everything is fine and I see the expected string on stdout. But when I try to load the image a second or third time the output is not done anymore, so I assume that the M4 application is still running from the first mqxboot-call.

Question: Is there an option to explicitely stop the M4 application and reload a new/other application?

Thanks,

Johannes

Labels (3)
1 Solution
230 Views
Senior Contributor II

Hello Johannes,

When the Vybrid resets, the M4 clock is disabled. What the mqxboot utility does is it loads an MQX program into memory and releases the M4 clock, so the M4 core starts executing.

There is no way to reset the M4 core without resetting the A5, so there is no way to start a new program on the M4.

Thanks, and let me know if you have any questions.

Timesys Support

View solution in original post

0 Kudos
16 Replies
230 Views
Contributor III

By writing 0x05fa0001 into 0xe000ed0c (VECTRESET of AIRCR) I was able to reset M4 and restart MQX while A5 is still running and unaffected.

230 Views
Senior Contributor I

Pato,

Can you please provide the page number in the Vybrid Reference Manual where this "AIRCR" register is described? PDF search for that term returned nothing. Thanks.

0 Kudos
230 Views
Contributor III

I made a new video of my stuff and this pretty neat M4 reset feature is at 04:45

https://www.youtube.com/watch?v=Prykiy97e34&feature=youtube_gdata

When doing a Debug-Stop, the Crossworks toolchain invoques a Javascript which does the M4 reset:

function DebugEndCM4()
{

    TargetInterface.pokeWord(0xe000ed0c, 0x05fa0001);  // VECTRESET

}

230 Views
Senior Contributor I

This doesn't seem to work. I tried it with the 2N02G mask Vybrid. It looks like just a memory location as I can read back what I wrote.

0 Kudos
230 Views
Senior Contributor I

I wonder if there's a way to poke that word in DS-5....

0 Kudos
230 Views
Contributor III

Have you tried asking ARM ?
That's what I did with Crossworks, thinking that this feature might be useful to others as well.

0 Kudos
230 Views
Contributor III

Hi Jack,

Unfortunately there is no single source of infos and it's all scattered around. From my experience of the past 4 or 5 months with this MCU, the Vybrid Reference Manual is just the starting point, then the ARM site is the next place to check out (but no fun at all with tons of documentations, revisions, infos relevant or not to the Vybrid)...

Regarding the AIRCR, I found what I was looking for in Joseph Yiu's definitive guide to the ARM Cortex-M3 second edition Table 7.4 on page 113:

- VECTRESET Resets the Cortex-M3 processor (except debug logic), but this will not reset circuits outside the processor

which does exactly what I want.

0 Kudos
230 Views
Senior Contributor I

Thanks for that reference. I'll have to get that book. I also found this about the AIRCR on ARM's website:

ARM Information Center

230 Views
Contributor III

Interesting, thanks Jack. So far writing 1 to VECTRESET has been working fine for me but it's good to know ARM recommends writing 0 instead.

0 Kudos
230 Views
Senior Contributor I

Can you try writing zero to that bit and see if that works, too? I have a feeling that they're not mentioning something.

0 Kudos
230 Views
Contributor III

You're right, writing 0 doesn't work!

0 Kudos
230 Views
Senior Contributor I

They said:

"When writing to the register you must write 0 to this bit, otherwise behavior is Unpredictable."

I think that "Unpredictable" behavior when writing a '1' to this bit is that it causes a reset to that core and only that core.

0 Kudos
230 Views
Senior Contributor II

Hello Johannes,

Only one M4 application being loaded per Linux session is supported. In order to reload your M4 application, you will need to reset your board.

Thanks, and let me know if you have any questions.

Timesys Support

230 Views
Contributor III

Hi,

thanks for the reply! But I'm still wondering if there is no other option to restart the M4 from A5 side? Maybe I can modify the mqxboot application in any way?

Thanks,

Johannes

0 Kudos
231 Views
Senior Contributor II

Hello Johannes,

When the Vybrid resets, the M4 clock is disabled. What the mqxboot utility does is it loads an MQX program into memory and releases the M4 clock, so the M4 core starts executing.

There is no way to reset the M4 core without resetting the A5, so there is no way to start a new program on the M4.

Thanks, and let me know if you have any questions.

Timesys Support

View solution in original post

0 Kudos
230 Views
NXP Apps Support
NXP Apps Support

timesyssupport can you help  on this case?

0 Kudos