How to setup an interrupt stack in internal RAM of Coldfire MCF52277?

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

How to setup an interrupt stack in internal RAM of Coldfire MCF52277?

Jump to solution
796 Views
lumen
Contributor III

I would like to define an interrupt stack in the internal RAM with the following structure:

const MQX_INITIALIZATION_STRUCT  MQX_init_struct =

{

   /* PROCESSOR_NUMBER                */  BSP_DEFAULT_PROCESSOR_NUMBER,

   /* START_OF_KERNEL_MEMORY          */  BSP_DEFAULT_START_OF_KERNEL_MEMORY,

   /* END_OF_KERNEL_MEMORY            */  BSP_DEFAULT_END_OF_KERNEL_MEMORY,

   /* INTERRUPT_STACK_SIZE            */  BSP_DEFAULT_INTERRUPT_STACK_SIZE,

   /* TASK_TEMPLATE_LIST              */  MQX_template_list,

   /* MQX_HARDWARE_INTERRUPT_LEVEL_MAX*/  BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX,

   /* MAX_MSGPOOLS                    */  BSP_DEFAULT_MAX_MSGPOOLS,

   /* MAX_MSGQS                       */  BSP_DEFAULT_MAX_MSGQS,

   /* IO_CHANNEL                      */  BSP_DEFAULT_IO_CHANNEL,

   /* IO_OPEN_MODE                    */  BSP_DEFAULT_IO_OPEN_MODE,

   /* INTERRUPT_STACK_LOCATION        */  BSP_DEFAULT_INTERRUPT_STACK_LOCATION

};

In the linker file the interrupt stack is located as follows:

# interrupt stack

    interrupt_stack (RW) : ORIGIN = 0x80010000, LENGTH = 0x0000F800

    end_of_is        (RW) : ORIGIN = 0x8001F7FF, LENGTH = 0x00000000

Is this setup correct? MQX is starting up and the stack seems to be initialized, but the interrupts are not working correctly. I have tested my code with default interrupt stack (external RAM) and this is working.

What is missing? Is the init of MQX correct?

Regards,

Patrick

0 Kudos
1 Solution
608 Views
lumen
Contributor III

There was another issue in the declaration of the interrupts. The MQX init above is working.

View solution in original post

0 Kudos
2 Replies
609 Views
lumen
Contributor III

There was another issue in the declaration of the interrupts. The MQX init above is working.

0 Kudos
608 Views
RadekS
NXP Employee
NXP Employee

Thank you for your note.

0 Kudos