Skip to content

src/corelibs/spi: Added the 3wire test with the TLE5012. #55

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Frederikwag
Copy link
Contributor

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description
Added the 3 wire test for SPI. 3 tests are executed:

  • Verify if the sensor is responding
  • Request angle data from the sensor using 3-wire SPI (16 bit
  • Request temperature data from the sensor (8 bit)

Context
The test requires the sensor tlx5012. Later on, we need to "professionalize" it so that it communicates with another board. Setting up the XMC as slave is the critical part.

Important
Short-circuit MOSI and MISO in advance!
During the test, the magnet needs to be close to the sensor.
3wire

*/

// std includes
#include <tlx5012-arduino.hpp>
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have to check if we can test the 3Wire SPI without depending on the library...
Otherwise this test is out of scope of arduino-core-test.

@LinjingZhang LinjingZhang requested a review from ederjc June 25, 2025 15:03
Copy link
Member

@ederjc ederjc left a comment

Choose a reason for hiding this comment

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

The test requires the sensor tlx5012. Later on, we need to "professionalize" it so that it communicates with another board. Setting up the XMC as slave is the critical part.

What keeps us from "professionalizing" it now?

As @LinjingZhang mentioned this is at the moment testing the sensor (can we include this in the sensor lib instead @OlafFilies?).

Still, a 3-wire SPI test for the cores should be developed.

@ederjc ederjc removed the request for review from ramya-subramanyam June 26, 2025 03:42
@OlafFilies
Copy link
Member

We can of course send this test to the tlx5012 lib, but it has yet no tests at all.
To test 3 wire SPI exactly what it says, 3 wires where MISO/MOSI of both sids are connected to one wire. That can be done exactly like the normal SPI test except that there is only one data wire. If we use an XMC4700 board for that, than it should be able to hande both SPI variants.
Something which we haven't yet tried is multiplexing 3wire SPI where the MISO line is not connected and MOSI is doing both directions. BTW. that what they tried with the IMD70xA on the REF36 motorcontroller board.

@Frederikwag
Copy link
Contributor Author

So we will not merge this test (with the sensor), but develop the "complete" test without the sensor? I would like to keep the ticket until my return in August in order to finish it. Is that ok?

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.

4 participants