Converting to banked memory (DZ128) - Interrupt question

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

Converting to banked memory (DZ128) - Interrupt question

跳至解决方案
1,393 次查看
video_man
Contributor III

I'm converting a previous well-tested production design to banked memory (MC9S08DZ128 - CW 6.3) for the first time and I'm not sure what I must do with interrupts. My banked version is running but an uninvolved RAM variable is sometimes changed when executing a series of interrupts. I have the interrupt handlers non-banked, but is there any restriction on calling banked functions from the interrupt handlers?

标签 (1)
0 项奖励
回复
1 解答
1,299 次查看
kef2
Senior Contributor V

Like Yong Li said, there's no restrictions calling banked functions from ISRs, provided you don't do in ISR anything smart like interrupt nesting or task switching (like in preemptive RTOS). In such smart cases you may need to save and restore PPAGE by hand. Failure to do so will most likely lead to runaway. "variable sometimes changes" could be caused by higher stack space requirement of banked application. Try increasing stack size.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,300 次查看
kef2
Senior Contributor V

Like Yong Li said, there's no restrictions calling banked functions from ISRs, provided you don't do in ISR anything smart like interrupt nesting or task switching (like in preemptive RTOS). In such smart cases you may need to save and restore PPAGE by hand. Failure to do so will most likely lead to runaway. "variable sometimes changes" could be caused by higher stack space requirement of banked application. Try increasing stack size.

0 项奖励
回复
1,299 次查看
Rick_Li
NXP Employee
NXP Employee

Hi video_man,

There is no restriction on calling a banked functions from the interrupt handlers.

But, there are some work to do to place functions on a banked memory.

could you please refer to AN3730 which is available at:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3730.pdf

Hope it helps!

0 项奖励
回复