Skip to content

Conversation

@sandro97git
Copy link
Contributor

To activate changes in mac address registers
the top register has to be written

To activate changes in mac address registers
the top register has to be written

Signed-off-by: Sandro Scherer <[email protected]>
@sonarqubecloud
Copy link

Copy link

@lmajewski lmajewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the DS60001734C-page 38 point 6.4.2. MAC Transmit Block:

The back off time is based on a pseudo random binary sequence (PRBS) generator seeded from the least significant
32 bits of the MAC address as configured in the Specific Address Bottom 1 (MAC_SAB1) register.

The code as it is now writes the MAC address to LAN865x_MAC_SAT2 and LAN865x_MAC_SAB2 and updates the LAN865x_MAC_SAB1 for back off time generation.
(I'm asking as maybe the documentation is not precise)

What you want to do is to also activate the SAT/B1 register to hold the same mac address.
Am I correct?
Or what is your use case as you need this feature?

@sandro97git
Copy link
Contributor Author

We have currently issues with collision detection. With only two nodes answering at the same time to a UDP multicast message we often do not get all the responses.

The addresses stored in the Specific Address Registers are deactivated at reset or when their
corresponding Specific Address Register Bottom is written. They are activated when Specific Address
Register Top is written

This statement in the datasheet on page 167 made us think that the activation of the register might be required to seed the random number generator.
In our test project this seems to fix the problem.
But maybe this is also due to inconsistencies in the test setup. I can share the test project if it helps.

@lmajewski
Copy link

We have currently issues with collision detection. With only two nodes answering at the same time to a UDP multicast message we often do not get all the responses.

The addresses stored in the Specific Address Registers are deactivated at reset or when their
corresponding Specific Address Register Bottom is written. They are activated when Specific Address
Register Top is written

This statement in the datasheet on page 167 made us think that the activation of the register might be required to seed the random number generator. In our test project this seems to fix the problem. But maybe this is also due to inconsistencies in the test setup. I can share the test project if it helps.

I'm just wondering, as the datasheet may be not precise enough.
At 11.2.2 MAC Network Configuration Register there are UNIHEN Unicast Hash Enable and MTIHEN Multicast Hash Enable
bits, which help with filtering network traffic (in conjunction with MAC_HRB.
In my case I had to adjust this register for some multicast traffic.

@RamyaI73943
Copy link

The code as it is now writes the MAC address to LAN865x_MAC_SAT2 and LAN865x_MAC_SAB2 and updates the LAN865x_MAC_SAB1 for back off time generation.
(I'm asking as maybe the documentation is not precise)

@lmajewski MAC Specific Address 1 Top register also has to be written to activate the back-off time configuration. As per the informations in the datasheet,
i) DS60001734F-page 66 point 6.4.2. MAC Transmit Block:

The back off time is based on a pseudo random binary sequence (PRBS) generator seeded from the least significant
32 bits of the MAC address as configured in the Specific Address Bottom 1 (MAC_SAB1) register.

ii) DS60001734F-page 167 point 11.2.5. MAC Specific Address 1 Bottom Register:

The addresses stored in the Specific Address Registers are deactivated at reset or when their
corresponding Specific Address Register Bottom is written. They are activated when Specific Address
Register Top is written

The same statements mentioned by you and @sandro97git.
Clubbing together the informations, If we don't write the MAC_SAT1 register, back-off time will not be configured properly in the MAC and that will lead to issues in collision detection when operating in CSMA/CD mode.

@lmajewski
Copy link

@RamyaI73943 @sandro97git - Ok, so if I understood you correctly - to setup back off timer I do need to provide seed by setting MAC_SAB1.
Additionally, to make write to MAC_SAB1 effective, one needs also to write MAC_SAT1. And only when the write is effective the seed for PRBS generator is provided.
Am I correct?

@RamyaI73943
Copy link

@RamyaI73943 @sandro97git - Ok, so if I understood you correctly - to setup back off timer I do need to provide seed by setting MAC_SAB1. Additionally, to make write to MAC_SAB1 effective, one needs also to write MAC_SAT1. And only when the write is effective the seed for PRBS generator is provided. Am I correct?

@lmajewski Yes, You are right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants