Thursday, May 24th 2018, 8:11am UTC+2

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.

Possessed

Beginner

Date of registration: Sep 14th 2010

Posts: 6

1

Tuesday, September 14th 2010, 3:28pm

[SOLVED]Problem of debugging TMS470 board using IAR J-link

Hi guys
I use IAR J link to program my TMS470 board, however, there are always following errors when debugging :( . Anyone can tell me what might be the reason resulting those errors and how can i solve them? Thanks a lot


Errors:

'Memory access timed out @ 0040FFE0 -> JTAG speed too high?
Unexpected CPU core mode : 13 (Expected 0x17, CPSR=000000D3), ReadMem: Words @ Addr 0x5F0'

Log file shows:

Tue Sep 14 15:20:02 2010: Loaded macro file: C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\Configuration_Files\B1M_Files\RAMTMS470R1B1M.mac
Tue Sep 14 15:20:02 2010: J-Link firmware: V1.20 (J-Link compiled Nov 09 2005 19:32:24 -- Update --)
Tue Sep 14 15:20:02 2010: JTAG speed is initially set to: 32 kHz
Tue Sep 14 15:20:03 2010: Halting CPU core
Tue Sep 14 15:20:03 2010: Initial reset was performed
Tue Sep 14 15:20:03 2010: J-Link found 1 JTAG device. ARM core Id: 3100E02F(ARM7)
Tue Sep 14 15:20:03 2010: Device at TAP0 selected
Tue Sep 14 15:20:03 2010: Executing memory setup macro B1M RAM
Tue Sep 14 15:23:49 2010: Error in C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\Configuration_Files\B1M_Files\RAMTMS470R1B1M.mac at line 61, col
18: Operation error.
Tue Sep 14 15:23:49 2010: Error while calling macro execUserPreload.
Tue Sep 14 15:23:49 2010: Auto JTAG speed: 2000 kHz
Tue Sep 14 15:23:49 2010: Target read failed at memory address 0x0000017C
Tue Sep 14 15:23:49 2010: Target inconsistency detected at memory address 0x0000017C
....

Tue Sep 14 15:23:49 2010: Target read failed at memory address 0x00000650
Tue Sep 14 15:23:49 2010: Target inconsistency detected at memory address 0x00000650
Tue Sep 14 15:23:50 2010: 1804 bytes downloaded and verified (4.91 Kbytes/sec)
Tue Sep 14 15:23:50 2010: There were warnings during download, see Log Window
Tue Sep 14 15:23:51 2010: Loaded debugee: C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\TMS470R1B1M\ADC_LCD_Demo\RAM\Exe\ADC_LCD.d79
Tue Sep 14 15:23:51 2010: Halting CPU core
Tue Sep 14 15:23:51 2010: Target reset
Tue Sep 14 15:23:51 2010: Executing memory setup macro B1M RAM
Tue Sep 14 15:25:02 2010: Driver does not support code coverage.

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

2

Wednesday, September 15th 2010, 9:04am

Hi,

it seems your macro file is not performed correctly after the reset has been performed:
Tue Sep 14 15:20:03 2010: Executing memory setup macro B1M RAM
Tue Sep 14 15:23:49 2010: Error in C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\Configuration_Files\B1M_Files\RAMTMS470R1B1M.mac at line 61, col
18: Operation error.
Tue Sep 14 15:23:49 2010: Error while calling macro execUserPreload.

So, there might be some commands in the macro file which have to be executed after reset but the macro file execution was aborted before this could happen.

Would it be possible to post your macro file content?


Best regards
Alex

Possessed

Beginner

Date of registration: Sep 14th 2010

Posts: 6

3

Wednesday, September 15th 2010, 10:26am

Thanks for your reply, Alex

Actually the EVB (TMS470 kickstart kit ) works well with the exactly the same setting, but not with my board, which has the same controller as EVB. Here is the code of macro file:



SetupRAM()
{
__message "Executing memory setup macro B1M RAM\n";

//__emulatorStatusCheckOnRead(1);

__emulatorStatusCheckOnRead(0);

// Disable reset at illegal address and access violation to
// avoid resetting the CPU when debugging.
__writeMemory32(0x00004007, 0xffffffe0, "Memory"); // SYSECR

/* activate Flash at 0x00000000 1M that is connected to memory select 0 */
__writeMemory32(0x000000b0, 0xfffffe04, "Memory"); // MFBALR0
__writeMemory32(0x00000040, 0xfffffe00, "Memory"); // MFBAHR0

/* activate Flash at 0x00000000 0k that is connected to memory select 1 */
__writeMemory32(0x00000000, 0xfffffe08, "Memory"); // MFBALR1
__writeMemory32(0x00000000, 0xfffffe0c, "Memory"); // MFBAHR1


/* activate RAM at 0x00000000 64k that is connected to memory select 2 */
__writeMemory32( 0x00000000, 0xfffffe10, "Memory" ) ; // MFBAHR2
__writeMemory32( 0x00000070, 0xfffffe14, "Memory" ) ; // MFBALR2 8K


/* activate RAM at 0x00000000 0k that is connected to memory select 3 */
__writeMemory32( 0x00000000, 0xfffffe18, "Memory" ) ; // MFBAHR3
__writeMemory32( 0x00000000, 0xfffffe1c, "Memory" ) ; // MFBALR3 0K


// HET RAM static memory control register, use 7 wait states and
// 32-bit access
__writeMemory32(0x00000072, 0xFFFFFD04, "Memory"); // SMCR1

// Map 1k HET RAM connected to memory select 4 at 0x00800000, size 2k
__writeMemory32(0x00000080, 0xfffffe20, "Memory"); // MFBAHR4
__writeMemory32(0x00000020, 0xfffffe24, "Memory"); // MFBALR4

// Trailing wait states controlled by TWS bits, use write buffer for
// expansion bus access
__writeMemory32(0x00000003, 0xFFFFFD2C, "Memory"); // WCR0

// Map 256k flash connected to memory select 0 at 0x00400000, size 2048k
// and activate new mapping by writing 1 to MFBALR0.8.
__writeMemory32(0x000000b0, 0xfffffe04, "Memory"); // MFBALR0
__writeMemory32(0x00000040, 0xfffffe00, "Memory"); // MFBAHR0
__writeMemory32(0x000001b0, 0xfffffe04, "Memory"); // MFBALR0

__writeMemory32(0x80000000, 0xfffff724, "Memory");
__readMemory32(0x0040ffe0, "Memory"); Error
__readMemory32(0x0040ffe4, "Memory");
__readMemory32(0x0040ffe8, "Memory");
__readMemory32(0x0040ffec, "Memory");

__emulatorStatusCheckOnRead(1);


__writeMemory32( 0x00000000, 0xffffffdc, "Memory" ) ; // GCR SYSCLK *8 and /4 = SYSCLK /1

// Setup clock ICLK = SYSCLK/16.
__writeMemory32(0x0000000b, 0xfffffd30, "Memory"); // PCR - set CLKDIV

}


execUserPreload()
{
SetupRAM();

}


execUserReset()
{
SetupRAM();
}



Thanks



Rui

This post has been edited 1 times, last edit by "Possessed" (Sep 15th 2010, 10:36am)


SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

4

Thursday, September 16th 2010, 10:30am

Hi Rui,

>>Actually the EVB (TMS470 kickstart kit ) works well with the exactly the same setting, but not with my board
Sounds like there is a difference between the eval board and your custom board which causes the macro file to fail.

Could you please check your custom board against the eval board regarding differences that might
have influence on the steps which are performed in the macro file


Best regards
Alex

Possessed

Beginner

Date of registration: Sep 14th 2010

Posts: 6

5

Thursday, September 16th 2010, 4:47pm

Thanks for your reply, Alex



I've checked the datasheet of the controller and the schematics of TMS470R1AXX EVB to compare with mine. It seems that everything is correct. Besides, power supply is ok too. Is it possible for you to tell me what might be the problems when those errors show up? I can further check my board if i have a direction. Perhaps the chip is broken, as the memory can not be read? Thanks in advance.



Rui

This post has been edited 1 times, last edit by "Possessed" (Sep 16th 2010, 4:54pm)


darkleo

Beginner

Date of registration: Mar 5th 2010

Posts: 2

6

Thursday, September 16th 2010, 10:24pm

Hi
Your problem in this line
__readMemory32(0x0040ffe0, "Memory");
__readMemory32(0x0040ffe4, "Memory");
__readMemory32(0x0040ffe8, "Memory");
__readMemory32(0x0040ffec, "Memory");

change this symblos "4" on "0" and you'll get full access to memory and flash

Possessed

Beginner

Date of registration: Sep 14th 2010

Posts: 6

7

Friday, September 17th 2010, 10:21am

Hi
Your problem in this line
__readMemory32(0x0040ffe0, "Memory");
__readMemory32(0x0040ffe4, "Memory");
__readMemory32(0x0040ffe8, "Memory");
__readMemory32(0x0040ffec, "Memory");

change this symblos "4" on "0" and you'll get full access to memory and flash

Thanks for your reply, darkleo

However, it still doesnt work after i change the numbers. Can anyone help me?? ?(

Possessed

Beginner

Date of registration: Sep 14th 2010

Posts: 6

8

Friday, September 17th 2010, 5:14pm

Finally solve the problem :D . The watchdog should be directly connect to the ground other than pull down to the ground by resistor. Thanks for all your advice. Have a nice weekend !

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,516

9

Friday, September 17th 2010, 7:12pm

Hi,

good to hear.
Have a nice weekend, too.

Best regards
Alex