_event_open generates Unhandled Exception

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

_event_open generates Unhandled Exception

Jump to solution
803 Views
panpwr
Contributor IV

Hello,

I am a newbie to MQX, and trying my first steps with this OS, and I am trying to activate a simple event by using the code below.

I manage to create an event by "_event_create" (I can verify that event was initialized by using Keil's MQX OS Support "Events" window in debug mode).

However, when I step over the "event_open", the system hangs, and when I look at the debug window I see that the task status is "Unhandled Interrupt", TD = 0x1fff105c.

How should I proceed from here?

Here is the code:

#define CONFIG_DB_INIT_STRING "ConfigDBInit_EventGroup"

pointer event_configDbInit;

_int_install_unexpected_isr();

_int_unexpected_isr(0);

error = _event_create(CONFIG_DB_INIT_STRING);

if (error != MQX_OK)

{

    printf("\nevent_create (%s)failed", CONFIG_DB_INIT_STRING);

    _task_block();

}

error = _event_open(CONFIG_DB_INIT_STRING, event_configDbInit);

if (error != MQX_OK)

{

    printf("\nTask error code is 0x%1x", _task_errno);

    printf("\nevent_open to %s failed", CONFIG_DB_INIT_STRING);

    _task_block();

}

Thanks,
Lior.

Tags (2)
0 Kudos
Reply
1 Solution
625 Views
DavidS
NXP Employee
NXP Employee

Hi Lior,

You have:

error = _event_open(CONFIG_DB_INIT_STRING, event_configDbInit);

try:

error = _event_open(CONFIG_DB_INIT_STRING, &event_configDbInit);

Also you can look at the following example to compare:

C:\Freescale\Freescale MQX 3.8\mqx\examples\event

I've found learning the RTOS good to start with chapter #3 of the MQXUG.pdg in C:\Freescale\Freescale MQX 3.8\doc\mqx .  It will walk you through many simple RTOS example located in the ~\mqx\examples path.

Regards,

David

View solution in original post

0 Kudos
Reply
3 Replies
626 Views
DavidS
NXP Employee
NXP Employee

Hi Lior,

You have:

error = _event_open(CONFIG_DB_INIT_STRING, event_configDbInit);

try:

error = _event_open(CONFIG_DB_INIT_STRING, &event_configDbInit);

Also you can look at the following example to compare:

C:\Freescale\Freescale MQX 3.8\mqx\examples\event

I've found learning the RTOS good to start with chapter #3 of the MQXUG.pdg in C:\Freescale\Freescale MQX 3.8\doc\mqx .  It will walk you through many simple RTOS example located in the ~\mqx\examples path.

Regards,

David

0 Kudos
Reply
625 Views
panpwr
Contributor IV

Thank you David, I haven't noticed this. Probably because event_configDbInit is defined as a pointer, but I haven't noticed that I should send pointer-to-pointer parameter (pointer _PTR_)...

I actually learn using this guide and the supplied examples, which are pretty good for basic understanding. However, are there any online/video courses which you could refer me to, in your website or community?

Thanks again,

Lior.

0 Kudos
Reply
625 Views
DavidS
NXP Employee
NXP Employee

Hi Lior,

Lots of training to find....keyword "find".

Our technical support page has a link to training of various methods:

http://www.freescale.com/webapp/sps/site/homepage.jsp?code=TRAINING_HOME

MQX basics online training:

http://www.freescale.com/webapp/sps/site/training_information.jsp?code=WBNR_VFTF09_AZ146

MQX Product page has many links:

http://www.freescale.com/webapp/sps/site/homepage.jsp?code=MQX_HOME&tid=vanMQX

YouTube:

http://www.youtube.com/user/freescale/videos?view=0

Regards,

David

0 Kudos
Reply