Hello,
I've question relates flash programming for LM3S9B96 (rev. C5XD). Let me explain step-by-step:
Result: I can program the chip only one time for LM Flasher or one or two times for OpenOCD. I don't unplug JTAG and power in both case. I could unlock device via LM Flasher but you could understand this is very difficult to debug and test
Could you please help me how to burn flash correctly?
Some additional information:
Best regards,
Alexander
Hi Alexander,
This sort of issue is usually due to something in the user code that interfers with subsequent programming operations. Examples include incorrect clock settings, selecting a clock source that does not exist, and reconfiguring GPIO that are required for the JTAG interface. Please review your code for any of these conditions.
Can you program and re-program the blinky binary (unmodified) that comes with StellarisWare?
Please report the error message provided by the programming tools. That might provide additional clues.
Jonathan Guy
Hi Jonathan,
Let me add more information about issue.
The JTAG pins connected to JTAG pins only (directly to MCU)!
Yes, I've been tried "blinky" (pre-built by keil). The same bad result.
A couple of questions:
When the programming is successful (the first time), does the application run correctly and are you able to see the LED flashing?
Does the application still run correctly after you attempt to re-program your target board?
I've done some experiments. Summarize:
So, I've troubles with PLL initialization. I'll try to check (solid another one) crystal and post result.
Best regards,Alexander
Here is the update fore previous post.
I solid another one crystal (but 8Mhz instead of 16MHz) and it works! I try to solid another 16MHz when I'll find it.
However I've a few questions relates this topic.
#----
source [find interface/luminary.cfg]set WORKAREASIZE 0x4000set CHIPNAME lm3s9b9xsource [find target/stellaris.cfg]proc program_device () { # halt the processor halt #wait_halt # write file to flash memory cortex_m3 maskisr on flash write_image erase "./gcc/pnp_eth_can.bin" 0 verify_image "./gcc/pnp_eth_can.bin" cortex_m3 maskisr off sleep 10 #start execution of the program just downladed reset run sleep 10 #exit OpenOCD shutdown}initreset initprogram_device ()
The errors look like:
Error: checksum mismatch - attempting binary comparediff 0 address 0x00000001. Was 0x08 instead of 0x01diff 1 address 0x00000004. Was 0x4d instead of 0xe1.....
Could you please help me how to modify script to verify image?
Alexander Chuikov Why broken crystal can block firmware update and "hardware reset" via JTAG?
When your code runs, it's selecting and configuring the clock circuit. If the clock is broken (a static level, or very wrong frequency) the MCU will not function until a power on reset. The user code runs quickly before the programming tool can intercept the clock configuration.
I'm not familiar with OpenOCD, but I will ask others here about your script question.
Thank you for detailed explanation. I'll wait instructions for OpenOCD.
Alexander,
I checked with one of our regular openOCD user's and he provided the following information.
The only additional config items I have in mine are:
jtag_khz 3000
jtag_nsrst_delay 100
reset_config srst_only
These would go into his script after the second "source" line. The "jtag_khz" probably needs to be lower in order to meet our TCLK <=SYSCLK/8 requirement. Going really slow (like 500) is probably a really good idea in order to just get things working...then bump up the speed to SYSCLK/8 (if it stops working, you know that it is a speed issue and not a connection issue).
The OpenOCD user mailing list is an excellent resource for assistance with OpenOCD:
http://openocd.sourceforge.net/discussion/mailing-lists/
Thank you very much!