EmbDev.net

Forum: µC & Digital Electronics Starting From Flash


Author: Rodi07 (Guest)
Posted on:

Rate this post
0 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
Author: guest (Guest)
Posted on:

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

guest

Author: Rodi07 (Guest)
Posted on:

Rate this post
0 useful
not useful
yes in my board

Author: guest (Guest)
Posted on:

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

Author: Rodi07 (Guest)
Posted on:
Attached files:

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

Author: guest (Guest)
Posted on:

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

Author: Günther (Guest)
Posted on:

Rate this post
0 useful
not useful
> 0x3f0f0f0f

check your TDO signal. Then TCK.

Author: Rodi07 (Guest)
Posted on:

Rate this post
0 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

Author: Günther (Guest)
Posted on:

Rate this post
0 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...

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.