M68K external flash

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

M68K external flash

685 Views
sharathm
Contributor II

Hi,

 

I have been using M68332 for quite a long time. Currently i am facing issues with erasing and programming external NOR flash interfaced to the m68332 controller. Scenario is something like this,

1. The CSBOOT chip select is connected to external flash AM29F040B.

2. The flash contains a code(consider it as 'Code A')  that receives another code('Code B') and dumps it into an external SRAM.

3. The Code A  succesfully downloads Code B into RAM.

4. Code A then issues a JMP 0x300000(location where 'Code B' is mapped and downloaded).

5. Now the Code B then tries to erase the flash which doesn't happen.

6. The same Code B if ran using Vision Click(BDM tool) successfully erases the flash(this is when the card is not being powered off but directly connected through BDM tool after steps 2 and 3).

 

Can anyone please help me with this,

 

Thanks in advance.

Labels (1)
0 Kudos
Reply
2 Replies

491 Views
TomE
Specialist II

> I have been using M68332 for quite a long time.

I'm guessing that for that long time you have been successfully reprogramming the FLASH from RAM. But now it won't. Is that the case, or have you been reprogramming it using the Debug Pod previously and are NOW trying to do it differently?

Assuming the first case. What changed? What did you change? Can you revert to a version of the code that was able to perform the programming and then make single changes (towards your current code) when it doesn't work?

For the case that works with the debugger, I'm assuming you're using it to load "Code B" into RAM from the debugger, and then run that. So what is different between that case and "Code A" having previously run? Where does "Code A" have its stack? Is that different to the debug case? What is the VBR set to in each case - is it different?. Does Code A enable any interrupts or any DMA-using peripherals. Are Code A and the Debug versions running with different IPLs? I suspect you may be getting an interrupt that vectors off into a handler in Flash and that either cancels the Erase or causes a code crash.

What do you mean by "tries to erase the flash which doesn't happen"? Is the code still in control or has it crashed? Is it waiting for the erase to finish and it waits forever? What are the Status Words in the Flash? Does it have any errors reported. Does your code check for (and report or log) errors or does it assume everything should work?

Tom

0 Kudos
Reply

491 Views
miduo
NXP Employee
NXP Employee

Hi,

I just found this post seems quite old that not been touched by anyone. Actually to say that MC683xx family really old and old and we do not have much resource to support it any more.

For your issue, we had a dBUG monitor which can been used for a bootloader. Maybe not same case with you, anyway, should be a good reference.

0 Kudos
Reply