Custom trim frequency with Target Task on Codewarrior

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

Custom trim frequency with Target Task on Codewarrior

Jump to solution
1,163 Views
ace
Contributor I

I have created a Target task in order to program MCU in our production plant.

The target task use the same configuration than the run configuration but with the run action, the custom trim frequency writes it correctly in specific flash location (it's visible in the codewarrior console) and with my target task, this custom trim frequency isn't written in the flash.

Moreover, I have the same problem with the reset at the end of my target task : ok in run action and no reset at the end of target task.

It looks like the Target task doesn't use the run configuration choosen.

A solution or an other way to do that ?

0 Kudos
1 Solution
940 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Yann.

We can only use debugger to perform trim but can’t with CW standalone programmer with target task in the same way. You are right target task doesn't support trim.

This problem has been discussed in the past in community, see

https://community.nxp.com/message/861375 

Hope this can help you.


Have a great day,
Jennie Zhang

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

View solution in original post

5 Replies
941 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Yann.

We can only use debugger to perform trim but can’t with CW standalone programmer with target task in the same way. You are right target task doesn't support trim.

This problem has been discussed in the past in community, see

https://community.nxp.com/message/861375 

Hope this can help you.


Have a great day,
Jennie Zhang

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

940 Views
ace
Contributor I

Thank you for your answer Jennie.

As recommended in the discussion of the link you mentionned, I define a global const variable at 0x000003FF and 0x000003FE (for my SK9KEAZN64) as below :

   const uint8 NV_ICGTRM_INIT @0x000003FF = 0x7C;

   const uint8 NV_FTRIM_INIT @0x000003FE = 0x01;

Unfortunately, codewarrrior generates a syntax error about the @.

Is there a option in codewarrior to accept this specific caracter or I'm doing something wrong ?

Have a great day.

Yann

0 Kudos
940 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Yann,

@ is available for 8/16bit mcu, what chip do you work with?

0 Kudos
940 Views
ace
Contributor I

I work on a 32-bit ARM® Cortex® MCU.

0 Kudos
940 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Yann,

For Kinetis, we recommend you trim clock with ICS register in source code.

We can refer this article for how to implement it.

https://community.nxp.com/docs/DOC-95356 

Best Regards,

Jennie.

0 Kudos