Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spider: ethernet: fix ethernet issues and extend port usage #155

Merged

Conversation

valeriosetti
Copy link
Contributor

This PR resolves 2 issues:

  1. It gives the user the possibility to select any TSN port between TSN0, TSN1 or TSN2 for Ethernet communication.

    • Previously this was supposed to work, but actually there were some parts for the initialization code which was hard-coded to TSN0, so not properly configuring TSN1/TSN2
    • Selection of the desired port should still be done at build time. There is no support for auto detection of the active one at runtime
  2. It solves an issue with L1 cache<->RAM alignement which can prevent the ethernet driver and examples to work properly

Pedantic build flag provides useless warnings about unnamed structures
when building the ethernet drivers in spider platform. Let's remove this
flag since it does not provide any benefit in this case.

Signed-off-by: Valerio Setti <[email protected]>
Previous implementation had some hard coded initialization for only
TSN0 which, of course, made it impossible to use also TSN1 and TSN2.
This commit fix this limitation. Now the desired TSN port can
be selected at build time by properly setting the TSN_PORT_IN_USE
symbol in rswitch.c source file.

It should be noted that only 1 single port can be used at a time and
it must be selected while building the firmware. There is no auto
detection feature or similar supported so far.

Signed-off-by: Valerio Setti <[email protected]>
Without this fix it can happen that the descriptors read from CR52
are not aligned with the RAM content which results in no operation
on the received data. This is of course not correct and due to a
misalignment between the RAM content and L1 cache.
This commits resolves this issue by invalidating L1 cache before
reading descriptors.

Signed-off-by: Valerio Setti <[email protected]>
@RICCIARDI-Adrien RICCIARDI-Adrien merged commit de76b0e into TrampolineRTOS:master Nov 24, 2023
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants