Keil Logo


Information in this article applies to:

  • MCBSTR9 Evaluation Boards
  • RealView MDK-ARM Version 3.02 or higher


My Keil MCBSTR9 Board used to work, but now I cannot the Flash ROM anymore. I can't communicate with the device or even read the JTAG ID from the device.

How can I fix this?


The JTAG on the STR9 device can be blocked by user code with invalid values for the register SCU_CLKCNTR (AHBDIV, RCLKDIV, MCLKSEL). When a program with invalid SCU_CLKCNTR values is in FLASH ROM, the JTAG is blocked and standard access via ULINK is not possible.

To solve this problem, you must hold the device in RESET state (which prevents the incorrect code from being executed until the debugger gains control) and issue the command Flash — Erase from the µVision menu.

This sequence is implemented in UL2ARM.DLL V1.20a or higher which is part of MDK-ARM Version 3.02.

The unlock procedure in detail is:

  1. Power off the device.
  2. Power on the device while holding the reset button on the target.
  3. Start µVision with a STR9 project (and the correct Flash algorithm) and select from the µVision menu Flash — Erase.
  4. Wait at least 0.5 second,  but not more then 1.5 seconds.
  5. Release the Reset button on the target.
  6. Flash will be erased (with the bad code) and JTAG will be fully functional again.



The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, November 30, 2006

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.