AnsweredAssumed Answered

call rutines does not debugging

Question asked by kumar.ashok.002 on Dec 29, 2011
Latest reply on Dec 29, 2011 by John Flood

I am working on st visual develop version 4.2.1 patch 2 with Cosmic

CxSTM8 32K 4.3.6.

I am having a problem regarding debuging the program:

 

the program builds well but during execution program curser doesn't execute the called routine(Function called: i.e void port()   void

timer())

 

 

#include"stm8s103f2p.h"

main()

{

void port ();

void timer();

void clock();

 

while(1);

}

 

void port()

{

PC_DDR= PC_DDR|(1<<6);

PC_CR1=PC_CR1|(1<<6);

PC_CR2=PC_CR2|(1<<6);

}

//clock init

void clock(void)

{

CLK_ICKR=CLK_ICKR|(1<<0);

CLK_ICKR=CLK_ICKR|(1<<1);

CLK_CKDIVR =0x00;

CLK_PCKENR1 =0x00;

CLK_PCKENR2=0x00;

CLK_PCKENR1=CLK_PCKENR1|(1<<7);

}

// timer

void timer(void)

{

TIM1_EGR=0x03;

TIM1_CCMR1=0x70;

TIM1_CCER1=0x01;

TIM1_PSCRH=0x00;

TIM1_PSCRL=0x00;

TIM1_ARRH=0x01;

TIM1_ARRL=0x3f;

TIM1_CCR1H=0x00;

TIM1_CCR1L=0xA0;

TIM1_CR1=TIM1_CR1|(1<<0);

TIM1_CR1=TIM1_CR1|(1<<7);

TIM1_BKR=TIM1_BKR|(1<<7);

}

Outcomes