Monday, November 20th 2017, 10:26pm UTC+1

You are not logged in.

  • Login
  • Register

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.

Date of registration: Aug 10th 2009

Posts: 1

1

Monday, August 10th 2009, 11:08pm

Issues with Programming my Micro...Could not Transfer JTAG data

Hi, I am not sure why I am not able to program my STM32F103C8T6 on the board I just designed as part of my internship. I have tried unlocking the flash, putting pull-ups/pull-downs on various JTAG lines, ensured all my VDD/VCC on the chip are hooked up and properly decoupled, and a variety of other ideas. Here is what I get when I open the JLINK command line utility:

SEGGER J-Link Commander V4.08f ('?' for help)
Compiled Jul 8 2009 19:55:01
DLL version V4.08f, compiled Jul 8 2009 19:54:44
Firmware: J-Link compiled Jul 30 2008 11:24:37 ARM Rev.5
Hardware: V5.30
S/N : 10006174
OEM : IARKS
VTarget = 3.332V
Info: TotalIRLen = 9, IRPrint = 0x0011
Info: Found Cortex-M3 r1p1, Little endian.
Info: TPIU fitted.
Info: FPUnit: 6 code (BP) slots and 2 literal slots
Found 2 JTAG devices, Total IRLen = 9:
#0 Id: 0x3BA00477, IRLen: 4, IRPrint: 0x1 Cortex-M3 Core
#1 Id: 0x16410041, IRLen: 5, IRPrint: 0x1 STM32 Boundary Scan
Cortex-M3 identified.
JTAG speed: 5 kHz
J-Link>

This is the log file when I program using the IAR Kickstart stuff:

Logging started @ 2009-08-10 21:00
DLL Compiled: Jul 8 2009 19:54:44
Out of sync , resynchronising... (0003ms, 0000ms total)
T0FBC 000:000 Firmware: J-Link compiled Jul 30 2008 11:24:37 ARM Rev.5 (0071ms, 0000ms total)
T0FBC 000:000 returns O.K. (0141ms, 0000ms total)
T0FBC 000:142 JLINKARM_GetDLLVersion() returns 40806 (0000ms, 0141ms total)
T0FBC 000:143 JLINKARM_GetCompileDateTime() (0000ms, 0141ms total)
T0FBC 000:144 JLINKARM_GetFirmwareString(...) (0000ms, 0141ms total)
T0FBC 000:144 JLINKARM_SelectDeviceFamily(3) (0000ms, 0141ms total)
T0FBC 000:144 JLINKARM_SetSpeed(1) (0000ms, 0141ms total)
T0FBC 000:146 JLINKARM_SetResetDelay(0) (0000ms, 0141ms total)
T0FBC 000:146 JLINKARM_ResetPullsRESET(ON) (0000ms, 0141ms total)
T0FBC 000:146 JLINKARM_Reset() >0x2F8 JTAG>TotalIRLen = 9, IRPrint = 0x0011 >0x30 JTAG> >0x210 JTAG> >0x38 JTAG> >0xF0 JTAG> >0x80 JTAG> >0x230 JTAG> >0x200 JTAG> >0xE0 JTAG> >0xE0 JTAG>Found Cortex-M3 r1p1, Little endian. >0x80 JTAG> >0x170 JTAG> >0xE0 JTAG> >0xE0 JTAG>TPIU fitted. >0xE0 JTAG> >0xE0 JTAG> FPUnit: 6 code (BP) slots and 2 literal slots >0xE0 JTAG> >0x180 JTAG> >0x170 JTAG> >0x1A0 JTAG> >0xE0 JTAG> >0xE0 JTAG> >0x170 JTAG> >0x170 JTAG> >0xE0 JTAG> >0xE0 JTAG> >0xEF8 JTAG> >0x1A0 JTAG>
>0xE0 JTAG> >0xEF8 JTAG> >0x110 JTAG> >0xE0 JTAG> (16737ms, 0141ms total)
T0FBC 016:884 JLINKARM_GetIdData(...) ScanLen=9 NumDevices=2 aId[0]=0x3BA00477 aIrRead[0]=0 aScanLen[0]=0 aScanRead[0]=0 (0001ms, 16878ms total)
T0FBC 016:886 JLINKARM_JTAG_GetDeviceID(DeviceIndex = 0) returns 0x3BA00477 (0000ms, 16879ms total)
T0FBC 016:887 JLINKARM_JTAG_GetDeviceInfo(DeviceIndex = 0) returns 0x00 (0000ms, 16879ms total)
T0FBC 016:887 JLINKARM_JTAG_GetDeviceID(DeviceIndex = 1) returns 0x16410041 (0000ms, 16879ms total)
T0FBC 016:887 JLINKARM_JTAG_GetDeviceInfo(DeviceIndex = 1) returns 0x00 (0000ms, 16879ms total)
T0FBC 016:888 JLINKARM_GetDeviceFamily() returns 3 (0000ms, 16879ms total)
T0FBC 016:888 JLINKARM_GetDeviceFamily() returns 3 (0000ms, 16879ms total)
T0FBC 016:888 JLINKARM_GetDeviceFamily() returns 3 (0000ms, 16879ms total)
T0FBC 016:888 JLINKARM_Halt() >0xE0 JTAG> returns 0x00 (0228ms, 16879ms total)

JLINKARM_AddMirrorAreaEx(Addr = 0x00000000, Size = 0x00000000) (0000ms, 0000ms total)
JLINKARM_IsHalted() >0x2F8 JTAG>TotalIRLen = 9, IRPrint = 0x0011 >0x30 JTAG> >0x210 JTAG> >0x38 JTAG> >0xF0 JTAG> >0x80 JTAG> >0x230 JTAG> >0x200 JTAG> >0xE0 JTAG> >0xE0 JTAG>Found Cortex-M3 r1p1, Little endian. >0x80 JTAG> >0x170 JTAG> >0xE0 JTAG> >0xE0 JTAG>TPIU fitted. >0xE0 JTAG> >0xE0 JTAG> FPUnit: 6 code (BP) slots and 2 literal slots >0xE0 JTAG> >0xF0 JTAG> returns TRUE (5203ms, 17108ms total)
T0FBC 022:323 JLINKARM_ReadMemU32(0xE0042000, 0x0001 Items, ...) >0x170 JTAG> -- Data: 10 64 03 20 returns 0x01 (0375ms, 17108ms total)
T0FBC 022:699 JLINKARM_GetEmuCaps() returns 0x80D7BBF (0000ms, 17483ms total)
T0FBC 022:700 JLINKARM_GetSpeed() returns 0x01 (0000ms, 17483ms total)
T0FBC 022:703 JLINKARM_BeginDownload(Flags = 0x03) (0000ms, 17483ms total)
T0FBC 022:729 JLINKARM_WriteMem(0x00000000, 0x0134 Bytes, ...) -- Data: 00 04 00 20 F5 00 00 00 35 01 00 00 35 01 00 00 ...
JLINKARM_ReadMemHW(0x00000000, 0x0004 Bytes, ...) >0x170 JTAG> -- Data: FF FF FF FF returns 0x00 (0361ms, 0000ms total)
JLINKARM_ReadMemHW(0x08000000, 0x0004 Bytes, ...) >0x170 JTAG> -- Data: FF FF FF FF returns 0x00 (0374ms, 0361ms total)
JLINKARM_WriteMemHW(0x00000000, 0x0004 Bytes, ...) -- Data: 00 00 01 00 >0x170 JTAG> returns 0xFFFFFFFF (0375ms, 0735ms total)
JLINKARM_ReadMemHW(0x00000000, 0x0004 Bytes, ...) >0x170 JTAG> -- Data: FF FF FF FF returns 0x00 (0374ms, 1110ms total)
-- MA0 is in flash -- Unmirror addr 0x00000000 >0xFB0 JTAG> returns 0x04 (5548ms, 17483ms total)
T0FBC 028:278 JLINKARM_WriteU16(0x00000134, 0xE7FE) -- Unmirror addr 0x00000134 >0x170 JTAG> returns 0x00 (0375ms, 23031ms total)
T0FBC 028:659 JLINKARM_EndDownload() (0000ms, 23406ms total)
T0FBC 028:659 JLINKARM_ReadMemU32(0x00000000, 0x004D Items, ...) -- Unmirror addr 0x00000000 >0x1040 JTAG> -- Updating C cache (320 bytes @ 0x08000000) -- Read from C cache (308 bytes @ 0x08000000) -- Data: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ... returns 0x4D (4209ms, 23406ms total)
T0FBC 032:869 JLINKARM_ReadMemU16(0x00000134, 0x0001 Items, ...) -- Unmirror addr 0x00000134 -- Read from C cache (2 bytes @ 0x08000134) -- Data: FF FF returns 0x01 (0001ms, 27615ms total)
T0FBC 034:987 JLINKARM_ReadMemU32(0x00000000, 0x0001 Items, ...) -- Unmirror addr 0x00000000 -- Read from C cache (4 bytes @ 0x08000000) -- Data: FF FF FF FF returns 0x01 (0001ms, 27616ms total)
T0FBC 034:988 JLINKARM_ReadMemU32(0x00000004, 0x0001 Items, ...) -- Unmirror addr 0x00000004 -- Read from C cache (4 bytes @ 0x08000004) -- Data: FF FF FF FF returns 0x01 (0000ms, 27617ms total)
T0FBC 037:244 JLINKARM_ResetPullsRESET(OFF) (0000ms, 27617ms total)
T0FBC 037:244 JLINKARM_Reset() >0x2F8 JTAG>TotalIRLen = 9, IRPrint = 0x0011 >0x30 JTAG> >0x210 JTAG> >0x38 JTAG> >0xF0 JTAG> >0x80 JTAG> >0x230 JTAG> >0x200 JTAG> >0xE0 JTAG> >0xE0 JTAG>Found Cortex-M3 r1p1, Little endian. >0x80 JTAG> >0x170 JTAG> >0xE0 JTAG> >0xE0 JTAG>TPIU fitted. >0xE0 JTAG> >0xE0 JTAG> FPUnit: 6 code (BP) slots and 2 literal slots >0xE0 JTAG> >0x180 JTAG> >0x170 JTAG> >0xE0 JTAG> >0xE0 JTAG> >0x170 JTAG> >0x170 JTAG> >0xE0 JTAG> >0xEF8 JTAG> >0x110 JTAG> >0xE0 JTAG>
(11547ms, 27617ms total)
T0FBC 048:792 JLINKARM_ReadReg(R15) returns 0xFFFFFFFE (0001ms, 39164ms total)
T0FBC 048:793 JLINKARM_ReadReg(MSP) returns 0xFFFFFFFC (0000ms, 39165ms total)
T0FBC 048:793 JLINKARM_ReadReg(PSP) returns 0xE6FED1A0 (0000ms, 39165ms total)
T0FBC 048:793 JLINKARM_ReadReg(CFBP) returns 0x00000000 (0000ms, 39165ms total)
T0FBC 048:793 JLINKARM_IsHalted() >0xE0 JTAG> returns TRUE (0230ms, 39165ms total)
T0FBC 049:024 JLINKARM_ReadMemU32(0xE000EDFC, 0x0001 Items, ...) >0x170 JTAG> -- Data: 00 00 00 00 returns 0x01 (0374ms, 39165ms total)
T0FBC 049:398 JLINKARM_WriteMem(0xE000EDFC, 0x0004 Bytes, ...) -- Data: 00 00 00 01 >0x170 JTAG> -- Invalidate MA0 status returns 0x04 (0374ms, 39539ms total)
T0FBC 049:824 JLINKARM_ReadReg(R15) returns 0xFFFFFFFE (0001ms, 39913ms total)
T0FBC 049:825 JLINKARM_ReadMemU16(0x00000040, 0x0001 Items, ...)
JLINKARM_ReadMemHW(0x00000000, 0x0004 Bytes, ...) >0x170 JTAG> -- Data: FF FF FF FF returns 0x00 (0374ms, 0000ms total)
JLINKARM_ReadMemHW(0x08000000, 0x0004 Bytes, ...) >0x170 JTAG> -- Data: FF FF FF FF returns 0x00 (0374ms, 0374ms total)
JLINKARM_WriteMemHW(0x00000000, 0x0004 Bytes, ...) -- Data: 00 00 01 00 >0x170 JTAG> returns 0xFFFFFFFF (0374ms, 0748ms total)
JLINKARM_ReadMemHW(0x00000000, 0x0004 Bytes, ...) >0x170 JTAG> -- Data: FF FF FF FF returns 0x00 (0375ms, 1122ms total)
-- MA0 is in flash -- Unmirror addr 0x00000040 >0x440 JTAG> -- Updating C cache (64 bytes @ 0x08000040) -- Read from C cache (2 bytes @ 0x08000040) -- Data: FF FF returns 0x01 (2600ms, 39914ms total)
T0FBC 052:426 JLINKARM_SetBPEx(Addr = 0x00000040, Type = 0xFFFFFFF2) -- Unmirror addr 0x00000040 returns 0x00000001 (0001ms, 42514ms total)
T0FBC 052:427 JLINKARM_BeginDownload(Flags = 0x01) (0000ms, 42515ms total)
T0FBC 052:427 JLINKARM_WriteMem(0x20000000, 0x0400 Bytes, ...) -- Data: CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD ... >0x3140 JTAG>
***** Error: Could not transfer JTAG data. returns 0xFFFFFFFF (5011ms, 42515ms total)


IAR seems to freeze everytime I try to program the chip.

Any help would be highly appreciated.

Thank You,
A very frustrated EE intern.
Please feel free to email me at george[dot]melcer[at]liquidr[dot]com

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

2

Monday, August 17th 2009, 3:37pm

Hello AppleIntern00,

I have checked this with the following testing environment:
IAR EWARM V5.40a
J-Link DLL V4.08f
J-Link HW Version: V5.4
IAR sample project: arm\examples\ST\STM32F10x\STM32-Eval\STM3210E-EVAL_Demo\Demo\project\EWARMv5
Eval Board: ST MB672 (STM32F103ZET6)

And it seems to work fine.

What seems a little bit confusing in the log you postet, is that line:
T0FBC 000:144 JLINKARM_SetSpeed(1) (0000ms, 0141ms total)
Is it correct that you are working with 1 kHz JTAG speed?

Communication in general seems to work since JLink.exe is able to identify the core and is able to connect to it.
If you are using a macro file could you please check if there might be some initialization which could cause problems (wrong PLL init etc.)?

Best regards
Alex