Simple question regarding memory access

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Simple question regarding memory access

ソリューションへジャンプ
402件の閲覧回数
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 解決策
360件の閲覧回数
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 返信
361件の閲覧回数
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 件の賞賛