SCI won't run without Multilink?

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

SCI won't run without Multilink?

3,449 Views
irob
Contributor V
Hey gang, I continue to have fun with the SCI UART.  My RS232 code is actually coming along nicely.  But the latest realization is that I seem to need my USB Multilink programmer attached to my target in order for the UART to work.  Nothing seems to spit out of the TX pin unless the programmer is attached via the BDM 6-pin header.  Darnedest thing.

I have the following code in my source for setting the trim:

Code:
volatile Byte NV_FTRIM_INIT @0x0000FFAE;volatile Byte NV_ICSTRM_INIT @0x0000FFAF; // instantiate the nonvolatile ICS Trim Registerif (NV_ICSTRM_INIT != 0xFF){  ICSTRM = NV_ICSTRM_INIT;  // load trim value if location not blank}

And of course I am using the PT command in the P&E programming software to program the trim values in FFAE:FFAF.

Any ideas why the programmer must be present?  My guess is that it must be doing something special to the BKGD or Reset lines that my target is not.  My target pulls both of these up to 3.3V through a 3.3K resistor.

Labels (1)
0 Kudos
11 Replies

693 Views
peg
Senior Contributor IV
Hi rob,

Do you just need the USBBDM connected or connected and debugger running?
Perhaps the debugger is reading registers that your code should be (making it work).
An connected but not running BDM should not affect the operation of the device.

0 Kudos

693 Views
JMB
Contributor I
Hi Peg,

I bought a 13213-DSK Kit Development without the multilink cable. Just I want to know if I can program the 13213-SRB target with the USB cable which come with the Kit or I have to buy the BDR multilink cable neccesarly.

Thanks
0 Kudos

693 Views
lineage
Contributor III
Hi JMB,

The answer is maybe and maybe.

It depends what software is loaded on your board. If it has a serial bootloader, or the OTAP (over the air programming) capability, then that may let you program it. However, I didn't manage to find the docs for how to do that so I went a different route.

My problem was I do all my development under Linux and the guys that make the Multilink charge a bucket (more than the dev kits cost) for a library of bits that you could maybe make a tool from if you had the time.

What I did was loaded the AN2295 bootloader which will allow programming over serial/USB. But I had a multilink and borrowed a MS-win machine just to program it the first time. Your problem is to work out whether there is a loader already there or if not get someone to load one. Once thats done, you don't need Multilink.

AN2295 comes with instructions and code. Excellent piece or work. Seems really robust too.

Cheers

0 Kudos

693 Views
JimDon
Senior Contributor III

When CW is ported to Eclipse, it may work on Linux.

0 Kudos

693 Views
peg
Senior Contributor IV
Hello and welcome,
Don't know this hardware.
Presumably if it comes with a USB cable thrn it has a built in BDM adapter.
Surely the glossy brochure for it tells you it has a built in BDM or you need one?

0 Kudos

693 Views
JimDon
Senior Contributor III
says right on the page:

Note:
  Requires an HCS08 BDM Multilink Programmer for debug and program capability

I belive the usb is a usb serial port.

They offer two versions - one with the BDM and one without. The good news is the 100.00 price difference is what  USB MultiLink costs, so now you can just buy one.

0 Kudos

693 Views
irob
Contributor V
No, the debugger does not have to be running.  The trim registers do need to be written by the P&E programmer, or the baud will be off.

It's the oddest thing.  The USB BDM programmer just simply needs to be connected to my BDM header.  It also has to be plugged into the USB port.  Weird, huh?
0 Kudos

693 Views
lineage
Contributor III
http://forums.freescale.com/../view_profile?user.id=662" rel="nofollow" target="topHi,
I presume you have checked the obvious things, like the RS232 connection has a ground? Plugging in the multilink will probably provide a ground reference between the PC and target.

Cheers

http://forums.freescale.com/../view_profile?user.id=662" rel="nofollow" target="top
0 Kudos

693 Views
irob
Contributor V
 lineage, I think you win the grand prize!  What I didn't include above was my RS-232 sections.  Check it out.

Sure enough, I made a very big mistake and forgot the ground pin on the DB-9 connector.  Just a plain oversight.
0 Kudos

693 Views
JimDon
Senior Contributor III
Are you still using the DEMO9S08QG8 ?

When the BDM/USB port is not plugged in what powers the board?

0 Kudos

693 Views
irob
Contributor V
JimDon, no I am now using my target board.  To program and test my targets (which have very small pitch connectors), I use a programming fixture board which has the BDM connector, power input, test buttons, etc.

I've attached a schematic page of this fixture board to show how it's set up.

The upper left corner is a 3.3V regulator.  I have found that my Rev B Cyclone requires the VCC pin in order to work properly.  Hence, in the lower left corner, the switch must be turned to the Cyclone Program option.

The upper right corner is power in to the fixture which powers my target as well.  The lower left corner is a reset circuit which I devised to help condition the BKGD pin when using a USB Multilink and attempting to program blank MC9S08QGx parts. It's a known situation, talked about at length here on the forums.  The switch in my ciruit is a failsafe, allowing me to manually hold BKGD low during power up just in case.  For what it's worth, I have found that I need this reset BKGD circuit only 5% of the time.  For production programming, I have jumper JP1 set to inactive state.

As I said before, my target has pullups on the RST and BKGD pins.
0 Kudos