FreeMASTER variable loses scope

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

FreeMASTER variable loses scope

Jump to solution
1,191 Views
jrs1986
Contributor II

Hello again,

 

currently, I am trying to use freemaster for debugging. I includes the PE Freemaster module into my project and I was able to open to communication path to freemaster and read global variables.

my code is pretty easy at the moment. something like:

 

static uint8_t FRMTR1; /*lint -save  -e970 Disable MISRA rule (6.3) checking. */ int main(void) /*lint -restore Enable MISRA rule (6.3) checking. */ {   /* Write your local variable definition here */     uint8_t state=0;   /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/   PE_low_level_init();   /*** End of Processor Expert internal initialization.                    ***/    /* Write your code here */   WAIT1_Waitms(200);   LED1_Neg();   FRMTR1=0;    for(;;){       WAIT1_Waitms(200);       FRMTR1=!FRMTR1;       FMSTR1_Poll();       FMSTR1_Recorder();      } }

 

So generally very easy. In FreeMASTER I generated a Subblock which is watching FRMTR1 and a Scope to graph the behaviour. The scope is configured to be a line graph...

What bothers me is, that the variable does not have a constant toggling value but seems to loose its scope in between. I made a gif to show that, hopefully that will play here:

71273_71273.gifFreeMASTER.gif

 

the according scope consequently looks like

 

71274_71274.PNGFreeMASTER.PNG

 

I already tried to increase the sampling rate in FreeMASTER to maximum but it didn't chance anything.

 

I am using the TWR-K60F120M and FreeMASTER is configured over the OSJTAG USB serial bridge.

 

Thanks for any answer,

best regards,

Jan

Labels (1)
Tags (2)
0 Kudos
1 Solution
661 Views
jrs1986
Contributor II

I have solved the Problem

I realized that FreeMASTER showed errors in the scope:

ERROR code=0x80000081

ERROR code=0x80000101

unfortunately, I didn't find any translation of these codes. The second one means response timeout, I think. I couldn't explain the errors, but there obviously a problem with my connection.

Till then I used direct RS232 over the OSJTAG Port. So just as a guess, I changed that to the FreeMASTER BDM Communication Plug-in and miraculously everything worked like a charm. No errors anymore and the variable is continuous. :smileyhappy:

View solution in original post

0 Kudos
2 Replies
661 Views
EmilioBrivio
Contributor III

Dear Jan,

I think that you call FMSTR_poll slower according the uart setting you select.

If you try to slow down the setting of the uart you will solve the issue.

If your main loop there are too many call you'll need to call FMSTR_Isr and put in a interrupt.

Always pay attention at the speed you seclect for the uart. ( call period = 1 char at uart speed ) .

 Ciao,

0 Kudos
662 Views
jrs1986
Contributor II

I have solved the Problem

I realized that FreeMASTER showed errors in the scope:

ERROR code=0x80000081

ERROR code=0x80000101

unfortunately, I didn't find any translation of these codes. The second one means response timeout, I think. I couldn't explain the errors, but there obviously a problem with my connection.

Till then I used direct RS232 over the OSJTAG Port. So just as a guess, I changed that to the FreeMASTER BDM Communication Plug-in and miraculously everything worked like a charm. No errors anymore and the variable is continuous. :smileyhappy:

0 Kudos