AnsweredAssumed Answered

MCF52259 - Was programming OK, now dead & BDM refuses to work

Question asked by FridgeFreezer on Jan 14, 2010
Latest reply on Jan 25, 2010 by FridgeFreezer

Hi guys,

A few questions rolled into one post here, hopefully you can help us before the boss throws the board out of the window. Unfortunately my seat is in front of the window.

 

Anyway, we have a prototype board which uses the MCF52259 (CAG80*144LQFP). Most of the basics are the same as the M52259EVB eval board, but we've had terrible problems trying to bring the thing to life. We're using CodeWarrior IDE, 5.9.0.3024, as supplied with M52259EVB and updated online to the latest version. The test code is a very small LED-flashing program which has been proven to work on the EVB.

 

First off, BDM programming has been very shaky, sometimes it works, sometimes it doesn't. The BDM is exactly the same as the EVB setup (with jumpers in default positions) and we're using a P&E_USB (Multilink) BDM module which we have proved works OK on the EVB's BDM port. We've managed a few successful erase/blank check/program/verify cycles but now it's given up and all we get when trying to start the programmer in CW is "Error: Initialization failed".

 

We are using the "MCF52259_INTFLASH.xml" config for the BDM module, as stated this works fine with the EVB's own 26-pin BDM port.

 

The board & micro now seem to be dead - even though the /RSTIN pin is pulled up, the /RSTOUT pin stays low permanently. We found CLKMOD1:0 was hovering around ~1.5v even though pulled up to 11 via 10k resistors. Pulling it up hard made no difference. Thinking the PLL may be causing problems we've pulled it down to 00 (MHz crystal oscillator bypass with PLL disabled) and still the oscillator doesn't start. It's now been restored to 11.

 

Hampering our efforts to understand what's wrong is the truly awful documentation for the BDM port, trying to work out which signals should be flying around from which end is proving very tricky. We can see the BDM module pull /RSTIN low for 20ms, three times, but then not much else happens. Any sortof signal/timing diagram for the BDM port would be greatly appreciated at this stage.

 

Sources of confusion are that the BDM seems to not want to work without a running oscillator on the board itself, and that even though the oscillator on our board is not running, there are some pins of the MCU which do have pulses coming out at low speeds (~3MHz, see below). Our oscillator circuit is the same as the EVB one so it's doubly annoying that it won't start.

 

I don't believe there is anything on our board which, in un-initialised state, could be causing any conflicts with the CPU in its un-initialised state (eg pulling legs high or low, etc.).

 

I'm not sure if any of this will help, but here's some pin states we've observed:

 

Powered up with no BDM connected:

/BKPT - 3v3

DSCLK - 3v3

DSI - 3v3

DSO - 0v

ALLPST - 0v

PSTCLK - 3MHz

JTAG_EN - 0v (pulled down)

FB_D3 - 60Hz low spikes (17ms at 3v3 / 190uS at ground)

FB_D2 - 60Hz low spikes (17ms at 3v3 / 190uS at ground)

VDDPLL - 3v3

EXTAL - 3v ish

XTAL - 0v

CLKMOD1 - 3V3 (pulled up)

CLKMOD0 - 3V3 (pulled up)

/RSTOUT - 0V

/RSTIN - 3V3

 

 

Powered up with BDM connected:

/BKPT - 0v

DSCLK - 0v

DSI - 0v

DSO - 0v

ALLPST - 0v

PSTCLK - 3MHz

JTAG_EN - 0v (pulled down)

FB_D3 - 60Hz low spikes (17ms at 3v3 / 190uS at ground)

FB_D2 - 60Hz low spikes (17ms at 3v3 / 190uS at ground)

EXTAL - ~3v

XTAL - 0v

CLKMOD1 - 3V3 (pulled up)

CLKMOD0 - 3V3 (pulled up)

/RSTOUT - 0V

/RSTIN - 3V3

 

Any light people may be able to shed on this would be greatly appreciated.

Outcomes