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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
850 次查看
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 项奖励
1 解答
662 次查看
lumen
Contributor III

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

在原帖中查看解决方案

0 项奖励
2 回复数
663 次查看
lumen
Contributor III

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

0 项奖励
662 次查看
RadekS
NXP Employee
NXP Employee

Thank you for your note.

0 项奖励