Simple question regarding memory access

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

Simple question regarding memory access

跳至解决方案
400 次查看
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 项奖励
1 解答
358 次查看
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 项奖励
1 回复
359 次查看
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 项奖励