Capture Component Maximum Time - CW Bug?

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

Capture Component Maximum Time - CW Bug?

Jump to solution
698 Views
abhiembedded
Contributor I

Hi,

 

I am trying to use the Capture component in CodeWarrior. For the field "Maximum time of event", I do not understand why the value in the "Value" column is different to that in the "Details" column. Which value will be used in the code? I've put a screen shot below:

 

20862_20862.pngcw capture time.png

Labels (1)
0 Kudos
1 Solution
529 Views
TICS_Fiona
NXP Employee
NXP Employee

There is a problem with default settings of Allowed error in the timing dialog of the Maximum time event property. The default value of Allowed error is  5ms and therefore Processor Expert used the first value that fit the range 5.461333 +- 5ms. Therefore the value has been set to 2.731ms in the Details column. When you set Allowed error to 0.001 ms and select the 5.461333 ms in the Init. Value the same value will appear in the Details column in the Component Inspector, see the screenshot as below:

CT_Capture Timing Dialog - allowed error.png

Fiona Kuang

Technical Information & Commercial Support

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

View solution in original post

0 Kudos
4 Replies
529 Views
TICS_Fiona
NXP Employee
NXP Employee

To look into this issue, we need to know the CodeWarrior version, as well as the part number of your MCU. Thanks!

Fiona Kuang

Technical Information & Commercial Support

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos
529 Views
abhiembedded
Contributor I

Hi,

Some install information is below:

Processor Expert for MCU         

Version 10.6.0

Build: RT6_b1446-0504

- CodeWarrior for MCU

     Version: 10.6

     Build Id:140329

The MCU I am using is MKL25Z128VLK4 in LQFP 80-pin package.

It only seems to happend when selecting the 5.461333 ms option. My chip is setup with a core clock of 48 MHz and bus clock of 24 MHz.

:

0 Kudos
528 Views
TICS_Fiona
NXP Employee
NXP Employee

I reviewed the TMP initialization code generated by PE, and I think the value in "Details" column is the real maximum time of even used in code. When selecting the 5.461333 ms option in your project, the PS bit in TPMx_SC is configured into 0, see the code generated by PE as below:

TPM2_SC = (TPM_SC_CMOD(0x01) | TPM_SC_PS(0x00));

The modulo is initialized as 0xFFFF:

TPM2_MOD = TPM_MOD_MOD(0xFFFF);      /* Set up modulo register */

The maximum time of even should be: 65535/(24*10^6) s = 2.731ms

I have contacted PE dev. team for how to configure this option correctly, and reply you later.

Fiona Kuang

Technical Information & Commercial Support

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

530 Views
TICS_Fiona
NXP Employee
NXP Employee

There is a problem with default settings of Allowed error in the timing dialog of the Maximum time event property. The default value of Allowed error is  5ms and therefore Processor Expert used the first value that fit the range 5.461333 +- 5ms. Therefore the value has been set to 2.731ms in the Details column. When you set Allowed error to 0.001 ms and select the 5.461333 ms in the Init. Value the same value will appear in the Details column in the Component Inspector, see the screenshot as below:

CT_Capture Timing Dialog - allowed error.png

Fiona Kuang

Technical Information & Commercial Support

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos