Custom trim frequency with Target Task on Codewarrior

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Custom trim frequency with Target Task on Codewarrior

跳至解决方案
2,316 次查看
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 项奖励
回复
1 解答
2,093 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

5 回复数
2,094 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

2,093 次查看
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 项奖励
回复
2,093 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Yann,

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

0 项奖励
回复
2,093 次查看
ace
Contributor I

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

0 项奖励
回复
2,093 次查看
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 项奖励
回复