How can I fix the error??

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can I fix the error??

796件の閲覧回数
angeloavila
Contributor I

Good day everyone, i have encountered a problem that everytime that the program has been debugged into the P&E multilink cyclone pro 3 dialog box would pop up consecutively. first is about HI-WAVE telling that "communications with the target failed: the target MCU has no clock or wrong BDM clock speed is used or derivative is secured." the second one would be "error while loading diagnostics algorithm to target system. The chip may be secured, or the derivative selected may be wrong" and lastly s "this operation has been canceled." this happened after I added the following to my codes:

 

RAMSTART: EQU $1000

FLASHSTART: EQU $C000

StackPointer: EQU $1F00

 

i took it from http://www.freescale.com/files/CodeWarriorIDEDemo.pdf slide 14 of 28

 

I am trying to program the PWM of a HCS12 32bit microcontroller with NI elvis II instruction set. though i found a program wherein it uses it on a Dragon 12 plus trainer board. the programs is

 

ABSENTRY Entry        ; for absolute assembly: mark this as application entry point

   

; Include derivative-specific definitions

  INCLUDE 'mc9s12dp256.inc'     ;CPU used by Dragon12+ board

 

;code section

        ORG   $4000     ;Flash ROM address for Dragon12+

Entry:

       LDS     #$4000    ;Stack

      

        MOVB #$04, PWMPRCLK ;ClockA=Fbus/2**4=24MHz/16=1.5MHz

       MOVB #125, PWMSCLA ;ClockSA=1.5MHz/2x125=1.5Mhz/250=6000Hz

       MOVB #$10, PWMCLK   ;Use clockSA for chan 4 PWM

       MOVB #$10,PWMPOL ;High then low for polarity

       MOVB #$0,PWMCAE   ;Left aligned

       MOVB #$0, PWMCTL   ;8-bit chan,PWM during feeze and wait

       MOVB #100, PWMPER4 ;PWM_Freq=ClockSA/100=6000Hz/100=60 Hz. CHANGE THIS 

       MOVB #50, PWMDTY4 ;50% duty cycle   AND THIS TO SEE THE EFFECT ON SERVO MOTOR (TRY LESS THAN 10%)

       MOVB #0,PWMCNT4   ;Start the counter with zero (optional)

       BSET PWME,%00010000  ;Enable chan 4 PWM

       BRA $

                   

;**************************************************************

;*                 Interrupt Vectors                          *

;**************************************************************

            ORG   $FFEE

            DC.W  Entry     ;Reset Vector. CPU wakes here and it is sent to start of the code at $4000

 

the program came from a modified example from Mazidi and Causey HCS12 book.

 

i placed the code i took after " INCLUDE 'mc9s12dp256.inc' " part

 

i want to fix things. im at fault due to i was not able to notice that the program i added is for MC9S12DG128B derivative and we are supposed to use a different one(sorry i forgot) but i want to fix it so please i need help.

ラベル(1)
タグ(1)
0 件の賞賛
1 返信

533件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi Angelo,

Before to try with a specific example/project I recommend you to check with a project delivered on the tool installation.

With the Project Wizard you can create exactly an example dedicated to your hardware configuration PC + Interface + board.

This is the best way to determine if your hardware configuration is running.

If this default project is not running, it will not work with another project.

It's important to solve the "connection" problem with this project before to check another one.

Can you try with a demo project ?


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛