When accessing the register. An interrupt appears.

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

When accessing the register. An interrupt appears.

Jump to solution
1,046 Views
profprogrammer
Contributor III

Hello.

I used MK60DN512.  KSDK 1.2

I want to work with the interface of the RMII.

When accessing the register MMFC

uint32_t* Data_mmfr = (uint32_t *) 0x400c0040;‍
uint32_t tmp = *Data_mmfr;

That program gets interrupted.

/*
** ===================================================================
**     Method      :  Cpu_Cpu_Interrupt (component MK60DN512LL10)
**
**     Description :
**         This ISR services an unused interrupt/exception vector.
**         This method is internal. It is used by Processor Expert only.
** ===================================================================
*/
PE_ISR(Cpu_Interrupt)
{
  /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */
  PE_DEBUGHALT();
}

No possibility to read data from MMFR.

Because of what this can happen?

How to fix it?

0 Kudos
Reply
1 Solution
899 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Prof Programmer

This is a normal behavior. You need to enable the ENET module before you can access enet registers, otherwise,  hard fault will happen.

For example, if you put your code in the lwip_httpsrv_bm demo, after netif_set_up(&fsl_netif0);  then it can work.


Have a great day,
Daniel

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

View solution in original post

0 Kudos
Reply
1 Reply
900 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Prof Programmer

This is a normal behavior. You need to enable the ENET module before you can access enet registers, otherwise,  hard fault will happen.

For example, if you put your code in the lwip_httpsrv_bm demo, after netif_set_up(&fsl_netif0);  then it can work.


Have a great day,
Daniel

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

0 Kudos
Reply