-
Cannot get over 550 KHZ using same setup that allows 8 MHZ on Nano Every and 10 MHZ on ESP32. RP Pico 2, TLE5012 and 2 feet of cable between devices, Usng 3 Wire SPI TX MOSi and RX MISO tied with a 10K resistor and data connected to RX MISO . Using Philhower core and this sketch Have tried both PGM controlling CS and SPI controlling it and that did not matter. Here is the sample I am trying to get it to work. #include <SPI.h> // TLE5012 commands void setup() { SPI.setRX(16); // Configure SPI //pinMode(CS_PIN, OUTPUT); void loop() { Serial.print("Raw: "); delay(100); uint16_t readAngle() { //digitalWrite(CS_PIN, LOW); SPI.transfer16(READ_ANGLE_CMD); SPI.endTransaction(); return data & 0x7FFF; // Mask status bits Fastest I could get was 550 KHZ so set it to 400 KHZ as that seems stable. But wonder why it will not go any faster, All three were setup the exact same way so no wiring length differences . |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
Thank you for the reply. The 5v buck is only tied to VBUS so it does not affect anything else. Did that after I gave my handwired device to someone who powered it with a 12v wall wart even though i told them it needed the 5v one I supplied. Apparently they looked the same. That way it will be harder to kill. Was going to try loading an arduino mbed core version on it but cannot seem to get around whatever kills the serial when I attempt to use it . Tried both on the windows 11 machine and Ubuntu and both did the same with with the one pictured and a new one that had never been used. Gave up on that for now maybe will try again when I figure what is wrong. Wanted to see if that made a difference . But am suspecting it is something about the device. Guess I need to swing by my former workplace so i can access an oscilloscope. |
Beta Was this translation helpful? Give feedback.
Suspect it is the device. Borrowed a Nano RP2040 Connect and tested it. I can reliably reach 2Mhz with it sitting on a breadboard. Just to make sure wired the RP Pico into the breadboard and could not exceed 200Khz before the readings became erratic. 300 Kzh nothing it stopped working. Going to drop this idea and go back to the ESP32. Thanks for the help, I'll use this for the solar pool heater idea I've been playing with. Do not need SPI for that and the board will work for that too.