S08 IRQ

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
1,930 次查看
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,033 次查看
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,034 次查看
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,033 次查看
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 项奖励
回复