Converting to banked memory (DZ128) - Interrupt question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Converting to banked memory (DZ128) - Interrupt question

ソリューションへジャンプ
1,392件の閲覧回数
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,298件の閲覧回数
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,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 件の賞賛
返信
1,298件の閲覧回数
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 件の賞賛
返信