Entering Run Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Entering Run Mode

9,381 Views
yodabam
Contributor I
Im working with an M68DEMO908GB60 board, and I don't know how to make it work on its own. I understand that the RESET vector needs to contain the starting address of the instruction to being executing from reset. But its not doing that. I can make the board work fine when I run it from the Debugger but I am unable to get to restart itself when the Power is turned off and then back on.

Am I missing something?? I really need this thing to work on its own and not with the computer, duh, but I can't seem to find the way to get this to happen properlly. If there something in the software that needs to be done in order to make this happen??? Need Help, Thanks
Labels (1)
0 Kudos
Reply
10 Replies

1,413 Views
rhinoceroshead
Contributor I
What about the COP?  Did you either disable it or reset its counter periodically?  And did you confirm that the reset vector got programmed by viewing its contents?
0 Kudos
Reply

1,413 Views
yodabam
Contributor I
The COP gets checked periodically, the Reset Vector contains the Address of the my starting FLASH code. But when I flip power on the board does nothing.
0 Kudos
Reply

1,413 Views
rhinoceroshead
Contributor I
Can you post some code?  If you can't, then you might try writing a very simple LED flasher program and see if you can get that to run without the BDM.  Or you can toggle a pin and look at it with an oscilloscope to see if it's really happening.  Disable the COP and disable interrupts.  This will at least determine whether the problem lies in your software or not.
0 Kudos
Reply

1,413 Views
rhinoceroshead
Contributor I
Oh - one other thing.  I'm not familiar with the demo board you are using, but it's possible that there may be a jumper you have to move in order for it to work in user mode.
0 Kudos
Reply

1,413 Views
yodabam
Contributor I
Yea Im trying to run a Simple LED flasher. I dont have a BDM technically. I am just programming the board with built in Serial Monitor. It will run fine when it is RUN from the debugger. But once the cable is detatched it will do nothing when Power is turned on
0 Kudos
Reply

1,413 Views
rhinoceroshead
Contributor I
Okay, here's a question for you.  If you leave the serial cable plugged in to your computer, does it still give you the same serial monitor prompt in your terminal window?  If so, this would be an indication that the microcontroller is not running your code and is still running the serial monitor software.  Although I've never used a serial bootloader before, I would imagine that the flash block protection keeps this segment of Flash intact so that you can keep programming the device over and over without erasing the bootloader.  So that would mean that the reset vector is not being overwritten, and that it is still running the bootloader code.  Do you have documentation for the demo board and serial monitor software you are using?  It's quite possible that there is another vector table that you should be writing to instead of the main one.  The serial monitor software would always run after reset and then the first thing it would do is look at the alternate vector table and if the reset vector is programmed there, then it would jump to your program and start running.
 
Everything I have said here is a guess.  I'll see if I can find specific documentation for the serial monitor on the demo board you are using...
0 Kudos
Reply

1,413 Views
yodabam
Contributor I
I see what you are saying

I ran the Program from the Debugger and then once it was started removed the Serial Cable from the Board. The program continued to operate fine so Its not running from the Serial cable and does operate on its own. Once I shut it off and turn it back on it doesnt do anything. Thanks for the ideas though this is helping me figure it out. I appreciate any help
0 Kudos
Reply

1,413 Views
rhinoceroshead
Contributor I
Okay, it looks like I was mostly right.  Here is a document that explains the serial debug software:
 
AN2140
 
 
It says that the reset vector you should be programming is located here:  FBFE:FBFF
 
I would try writing the address of the beginning of your program here and then try it again.
 
AN2140 also mentions that you can put a switch on PTA7 to force it into monitor mode even with the user vector programmed.  Is this switch populated on your demo board?
 
It also says that it will force itself into monitor mode if it detects a 0 on the Rx1 pin - indicating a non-idle state on the serial port.
 
Once you have your reset vector programmed, you need to use one of these methods to get back to the monitor mode so you can erase the device.

Message Edited by rhinoceroshead on 05-07-200603:11 PM

0 Kudos
Reply

1,413 Views
peg
Senior Contributor IV

Hi Yodabam,

I have the same demo board as you. Made by Axiom. Right?

I just used CW5 to put the serial monitor in with my USB-ML-12.

Then I made the CW5 Example under Device Init / Assembly Example / GB60_KBD_LedDemo and downloaded through serial monitor.

It all just works for me. Is this what you are doing? If not can you try this?

This is the demo where whichever button you press the matching LED lights up.

Regards Peg

 

Message Edited by peg on 05-08-200609:27 AM

0 Kudos
Reply

1,413 Views
yodabam
Contributor I
Hey Peg,

Yea Same Board as you,

Ill try running the DEMO's on board again. If they work ill try to look at how to make that work with my C code. Let me know if you see anything that I don't to make it work. Thanks
0 Kudos
Reply