EmbDev.net

Forum: µC & Digital Electronics Starting From Flash


von Rodi07 (Guest)


Rate this post
useful
not useful
hello,

i´m working with SAM7-EX256 Board "at91sam7x256", and ARM-USB-TINY-H.
I will start my program from the flash. If i load the program to the 
flash i get this message:

-----------------------------------------------------------------------
Open On-Chip Debugger 0.4.0 (2010-11-23-14:20)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.berlios.de/doc/doxygen/bugs.html
srst_only srst_pulls_trst srst_gates_jtag srst_open_drain
1000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 kHz
Info : JTAG tap: sam7x256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, 
part: 0xf0f0, ver: 0x3)
Info : Embedded ICE version 1
Info : sam7x256.cpu: hardware has 2 breakpoint/watchpoint units
Info : JTAG tap: sam7x256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, 
part: 0xf0f0, ver: 0x3)
Warn : srst pulls trst - can not reset into halted mode. Issuing halt 
after reset.
target state: halted
target halted in ARM state due to debug-request, current mode: 
Supervisor
cpsr: 0x20000093 pc: 0x000000a0
Warn : NOTE! DCC downloads have not been enabled, defaulting to slow 
memory writes. Type 'help dcc'.
Warn : NOTE! Severe performance degradation without fast memory access 
enabled. Type 'help fast'.
dcc downloads are enabled
background polling: on
TAP: sam7x256.cpu (enabled)
target state: halted
target halted in ARM state due to debug-request, current mode: 
Supervisor
cpsr: 0x20000093 pc: 0x000000a0
flash 'at91sam7' found at 0x00100000
auto erase enabled
auto unlock enabled
wrote 16384 bytes from file at91sam7x_getting_started_flash.bin in 
3.625000s (4.414 kb/s)
Info : JTAG tap: sam7x256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787, 
part: 0xf0f0, ver: 0x3)
Warn : NOTE! Severe performance degradation without fast memory access 
enabled. Type 'help fast'.
shutdown command invoked

-----------------------------------------------------------------------

but i can not start it.

any idea?
Rodi07

: Moved by Admin
von guest (Guest)


Rate this post
useful
not useful
Have you tried the reset command in openocd or the reset button of your 
target board?

guest

von Rodi07 (Guest)


Rate this post
useful
not useful
yes in my board

von guest (Guest)


Rate this post
useful
not useful
Can you post your elf-file? Maybe something is linked wrong.

von Rodi07 (Guest)


Attached files:

Rate this post
useful
not useful
I can do that no problem, but I load my bin file into the Flash.

von guest (Guest)


Rate this post
useful
not useful
The entry point is ok. The code starts from 0x00100000.
How do you flash die bin-file?

von Günther (Guest)


Rate this post
useful
not useful
> 0x3f0f0f0f

check your TDO signal. Then TCK.

von Rodi07 (Guest)


Rate this post
useful
not useful
@ Günther:

my TCK from SPI1 is of high: 2.9V und my MOSI of 0V, MISO 2.9V

@guest: with this function in my cfg-file.

#-------------------------------------------------------------
proc program_device () {
  #halt the processor
  halt
  wait_halt

  #write file to flash memory
  arm7_9 dcc_downloads enable
  sleep 10
  poll
  flash probe 0
  flash write_image erase unlock "at91sam7x_getting_started_flash.bin" 
0x00100000
  sleep 10

  #start execution of the program just downloaded
  reset run
  sleep 10

  #exit OpenOCD
  shutdown
}
#-------------------------------------------------------------

$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 
-work-area-backup 0

#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> 
<target_number> [<target_name> <banks> <sectors_per_bank> 
<pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
set _FLASHNAME $_CHIPNAME.flash

flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432


init
reset init
at91sam7 gpnvm 0 2 set
program_device ()


# For more information about the configuration files, take a look at:
# openocd.texi



Thanks
rodi

von Günther (Guest)


Rate this post
useful
not useful
hard to tell whats happening, but this line describes the problem:

Info : JTAG tap: sam7x256.cpu tap/device found: 0x3f0f0f0f (mfg: 0x787,
part: 0xf0f0, ver: 0x3)


So on JTAG the programmer determines an IDCODE of 3F0F0F0F, which is
00111111000011110000111100001111 (mfg, part and ver are partial bit 
sequences).

This is what the device returns on TDO when clocked via TCK. The right 
IDCODE is part of the datasheet. I assume it does not look like 3F0F...

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.