1321xNSK-Network Starter Kit

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

1321xNSK-Network Starter Kit

2,034 Views
SrinathBharadwa
Contributor II

Hi,

Sometime back I bought Freescale 1321xNSK-Network Starter Kit. I am unable to download the code to the micocontroller. I am getting "Error: Cannot enter background mode"

This is the hardware and software Details:
1. CodeWarrior - Version 5.1
2. P&E USB Multilink BDM - Firmware Ver 5.79
3. CPU - MC9S08GB60
4. Micro - 8 bit HCS08 - 13213

 

My mail id is srinath.bharadwaj@gmail.com

 

I have attached a error screen shot too.

 

 

This is the log in the command window:

executing C_layout.hwl

!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,TOPPC 0xF88C
!OPEN procedure 0 39 60 17
!Procedure < attributes VALUES on,TYPES off
!OPEN register 60 31 40 25
!Register < attributes FORMAT AUTO,COMPLEMENT None
!OPEN memory 60 56 40 22
!Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,ADDRESS 0x80
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16
!OPEN data 0 78 60 22
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory 
done C_layout.hwl

Loading Target ...
Windows NT detected.
USB HCS08/HCS12 MULTILINK detected - Flash Version 5.79
Frequency change to ~0hz.
USB HCS08/HCS12 MULTILINK detected - Flash Version 5.79
Frequency change to ~0hz.
Frequency change to ~0hz.
Frequency change to ~0hz.

Error: Can not enter background mode.

Frequency change to ~0hz.
USB HCS08/HCS12 MULTILINK detected - Flash Version 5.79
Device is 9S08GB60.
Mode is In-Circuit Debug.

IO registers loaded for MC9S08GB60 from C:\Program Files\Freescale\CodeWarrior for HC08 V5.1\prog\REG\MCU1005.REG
Error: The debugger is currently not able to run
due to loss of contact with hardware.
No Link To Target

in>

 

Error1.jpg

Message Edited by t.dowe on 2009-10-27 11:50 AM
Labels (1)
7 Replies

697 Views
Mads
Contributor V

Hi Srinathbharadwaj,

 

This is a typical error if the connector is not plugged in correct to a board, or the board is not powered on. Please check that the red wire is connected to the side of the plug that got a small dot.

 

Also validate that the board is turned on, e.g. plug in the USB plug.

 

Also our software require Codewarrior 6.1 please make sure you have the latest version installed.

 

BR,

Mads

0 Kudos

697 Views
SrinathBharadwa
Contributor II

Hi Mads,

Thanks for the reply.

 

Both blue and yellow leds are on. So, I guess connection is good. In fact, i connected an oscilloscope to check whether power is coming to micro and I was able to see some voltage at the Vcc of micro.

 

Since the board uses HCS08, i am using CW version 5.1. You have suggested me to use version 6.1. So I will check this and will get back to you. I will let you know the status of this.

 

 Regards,

 Srinath Bharadwaj

0 Kudos

697 Views
SrinathBharadwa
Contributor II

Hi,

 

Sadly my starter kit is still not working. I am still not able to download the code to the micro. I am just testing whether I can download the program or not. And this is my code. It has just main function.

 

void main(void) {

  EnableInterrupts; /* enable interrupts */
  /* include your code here */

 

  for(;:smileywink: {
    __RESET_WATCHDOG(); /* feeds the dog */
  } /* loop forever */
  /* please make sure that you never leave main */
}

 

 

This code is nothing but auto generated by code warrior itself. I am trying to download this into micro. Out of 'n' no. of times i have tried, i have able to download the code only once. And that was the very first time i flashed. After that it is not happening at all.

 

Is there is something wrong with the code itself? Is there any way to erase the memory without downlaoding the code?

 

Regards,

Srinath Bharadwaj

 

0 Kudos

697 Views
Mads
Contributor V

Please download the BeeKit from www.freescale.com/802154

 

This allows you to generate a working project using 802.15.4, SMAC, ZigBee and other protocols.

It will make sure your project gets the correct initialization code.

 

br,

Mads

 

0 Kudos

697 Views
SrinathBharadwa
Contributor II

Thanks Mads for the reply.

 

I did try with the code from BeeKit too. I am still not able to download the code and I am still getting the same error.

 

I am suspecting whether this is something to do with secure and unsecure feature of micro. Is there any way to unsecure a HCS08 micro? Is there any utility available for unsecuring HCS08?

 

The reason for my doubt is in the memory window all the address locations have "--" instead of data. And also it is not allowing to execute any read or write operations.

 

Thanks,

Srinath Bhaskaran

0 Kudos

697 Views
Mads
Contributor V

Hi,

 

It sounds like you either have a bad board or a bad debugger.

Please try contact the sales rep. where you bought your kit.

 

BR,

Mads

0 Kudos

697 Views
SrinathBharadwa
Contributor II

Thanks for the reply again.

 

Debugger is good becuase it is working fine with other targets, to be specific, 16 bit target boards. It is not working on my 1321xNSK boards.

 

I have three boards and i am getting the same error on all the boards.

 

I got below reply from freescale tech. support.

 

-------------------------------------------------------------------------------------------------

 

First of all, please make sure that the Board's power on/off switch is set in the ON position.

       "The S08GB has several functions per pin; this is the case of the BKGD pin used to program/debug the device. This pin is multiplexed between the Background mode functionality, the timer and the General Purpose I/O. If the Background pin is disabled, the only way to recover the programming/debugging functionality of the device is to make a Power-On Reset.  When working with new parts, the BKGD Pin is disabled; therefore the only way to have the MCU into active background mode is to make a Power-On Reset while having the BKGD pin with logic "0".

       Unfortunately this is the only way to bring the part into active background mode if the pin is disabled. Once they load their code into the MCU they are not disabling the BKGD pin and this is why they don’t need to power-cycle the device anymore.

       You just need to assert a Power on reset right before trying to load the code into the Board.

-------------------------------------------------------------------------------------------------

 

But i don't know how to do power on reset right before trying to load the code into the Board.

 

Regards,

Srinath Bhaskaran