SIM_COPC on KL16Z128

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

SIM_COPC on KL16Z128

1,144 次查看
adrianhuerta
Contributor I

Hello.
Why i cant change the value on the sim copc?.
I know this register is one write every reset. i try to modified this value in __init__ hardware and this value doesn't change.

void __init_hardware()
{
SCB_VTOR = (uint32_t)__vector_table; /* Set the interrupt vector table position */

// Disable the Watchdog because it may reset the core before entering main().
//SIM_COPC = KINETIS_WDOG_DISABLED_CTRL;
SIM_COPC = 0x0C;
}

0 项奖励
回复
2 回复数

1,009 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Adrian,

I am not quite sure if you are using the code generated by Processor Expert.
Have you try to write your own code after select 'no' at 'Watchdog disable'? (For example: write your own code at line 301)
Or using the WatchDog_LDD component.

WDOG.png

Best Regards,

Robin

 

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

0 项奖励
回复

1,009 次查看
rastislav_pavlanin
NXP Employee
NXP Employee

Hi,

not sure what drivers you use but anyway usually during the start-up (based on e.g. DISABLE_WDOG macro definition in KSDK) there is a small piece of code which already write into the SIM_COPC register to disable WDOG in default. I user want to have enabled WDOG it is required to define macro in order to step over that piece of code during start-up. So, I assume that in your code it is already be written into the SIM_COPC before you trying to do so.

regards

R.

0 项奖励
回复