This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re : Hello. I want to ask about SMC2 in MPC850




In function cyg_hal_gdb_isr, you must write as "eppc->cpmi_cisr = 0x08;" instead "eppc->cpmi_cisr = 0x10;"
I doubt that is the major reason for the unwanted result.


int cyg_hal_gdb_isr( target_register_t pc )
{
EPPC *eppc = eppc_base();
struct cp_bufdesc *bd;
char ch;

eppc->smc_regs[1].smc_smce = 0xff;

/* rx buffer descriptors */
bd = (struct cp_bufdesc *)((char *)eppc_base() + Rxbd);

if ((bd->ctrl & QUICC_BD_CTL_Ready) == 0) {
// then there be a character waiting
ch = bd->buffer[0];
bd->length = 1;
bd->ctrl = QUICC_BD_CTL_Ready | QUICC_BD_CTL_Wrap | QUICC_BD_CTL_Int;

if ( 3 == ch ) {
// Ctrl-C: set a breakpoint at PC so GDB will display the
// correct program context when stopping rather than the
// interrupt handler.
cyg_hal_gdb_interrupt( pc );

// Interrupt handled. Don't call ISR proper. At return
// from the VSR, execution will stop at the breakpoint
// just set.

eppc->cpmi_cisr = 0x10; --> 0x08 for SMC2
return 0;
}


_________________________________________________________________
MSN Messenger¸¦ ´Ù¿î·ÎµåÇÏ¿© ¿Â¶óÀÎ»ó¿¡ Àִ ģ±¸¿Í ´ëÈ­¸¦ ³ª´©¼¼¿ä. http://messenger.msn.co.kr


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]