Bootloader won't work on my board(It's working now)

For people running FreeEMS to discuss it and ask any questions about using and adjusting it.
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: Bootloader won't work on my board

Post 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?
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: Bootloader won't work on my board

Post 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
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Bootloader won't work on my board

Post by SleepyKeys »

Where did you get the chip?
You snooze, you lose!
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: Bootloader won't work on my board

Post 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
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: Bootloader won't work on my board

Post by HotCat »

found AN3275.pdf and AN3275SW.zip, I'll try to compile it with codewarrior, hope I can address this issue
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Bootloader won't work on my board

Post by SleepyKeys »

Why dont you use the STD serial monitor?
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Bootloader won't work on my board

Post 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.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: Bootloader won't work on my board

Post 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
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Bootloader won't work on my board

Post 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.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
HotCat
LQFP112 - Up with the play
Posts: 110
Joined: Wed Apr 13, 2011 2:35 am

Re: Bootloader won't work on my board

Post 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
Post Reply