SIM_COPC on KL16Z128

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

SIM_COPC on KL16Z128

597 Views
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 Kudos
2 Replies

462 Views
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 Kudos

462 Views
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 Kudos