CW 5.1 communication problem??

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

CW 5.1 communication problem??

4,384 Views
admin
Specialist II
Hi,
When I connect the P&E BDM module to CW5.1, in the ICD Connection Manager I am getting Port Undetected. Please see the pic
 
 
When I hit the Connect button it has no effect, I can not move on to the next stages as described in the BDM module manual.
 
To get exit the window I need to click on "Abort" and get into the Real-time debugger mode.
 
After the Set gdi command in the command window, it says target linked the red light on the BDM flashes.
 
What can I do to varify everything is working?

I am using a QG8 and would like to place values to port B to turn the pin on and off in real-time Command Window, since the port b is connect to some LEDs.

Can anyone suggest how I can do this?

Thank you.  
Labels (1)
Tags (1)
0 Kudos
Reply
10 Replies

1,073 Views
CompilerGuru
NXP Employee
NXP Employee
Does it work with CW 6.1? In another thread you were using the current version.
Also "set gdi" sets the target to gdi, but gdi is not used to connect to P&E.
So basically that command wont do any good when connecting to a P&E pod.

Also, and I'm really not sure in that, which connection do you use with CW 5.1?
Just ICD sounds like the version before the current NGS one.

When you create a new project with the wizard in CW 5.1 and connect, does it work? (and for 6.1?)

Daniel
0 Kudos
Reply

1,073 Views
admin
Specialist II
Hi Daniel,
I get this screen

http://img136.imageshack.us/img136/2096/cw2sl6.png

right after I hit debug of my test code in both CW5.1 and CW6.1, both says Port: Undetected.

So far, I have not being able to pass this stage in both CW5.1 and CW6.1 after tried both.

Does anyone know what is the cause of this Port :Undetected ??

The connection I am using is the P&E Multilink/Cyclone Pro, since the other options are

Full Chip Sim
HCS08 Serial Monitor
Softec HCS08






Message Edited by Learner on 2008-01-08 06:00 AM
0 Kudos
Reply

1,073 Views
J2MEJediMaster
Specialist I
It looks like a USB connection problem from here. When you plug the pod into the USB port, does the computer (assuming Win XP) go "ding-dong" to indicate that it recognized the USB device? Do any LEDs light up on the pod and stay on?

---Tom

0 Kudos
Reply

1,073 Views
admin
Specialist II
Hi Tom,
Yes, I am using XP.
There are 2 lights that comes on, one is green which stays on and one is red which flashes.

When I use the "reset" commands at the command window it seems to have some effect on the rate of flash on the red light, and displays some "random" clock rate like 17.84Mhz.

Could it be because of my code where I did not set up the ICS to the correct mode eg. FEI or FEL mode and the ENBDM bit in the BDCSCR register is not set?

This is my asm code

 ; Include derivative-specific definitions
            INCLUDE 'derivative.inc'
;
; export symbols
;
            XDEF _Startup
            ABSENTRY _Startup

;
; variable/data section
;


            ORG    RAMStart         ; Insert your data definition here
ZERO        equ   $3f                 ;7 segment LED
ONE         equ   $06
TWO         equ   $5b
THREE       equ   $4f
FOUR        equ   $66
FIVE        equ   $6d
SIX         equ   $7c
SEVEN       equ   $07
EIGHT       equ   $7f
NINE        equ   $67
DOT         equ   $80



ExampleVar: DS.B   1

;
; code section
;
            ORG    ROMStart

_Startup:

;_Initialize:

            LDHX   #RAMEnd+1          ; initialize the stack pointer
            TXS
            CLI                       ; enable interrupts
            
            lda   #%01000110          ; clock set up
            sta   ICSC1               ; FBI mode
            lda   #%00000000          ; CLKS bits = 01         
            sta   ICSC2               ; IREFS bit = 1.
            lda   #%00000000          ; BDM mode is active or LP bit = 0
            sta   ICSSC
            lda   #%11111111          ;set port B as output                    
            sta   PTBDD               

mainLoop:
            ; Insert your code here

                 
            lda   #ZERO         
            sta   PTBD               ;turn on 7 segment
            
            lda   #%00001111
           
again       deca  
            cmpa  #%0
            bne   again
            lda   #%00000000
            sta   PTBD
            

            feed_watchdog
            BRA    mainLoop

;**************************************************************
;* spurious - Spurious Interrupt Service Routine.             *
;*             (unwanted interrupt)                           *
;**************************************************************
spurious:                           ; placed here so that security value
            NOP                     ; does not change all the time.
            RTI

;**************************************************************
;*                 Interrupt Vectors                          *
;**************************************************************
            ORG   $FFFA

            DC.W  spurious          ;
            DC.W  spurious          ; SWI
            DC.W  _Startup          ; Reset



Message Edited by Learner on 2008-01-08 06:00 PM

Message Edited by Learner on 2008-01-08 06:00 PM
0 Kudos
Reply

1,073 Views
peg
Senior Contributor IV
Hi Learner,

What _exactly_ are you using for your BDM adapter here?

0 Kudos
Reply

1,073 Views
admin
Specialist II
Hi Peg,
The BDM I am using is from Univelop Tech LLC.
0 Kudos
Reply

1,073 Views
CompilerGuru
NXP Employee
NXP Employee
ok, then the first thing to note is that the P&E targets will only connect to P&E pods.
That your "Univelop Tech LLC" and some P&E devices use USB does not mean that the P&E target would connect to the "Univelop Tech LLC" pod.

So forget the P&E dialog you showed before. However in your first mail, you also mentioned
a "set gdi" command. I guess (I don't know this "Univelop Tech LLC" pod actually) that your pod is actually connecting using the gdi protocol. How this is supposed to be setup, check the documentation that came with your cable.

Could also be (just guessing here) that your pod has some relations to the TBDML cable, there is a special forum dedicated to the TBDM "Turbo BDM Light for S12(X)", maybe you find some answers in there too (not my area of expertise though, so I wont be able to help much further).

(Or to confuse much further when reading again my first reply....).

Well, good luck :smileyhappy:

Daniel
0 Kudos
Reply

1,073 Views
admin
Specialist II
Hi Daniel,
I have just learnt that the BDM I have is indeed a OSBDM based on Peg's clarification.

However, I do have a question which I think you would be able to help. That is, I have read from the data sheet of the QG8 and in the ICS Mode of Operation Section it mentions the source of BDC clock.

I would assmue that in order for the BDC to work with  the CW Real-Time-Debugger, I would need to select one of the mode to provide the clock source for the BDC and enable the ENBDM bit in the BDCSCR register in my asm ;_Initialize: routine?



0 Kudos
Reply

1,073 Views
peg
Senior Contributor IV
Hi,

The BDM will work with the power on default settings. So you don't have to initialise especially for it.
Although you do have to avoid disabling it deliberately.

0 Kudos
Reply

1,073 Views
peg
Senior Contributor IV
Hi,

I think it is safe to assume that this topic follows on in this thread.



0 Kudos
Reply