AnsweredAssumed Answered

I don'nt know how to enter debugging mode on MPC5748G.

Question asked by kim youngsu on Dec 5, 2016
Latest reply on Dec 13, 2016 by Lukas Zadrapa

i make mpc5748G flash program used to jtag(GPIO)

i made mpc5646c flash program used to jtag(gpio)

MPC5646C enter debugging mode and sram init is under sequence.


//0.Select Tap



MPC5748G  >>>>>>   AUX_TAP_Z4A 101000 >>>>> is it right on mpc5748g?

// 1. Assert RESET
cable_set_signal( CHAIN->cable, CS_TRST, 0 );

// 2. Set the OCR[DR] and OCR[WKUP]
once_reg_write(bus, "OCMD_OCR", (OCR_WKUP | OCR_DR));

// 3. Deassert RESET
cable_set_signal( CHAIN->cable, CS_TRST, CS_TRST );

// 4. Verify debug mode via the DEBUG bit in the OnCE status register
data = once_target_status( bus );
if ((!(data & OSR_DEBUG)) && (enter_dbg_max-- > 0)) {
     goto enter_dbg;

if (enter_dbg_max <= 0)
    return -1;

// 5. Clear the OCR[DR] bit while leaving OCR[WKUP] set and set OCR[FDB]
once_reg_write(bus, "OCMD_OCR", (OCR_WKUP | OCR_FDB));


// 2.5. Enableing external debug mode and other initialization
once_reg_write(bus, "OCMD_DBCR0", DBCR0_EDM); // set DBCR0[EDM]  >>>>> is it right on mpc5748g?
once_reg_write(bus, "OCMD_DBSR", 0xFFFFFFFF); // clear DBSR  >>>>> is it right on mpc5748g?

>>>>> do i use mpc5748g EDBCR0 register?

/* TLB0, 4 GByte Memory Space, Not Guarded, Cacheable, All Access */
setup_mmu_tlb(bus, 0x10000000, 0xC0000B00, 0x00000020, 0x0000003F);   >>>>>>>>>>>mpc5748g don't have mmu so removed
mpc5646c_vector_init(bus); >>>>>>>>>>no init?


// 4.2 Internal SRAM initialization
DEBUGMSG("Internal SRAM initialization!\n");
mpc5646c_sram_init(bus, 0x40005000, 0xFFEEDDCC, 0x800); >>>>>>>>>>>mpc5748g can not access sram???


read 0x40005000 >>>> 0xFFEEDDCC

read 0x40005004 >>>> 0xFFEEDDCC

read 0x40005008 >>>> 0xFFEEDDCC

read 0x4000500c >>>> 0xFFEEDDCC


MPC5646C is Sram init oK!


But MPC5748G is not ok.


I would like know that how to enter debugging mode and read/write register.


I would like to get to goood document.


help me plz