Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Unable to halt arm core on STR7

Hi,

I'm working on STR7 using IAR and Jlink. Sometimes, the ARM core doesn't answer. The Jlink says "unable to halt ARM core". I can't get back my CPU after reset, RAM boot etc... I've tried everything according IAR or segger recommandations. I've installed the latest version of JLINK driver, but without any success.

When it happens, the only solution I've for the moment is to remove the chipset and replace it...expensive.... Do you have any idea how to get back control on the ARM core ?

Do you use RAM or FLASH configuration in your project?
For experimental states it is recommended to use a RAM configuration and to switch to a FLASH configuration if you are sure that your application runs stable.

Unable to halt ARM core

Hi Oliver,

I use flash configuration. Indeed, I need a lot of RAM memory for my program. I have a filesystem installed in the RAM (32kb). I also use 12 kb of RAM as buffers for USB transfert. In this case, I'm not sure to be able to run in RAM configuration ? Is it correct ?

Anyway, I noticed that the "unable to halt ARM core" case happens when I upload, "by accident", a program with wrong memory mapping (the linker file). The question is then : Is there a solution to get back control on the ARM7 when it's locked as it seems to be in my case ? (Especially for my demo-board)

Open the project options of your RAM configuration and click "Linker" from the left hand menu.
Switch to the "List" tab and ensure the "Generate linker listing" and "Module summary" checkboxes are checked.
Compile your RAM project, IAR will generate a .lst file which can be found in the file tree with the same looking name as the executable.
Open it and scroll to the end of the file, there will be a total summary of how much space your program needs.

Soft Unlock STR7

If the STR7 Flash is software locked you can make use of the J-Flash utility to soft unlock it. There are two options to soft unlock this. You can set the Global Options to Automatically unlock sectors if necessary. Or you can modify the Flash by navigating to the Target|Lock/Unlock sectors menu option.

There are several reasons why the CPU core can not be halted.
Either the memory wait signal of the core is still enabled or CPU disables the clock (wrong PLL clock settings/CPU enters power-save mode).
Therefore the core cannot communicate via JTAG.
The only way to gain control of the core via JTAG is to reset it and halt it immediately.
BTW: Which STR7xx are you using?
Could you please do the following:

Start the J-Link commander (JLink.exe)

Set a very high JTAG-speed by typing "speed [speed in kHz], for example "speed 8000" and press enter. If you are using a STR75x core - a TDMI-S core, this may not work.

Now type "rx 0" - This will reset the core as quickly as possible. The higher the speed the earlier the core is stopped.
You should see:Reset delay: 0 ms
Reset type NORMAL: Using RESET pin, halting CPU after Reset
Info: Resetting target using RESET pin