Has project S32K148_ENET_TJA1100 ever worked?

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

Has project S32K148_ENET_TJA1100 ever worked?

跳至解决方案
421 次查看
masamiyasui
Contributor I

Environment: S32K148 EVB with TJA1101 Daughter Card

I am trying to check the operation of P2P communication with the S32K148_ENET_TJA1100 project contained in S32K148EVB-QSP.zip.

First, I tried to read the PHY register using SMI_Read() in ENET.c, but it didn't work.

Do I need to fix something in ENET.c or main.c?

Has project S32K148_ENET_TJA1100 ever worked?

0 项奖励
1 解答
373 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

no SMI access takes place during the power-on settling time (ts(pon)). So this should not be an issue in your case, I think. 

I can provide some lwip sever/client demo to test P2P communication.

BR, Petr

在原帖中查看解决方案

0 项奖励
5 回复数
401 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

reading PHY register should work, I think. Where in the code you call this and how? I do not see it is used by default within a code.
So you have two sets of S32K148EVB+TJA1101 Daughter Card connected together, to do P2P communication? Did you changed pin strapping options of TJA1100 board? You should set one side as master and the other as slave. If not done by HW, you can do it in SW modifying ENET.h. Also add #define GPIO_STRAP_CONFIGURATION to override HW boot pinstrap options for PHY.

BR, Petr

0 项奖励
393 次查看
masamiyasui
Contributor I
Thank you for your reply.
 
I added "#define GPIO_STRAP_CONFIGURATION", but still I cannot read RHY register.
 
I want to know link is up or not by RHY register address 0x01.
 
I added this code to ENET.c.
 
void ENET_init(void)
{
static uint16_t data_val;
 
PCC->PCCn[PCC_ENET_INDEX] &= ~PCC_PCCn_CGC_MASK; /* Disable clock to change PCS */
PCC->PCCn[PCC_ENET_INDEX] &= ~PCC_PCCn_PCS_MASK; /* Temporarily clear PCS  */
PCC->PCCn[PCC_ENET_INDEX] |= PCC_PCCn_PCS(6);    /* PCS=6: Select SPLLDIV1_CLK */
PCC->PCCn[PCC_ENET_INDEX] |= PCC_PCCn_CGC_MASK;  /* Enables ENET clock */
 
ENET_BUFFER_Init(); /* prepare description buffers */
 
....
 
/* Enable ENET */
ENET->ECR |= ENET_ECR_ETHEREN_MASK;  /* MAC is enabled, and reception and transmission are possible */
 
ENET_GPIO_Init();       // Initialize PADs
 
data_val = SMI_Read(1); // added to check link is up or not
 
PTC->PSOR  = 1<<28;   /* Turn-on D56 */
}
 
But data_val is always 0xffff.
 
Am I reading the RHY register at the wrong time?
At what timing can I read the RHY register properly?
 
Also, I have not been able to get P2P communication to work.
No reception interrupt occurs for either Master or Slave.
0 项奖励
374 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

no SMI access takes place during the power-on settling time (ts(pon)). So this should not be an issue in your case, I think. 

I can provide some lwip sever/client demo to test P2P communication.

BR, Petr

0 项奖励
338 次查看
masamiyasui
Contributor I

Using the application you provided, I have been able to verify that P2P communication works.

Thank you for your cooperation.

0 项奖励
350 次查看
masamiyasui
Contributor I

Thanks for your cooperation.

Self-solved: I was able to read the RHY register.
I noticed that the RHY address is different on TJA1100 and TJA1101.
I changed the RHY address of the SMI_Read function.

I verified that the link was established by reading the register with the SMI_Read function.

Next I will try the APP you provided.

0 项奖励