Simple question regarding memory access

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

Simple question regarding memory access

Jump to solution
616 Views
jfsimon1981
Contributor III

Good day team,

I work on a NXP iMX RT1020-EVK board, ethernet module, and having code unable to fetch the ENET registers (polling others ok), see below traces (C and assembly source).

Could you please point out the required configuration to enable ENET module ?

I believe there is a peripheral or clock configuration to be done, though i can't find it in the man pages.

 

C source trace:
 
PRINTF("Tests: begining\n\r");
 
uint32_t test_rdar_read_2;
test_rdar_read_2 = ETH_test->RDAR; // <<< Waits single step from here
PRINTF("Tests: done. Reading ETH_test->RDAR: %x \n\r", test_rdar_read_2);

PRINTF("Init done, MG strating ... \n\r");

Assembly trace:
 
418 PRINTF("Tests: begining\n\r");
20001756: ldr r0, [pc, #376] ; (0x200018d0 <main+404>)
20001758: bl 0x2000664a <DbgConsole_Printf>
 
421 test_rdar_read_2 = ETH_test->RDAR
2000175c: ldr r3, [pc, #372] ; (0x200018d4 <main+408>) <<< Waits single stop from here
2000175e: ldr r3, [r3, #16]
20001760: str.w r3, [r7, #240] ; 0xf0
 

422 PRINTF("Tests: done. Reading ETH_test->RDAR: %x \n\r", test_rdar_read_2);

Thank you

Jean-François

0 Kudos
Reply
1 Solution
574 Views
diego_charles
NXP TechSupport
NXP TechSupport

hi @jfsimon1981 

You are correct, before reading ENET registers you need to do proper intialization. 

As an example, if you take a look at our RT1020 SDK examples, you will be able to see that ENET->RDAR register can be read after calling the PHY_Init() function. Below an snapshot. 

diego_charles_0-1672725601638.png

Best regards,

Diego

 

 

View solution in original post

0 Kudos
Reply
1 Reply
575 Views
diego_charles
NXP TechSupport
NXP TechSupport

hi @jfsimon1981 

You are correct, before reading ENET registers you need to do proper intialization. 

As an example, if you take a look at our RT1020 SDK examples, you will be able to see that ENET->RDAR register can be read after calling the PHY_Init() function. Below an snapshot. 

diego_charles_0-1672725601638.png

Best regards,

Diego

 

 

0 Kudos
Reply