Page 2 of 3

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 3:13 am
by HotCat
Fred wrote:2 things:

1) What type of serial do you have?
2) What state is your boot load jumper in?

Fred.
Fred, did you have the source code of this monitor?

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 7:38 am
by HotCat
Many be something is wrong with my GPIO pin, my chip was ripped off stuff, I decide to write a test firmware to prove it

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 7:54 am
by SleepyKeys
Where did you get the chip?

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 8:04 am
by HotCat
Sean0 wrote:Where did you get the chip?
From "Chinese ebay",taobao.com. Very cheap and seems OK, can BDM, can download code

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 11:06 am
by HotCat
found AN3275.pdf and AN3275SW.zip, I'll try to compile it with codewarrior, hope I can address this issue

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 4:20 pm
by SleepyKeys
Why dont you use the STD serial monitor?

Re: Bootloader won't work on my board

Posted: Fri Aug 10, 2012 6:13 pm
by Fred
HotCat wrote:I wrote a tiny program in codewarrior, it can send string to my PC. So I think the BDM works fine. I burn the bootloader by loading the S19 file directly. It seems fine and not error message. How can I prove it is OK? I am not understand your words "verify it by pulling it back off again?"
I mean to download the contents of the CPU either with a BDM or via comms from the serial monitor.
Sean0 wrote:Why dont you use the STD serial monitor?
Correction, please use the standard serial monitor, or there'll be no support from me or anyone else that wants my support, either.

It's the one stable thing that can be relied upon and trusted to be predictable and reliable. Use it as is.

download/file.php?id=1057

Please download this zip file and load the FreeEMS-0.2.0-SNAPSHOT-152-g06ec3f1-DEV-EvenTeeth-Both-3and1-RIP.s19 file to your CPU using your BDM.

Once you've done that, you can boot the device without the jumper and talk to the firmware. If you can't talk to the firmware, something is broken. That file is a complete BDM-only package to give you running code with SM included.

Fred.

Re: Bootloader won't work on my board

Posted: Sat Aug 11, 2012 10:48 am
by HotCat
Fred wrote: you can boot the device without the jumper and talk to the firmware. If you can't talk to the firmware, something is broken. That file is a complete BDM-only package to give you running code with SM included.
Fred.
I've load the s19, but my SCI program can't receive any message and I found the firmware was waiting something in a deed loop between address 0xFC96 and 0xFC9A, how can I prove it's working?
Image

but my test program works fine
Image

I should try the "stock" serial monitor, hope it works
Image

Re: Bootloader won't work on my board

Posted: Sat Aug 11, 2012 11:55 am
by Fred
The serial monitor checks the state of two pins at power up:

1) load/run pin/jumper
2) RX pin

Both must be in the correct state, or the firmware will never run.

The loop you're looking at is quite likely the SM looping trying to receive bytes. This would indicate that the state of one or both of your pins is wrong.

You never answered the question about your serial hardware. Is it a max232 chip? or an FT232RL chip? or what? not all function correctly with the SM.

Once you've verified the state of both pins and can watch the firmware looping doing its thing, you should put a logic analyser on the TX pin and watch for data there. This eliminates all variables. If firmware is running, you WILL get LOTS of data there. If it is not, you won't get anything as the SM will just be sitting listening.

Fred.

Re: Bootloader won't work on my board

Posted: Sat Aug 11, 2012 1:44 pm
by HotCat
Fred wrote: You never answered the question about your serial hardware. Is it a max232 chip? or an FT232RL chip? or what? not all function correctly with the SM.
It's a MAX232