This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2138, bootloader problem: Could the bootloader be crashed?

Hi, I am new to the 32/16bit ARM7TDMI-S microprocessor LPC2138 and just start to learn writing code with it. In last three days, I used flashmagic to download code to the flash that works based on the on-chip built-in bootloader. The programming runs properly and I have my app code debugged without any trouble.

However, I come across a problem that the bootloader refused to work after I tried the code read-protection yesterday. After checking the code-read-protection checkbox and loaded the user code into the flash, the code is protected from reading or debugging. Next time when I need to update the code, I have to "Erase all flash+code rd protection" before reprogramming the flash. Doing this seems having no problem since the user code can be loaded into the flash and run properly. But after that, I simply can't go through the reprogramming procedure as the bootloader doesn't work any more.

I checked the interface hardware and tried different interface cables but found no problem. Then, I used a terminal software to monitor the communication flow between the flashmagic and the chip. It reveals that the first message from the chip reply to the flashmagic's "?" command changed from the correct one "Synchronized" to include some extra like "Synchronized ed ...." and the next message reply to the "J" command becomes completely unreadalbe. This makes me doubt if the on-chip bootloader was crashed by the "Erase all flash+code rd protection" procedure. On the other hand, however, my basic understanding of the factory build-in sector of bootloader makes me consider it should be untouchable by any other software. If so, why the communication message from the build-in bootloader become wrong?

I really appreciate if anyone can provide me an explanation or any related information about this case, or share his experiences on how to treat such an issue.

Sincerely,
Rick

0