Sergei Gavrikov a écrit :
On Wed, 30 Jun 2010, Nicolas FLAVEN wrote:

Hello,

I would like to know how i can setup x serial channel that share the
same interrupt vector.

My probleme is that my serial channel have to share the same interrupt
vector and I want that the ISR find which channel is interrupting but
if I use SERIAL_CHANNEL_USING_INTERRUPTS with the corresponding
DEVTAB_ENTRY this will overwrite the adresse of the ISR attache to the
vector and the data.

Should I care about it ? Is the " chain all interrupts together"
options the solution to allows for multiple ISR/DSR pairs to be
registered for the same interrupt vector.

Hi Nicolas,

Look at a comment in hal_arbiter.h (hal/common/*/include/hal_arbiter.h).
I hope you will get the idea.

Sergei


Hi

I understand that CYGIMP_KERNEL_INTERRUPTS_CHAIN and CYGIMP_HAL_INTERRUPTS_CHAIN will produce ALL my ISR to be chain ON vector. Is that right ? Does it depend of the target ( there it's an lpc2294 ) ?

I don't really understand the arbiter process comment (looking at mpc8xx example don't help me too): for me different source call different isr. In my case CYGNUM_HAL_INTERRUPT_EINT3 is the shared vector, SERIAL_CHANNEL_USING_INTERRUPTS is used to attach 8 pc_serial_ISR through pc_serial_funs. How can i make the difference between the 8 channel to process the right data in hal_call_isr ?

Nicolas

//=============================================================================
// Function used to call ISRs from ISR arbiters
// An arbiter is hooked on the shared interrupt vector and looks like this:
//
//  cyg_uint32 _arbitration_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
//  {
//     cyg_uint32 isr_ret;
//     // decode interrupt source and for each active source call the ISR
//     if (source_A_active) {
//         isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_A);
//  #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
//         if (isr_ret & CYG_ISR_HANDLED)
//  #endif
//             return isr_ret;
//     }
//     if (source_B_active) {
//         isr_ret = hal_call_isr (CYGNUM_HAL_INTERRUPT_SOURCE_B);
//  #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
//         if (isr_ret & CYG_ISR_HANDLED)
//  #endif
//             return isr_ret;
//     }
//  ...
//     return 0;
//  }
//
// Remember to attach and enable the arbiter source:
// HAL_INTERRUPT_ATTACH(CYGNUM_HAL_INTERRUPT_ARBITER, &_arbitration_isr, 0, 0);
//    HAL_INTERRUPT_SET_LEVEL(CYGNUM_HAL_INTERRUPT_ARBITER, 1);
//    HAL_INTERRUPT_UNMASK(CYGNUM_HAL_INTERRUPT_ARBITER);

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to