S08 IRQ

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,934件の閲覧回数
KerryMac
Contributor III

Greetings all,

 

I am completing my PCB layout for our MC9S08LC36 project, and I have an IRQ issue. Since our products are used on motorcycles, they run in a noisy EMI/RFI environment. In the past we have connected the IRQ pin to ground while disabling IRQ Interrupts. This has served us very well.

 

While researching for our S08 project I came across this note in Fabio Pereira's excellent book, HCS08 Unleashed. Page 210 of  states "The IRQ pin is automatically enabled upon entering any stop mode!" Of course this raises concerns with a grounded IRQ pin. 

 

Questions:

 

* Am I taking this out of context, or is this fully applicable to the three Stop modes?

 

 

* Assuming the above has no implications, for EMI "hardening" should I float (no connect) the IRQ pin or connect to ground? Of course, in either configuration the pin will be set to Output, Interrupt and IRQ function disabled.

 

 

Thanks,

KM

ラベル(1)
0 件の賞賛
返信
1 解決策
1,037件の閲覧回数
KerryMac
Contributor III

Thanks bigmac,

 

This is a great case of the forums providing other sets of experienced eyes looking over our shoulders. Early into this project I made note of the IRQ being input only, then I allowed this to drop off my radar screen. Your reply got me back on track with this particular issue.

 

My PCB layout will have the IRQ pin a no-connect, and I will initialize IRQSC as follows:

 

IRQPDD = 1, IRQ pullup enabled

IRQEDG = 0, falling edge

IRQPE = 1, IRQ pin enabled which also asserts the internal pullup

IRQIE = 0, no interrupt from IRQF

IRQMOD = 0, falling edge but no level

 

I will frequently re-assert this, plus I will do a handler to trap for spurious interrupts. The combination of no-connect of the IRQ input only pin, a pullup to keep the pin from floating and the isolation from the rest of the PCA on the pin side should provide decent immunity from EMI. Hopefully, with IRQ interrupts disabled no noise spikes can cause unexpected behavior.

 

Thanks again,

KM

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,038件の閲覧回数
KerryMac
Contributor III

Thanks bigmac,

 

This is a great case of the forums providing other sets of experienced eyes looking over our shoulders. Early into this project I made note of the IRQ being input only, then I allowed this to drop off my radar screen. Your reply got me back on track with this particular issue.

 

My PCB layout will have the IRQ pin a no-connect, and I will initialize IRQSC as follows:

 

IRQPDD = 1, IRQ pullup enabled

IRQEDG = 0, falling edge

IRQPE = 1, IRQ pin enabled which also asserts the internal pullup

IRQIE = 0, no interrupt from IRQF

IRQMOD = 0, falling edge but no level

 

I will frequently re-assert this, plus I will do a handler to trap for spurious interrupts. The combination of no-connect of the IRQ input only pin, a pullup to keep the pin from floating and the isolation from the rest of the PCA on the pin side should provide decent immunity from EMI. Hopefully, with IRQ interrupts disabled no noise spikes can cause unexpected behavior.

 

Thanks again,

KM

0 件の賞賛
返信
1,037件の閲覧回数
bigmac
Specialist III

Hello KM,

 

Be aware that for some MCU the IRQ pin is only available as a GP input.  I am not sure if this is also true for the 'LC36.

 

The usual approach for minimizing spurious IRQ interrupts is to use an external pullup resistor (4k7 or 10k) at the pin, plus a shunt capacitor to ground (say 100n).  If connecting the pin permanently low, I guess that  an IRQ event is possible, when the IRQ module is first (automatically) enabled.  But this would immediately take the MCU out of stop mode - not the desired effect..

 

Even though you may not be using IRQ interrupts, providing an interrupt handler for any spurious interrupts would seem a good idea.  This might simply consist of a single RTI instruction.

 

Regards,

Mac

 

0 件の賞賛
返信