Coldfire BDM problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Coldfire BDM problems

1,142 Views
tony_49512
Contributor I

Hi:

 

I am writing some code to program the flash memory of a ColdFire

MCF5270 via the BDM interface.

 

The basic code seems to work. After resetting the device (with

*BKPT asserted) I disable the watchdogs, disable *CS0 and  disable

the cache. The DBM never returns any error during all this and the

values written are read back and verified to be correct.

 

The next step would be to access the internal SRAM. To this end I

program the RAMBAR register with 0x10000001 to place the start

of the SRAM memory (64K) at 0x10000000. Again, the value is read

back from the RAMBAR and verified to be correct.

 

After this, ever access to the SRAM memory fails: Regardless of what 

I write, the interface returns the same value. The value returned

(0x2000FFFC) might not mean anything but is is also quite interesting

because it looks like the reset value of a stack pointer (location 0 in

boot ROM for the Coldfire) that I would load to point to the top of a

64KB memory. It seems to imply that *CS0 is  active and the value

read is from the external flash rather than the internal SRAM, but

having disabled *CS0 this seems strange.

 

Since the BDM never returns any error I am tempted to think that

the basic code works, and that writing to the SRAM is only a matter

of programming some other registers: I am only mildly familiar with

the Coldfire core, so at this point I am looking for ideas.

 

Any help will be appreciated. 

 

Tony 

Labels (1)
0 Kudos
1 Reply

312 Views
polofermin
Contributor III

Hello, Do you have USB port?

 

Bye!

0 Kudos