[ECOS] Interrupt and IO-device driver

Jesper Skov jskov@redhat.com
Wed Oct 18 06:47:00 GMT 2000

>>>>> "Daniel" == Daniel Lind <daniel.lind@sth.frontec.se> writes:

Daniel> Hi, I'm using PowerPC MBX860 and I'm trying to write a device
Daniel> driver for SCC2. Look bellow for the code....  The interrupts
Daniel> doesn't seem to work right. I have investigated SCCE[Tx] and
Daniel> this bit is set after a buffert is sent, so this is ok. I have
Daniel> also checked CIPR (CPM interrupt pending register) and this
Daniel> register tells me that an interrupt is pending on SCC2, this
Daniel> is also ok. After doing these tests I think that the problem
Daniel> is that I haven't initialized the interrupts in the right
Daniel> way.....ISR and DSR are never called.

Does the CPM arbiter in var_intr.c (hal_arbitration_isr_cpm) get
properly set up? It probably does if you selected the 860 variant.

Still, that's the only thing in the chain I can think of (off hand) as
being broken.  Do the mpc8xx/intr0 test PASS on your board?

Daniel> void scc_uart_init_int(void){
Daniel> cyg_drv_interrupt_create(CYGNUM_HAL_INTERRUPT_CPM_SCC2,
Daniel> CYGARC_SIU_PRIORITY_HIGH, (cyg_addrword_t) &buffers,
Daniel> scc_uart_ISR, scc_uart_DSR, &serial_interrupt_handle,
Daniel> serial_interrupt);
Daniel> cyg_drv_interrupt_attach(serial_interrupt_handle);
Daniel> cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_CPM_SCC2); }

Also please verify that the CPM interrupt is unmasked properly (it
would be if the intr0 test PASSes).

Finally, you should try to enable assertions (enable
CYGDBG_USE_ASSERTS and CYGPKG_INFRA_DEBUG) to catch any unhandled


More information about the Ecos-discuss mailing list