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

check error #18

Open
wt76cn opened this issue Oct 12, 2021 · 11 comments
Open

check error #18

wt76cn opened this issue Oct 12, 2021 · 11 comments
Assignees

Comments

@wt76cn
Copy link

wt76cn commented Oct 12, 2021

Steps to reproduce the behavior:

  1. download the readAngleTest
    2.the returned check error is 1 sometime is FF
@OlafFilies
Copy link
Member

Hello, before I can answer the question fully I have also some.

  1. Which interface type of the TLE5012 do you have? IIF, PWM, HSM or SPC?
  2. Is the TLE5012 still attached to the XMC2Go or is it attached to an external MCU?
  3. Do you have magnet arround the Sensor when you start it?

The last point is the most likely one, as without magnetic field the sensor throws an error. Also when the magnetic field is to strong, so when you put a very strong magnet directly on top of the chip, it throws an error.
The checkerror apears only at startup in the example, but every function gives the checkerror back so you are able to check the magnetic field constantly and the health of the sensor with every function.

@wt76cn
Copy link
Author

wt76cn commented Oct 12, 2021 via email

@OlafFilies
Copy link
Member

Ok, so there must be a magnet near the sensor, otherwise you get the checkerror at the begin. If you use an arduino ( no matter which version) than keep in mind, the the main interface of this sensor is the SSC 3-Wire SPI. There you a SCK, a CS and only one Data pin. To connect this with the MISO/MOSI have a lokk in the GitHub wiki of this sensor. Basicly you two options, take the normal SPI, than you need a resistor between MISO/MOSI or you take the 3-Wire SPI from this library than MISO/MOSI are shortcutted. There is still the question of the interface version. If you have the SPC interface than please have a look in the SPC example and in the documentatioon, has this type needs an external trigger. All other interface types should work without that.

@wt76cn
Copy link
Author

wt76cn commented Oct 13, 2021 via email

@OlafFilies
Copy link
Member

So this data tells me that the sensor does not react at all so please test the following:

  1. as far as I understand, you have bulk chip not a small PCB board with the sensor o top, correct? If so please have a look here https://github.com/Infineon/TLE5012-Magnetic-Angle-Sensor/wiki/Hardware-Platforms under Bulk Sensor and attach the Sensor to you Arduino as show in the picture with a 470 Ohm resistor between MISO/MOSI.
  2. on that page you can also find a list of different TLE5012 versions with different interfaces. To check that you type is not an E9000 SPC, please try the E9000SPC example.
  3. the Arduino pro mini was never tested, does the compiltion run without any errors or warnings? and if there are some which one.
  4. to check the software itself, which IDE/version of IDE are you using, which version of the TLE5012 library
  5. can send a photo from you wired setup?

@wt76cn
Copy link
Author

wt76cn commented Oct 14, 2021 via email

@robosithi
Copy link

robosithi commented Apr 21, 2022

@OlafFilies
Hello. I have a similar problem.
I am using the following environment.
Linux: Ubuntu 20.04
Arduino IDE: 1.8.19
TLE5012 Library:3.0.1
Arduino Board : Arduino Mega 2560
Chip: TLE5012b E1000 Bulk(TLE5012BE1000XUMA1)
I connected 6.8k ohms between MISO and MOSI of the Arduino. I then connected it to the data pins of the TLE5012 via 470 ohms.
I have magnet arround the Sensor.

In my case, the default Example did not work.
I got it to work by changing line 41 as follows.
Tle5012Sensor.getAngleValue(d);

However, if I then comment out the serial output on lines 47-51, I get an error of 1 at Init.

@litchiate
Copy link

my Arduino leonardo dosen't work too.
I found SS_Pin curve strange with a oscilloscope.
After adding following in void SPIClass3W::sendReceiveSpi();
pinMode(11,OUTPUT);
digitalWrite(11, HIGH);
It works.

@OlafFilies
Copy link
Member

Hello, when it works only with hard set pins, than I would assume that the pin setting in the calling function is not correct.
Are you initializising the TLE5012 with the constructor from TLE5012-pal-ino.hpp line 53 or 54? If you use the simple one from line 53, than please check the setting of the PIN_SPI_MISO/PIN_SPI_MOSI defines. If you use the full SPI setting from line 54 than pleas check the input there.
What I'm worried about is that you also set digitalWrite to high. The code was checked with an original Arduino and XMCs but not with a Leonardo. I have to check that.
Does it work without digitalWrite to High? You set these commands in lines 86-88 of spi3w-ard.cpp? Did you also change it for the second part in line 97-99?

@Sesko1
Copy link

Sesko1 commented Oct 20, 2023

@OlafFilies
Hello Olaf,
I initially had the same issue with an Arduino nano, error FF or Error 1. I got it to work without issues on an Arduino Uno, using the same pinout. In my application I would ideally use a Nano - I did try manually porting the pins for the Nano but it returned the same error. I'm wondering if there is something else I'm missing. Thanks in advance!

@OlafFilies
Copy link
Member

OlafFilies commented Oct 23, 2023 via email

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

No branches or pull requests

8 participants