-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
library integration on ESP32 #66
Comments
I recently acquired an ESP32, so at some point I should be able to look at this, but right now I'm in the middle of a crunch to get some other projects shipped, so this will have to wait a bit. Thanks for the report. |
I have exactly the same issue. I now use a interface developed by JF3HZB maybe there is some timing issue |
Me three! I just reported this to Jason directly yesterday. Unlike Mike, however, when I look at the status bits, they all look good! The program I'm trying to make work is the "si5351_calibration" program from the examples that come with Jason's library. The only mods I've made to it (other than a million different approaches to trying to make it work) was to actually read the frequency and PLL frequencies from the Si5351 to display them instead of just displaying what the program thinks they are. I can also confirm that the JF3HZB software works as I have a modified version of his VFO working, and if I could figure out how to add the calibration function to it, I would! John |
I tried the "si5351.set_freq_manual" function this morning - didn't help! Also tried different frequencies (5MHz, 10MHz and 15MHz) - Still just get a short burst of output then the Si5351 stops outputting. I'm only using CLK0 and PLLA, again in a slightly modified version of Jason's calibration program. The output I get is: Si5351 Calibration Program Si5351 is online! I2C Bus Speed: 100,000.00 Hz SYS_INIT: 0 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 0 Adjust until your frequency counter reads as close to 10 MHz as possible. Everything except "Target Frequency" is actually being read out of the chip. And BTW, I'm using an Adafruit board; I see no significant electrical difference between the Adafruit board and the Etherkit board. The current version of my code is attached (change the extension from "txt" to "ino"). It is set up to work on non-standard I2C pins; it doesn't work on the standard ones either! Comment out the "Wire.begin" call to use the default pins. Si5351_Cal_With_Alternate_I2C.txt John |
Most likely the problem is in the ESP32 Wire library, because using a logical parser, we can see that ESP32 loses I2C SCL sync. If you want to verify both files, download the Saleae Software. The 2 files are here.
|
Thanks! I didn’t download the program to view the logic analyzer files, but I’m not convinced the problem is in the “Wire” library. Aside from the problem with the Si5351 on the ESP32, I am using the “Wire” library along with a library for the PCF8574 <https://github.com/RobTillaart/Arduino/tree/master/libraries/PCF8574> chip that works fine on the ESP32. I haven’t done an analysis to see if the two libraries are using the “Wire” library differently or not.
I published an Si5351 calibration program <https://github.com/WA2FZW/A-Program-to-Calibrate-the-Si5351-by-WA2FZW> on GitHub last week which does not use the “Wire” library. It uses a slightly modified version of the Si5351 software from the digital VFO designed by TJ <https://www.youtube.com/watch?v=HjzTwqTvjqQ&t=5s> Uebo (JF3HZB) and works equally well on either the ESP32 or an Arduino.
John
WA2FZW
From: WanderLG [mailto:[email protected]]
Sent: Monday, September 09, 2019 9:21 PM
To: etherkit/Si5351Arduino
Cc: John P.; Comment
Subject: Re: [etherkit/Si5351Arduino] library integration on ESP32 (#66)
Most likely the problem is in the ESP32 Wire library, because using a logical parser, we can see that ESP32 loses I2C SCL sync.
I am sending 2 files with si5351_calibration.ino i2c logical data
Arduino vs ESP32
If you want to verify both files, download the Saleae Software.
https://www.saleae.com/pt/downloads/
Muito provavelmente o problema é na biblioteca Wire do ESP32, pois usando um analisador logico, podemos perceber que o ESP32 perde o sincronismo SCL do I2C.
Estou enviando 2 arquivos com os dados lógicos i2c do si5351_calibration.ino
Arduino vs ESP32
Se quiserem verificar os dois arquivos, baixem o Software Saleae.
https://www.saleae.com/pt/downloads/
Analyzer Logic.zip <https://github.com/etherkit/Si5351Arduino/files/3593190/Analyzer.Logic.zip>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#66?email_source=notifications&email_token=AG2ZI24RAAIH4JAVPTVEJNDQI3ZADA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6JQCLA#issuecomment-529727788> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AG2ZI2ZPIJVJDET7SU225NTQI3ZADANCNFSM4GFIYFOQ> . <https://github.com/notifications/beacon/AG2ZI23YGFTU6I7GNKGG2N3QI3ZADA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6JQCLA.gif>
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
The two photos are just the end of the package. In the first photo, both work, but in the second photo, Arduino Works and ESP32 does not work. |
Oh, I agree something isn't working; just not sure what! You didn't say, but is the scanner program using the Wire library or not? I definitely see some differences in the data streams in the 2nd set of pictures, but I'm not sure what they mean. There are a couple of strange pulses on the SCL line also: John |
All using wire.
Em ter, 10 de set de 2019 08:21, John P. <[email protected]>
escreveu:
… Oh, I agree something isn't working; just not sure what! You didn't say,
but is the scanner program using the Wire library or not?
I definitely see some differences in the data streams in the 2nd set of
pictures, but I'm not sure what they mean. There are a couple of strange
pulses on the SCL line also:
[image: image-1]
<https://user-images.githubusercontent.com/28677227/64609712-89fd9600-d39b-11e9-90e7-d2ab8e3d6bff.jpg>
John
WA2FZW
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#66?email_source=notifications&email_token=ANEQSIUX5ZYQUBMKSDMZA43QI57LTA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6KXXAA#issuecomment-529890176>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANEQSITWUNAQDNNEPN2MQYTQI57LTANCNFSM4GFIYFOQ>
.
|
Well, again, that would lead me to believe the problem is not in the Wire library, but in the Etherkit library. Again I am using the Wire library to communicate with a PCF8574 over the I2C bus with no problem, which would also lead me to believe the Wire library is OK.
John
WA2FZW
From: WanderLG [mailto:[email protected]]
Sent: Tuesday, September 10, 2019 7:30 AM
To: etherkit/Si5351Arduino
Cc: John P.; Comment
Subject: Re: [etherkit/Si5351Arduino] library integration on ESP32 (#66)
All using wire.
Em ter, 10 de set de 2019 08:21, John P. <[email protected]>
escreveu:
Oh, I agree something isn't working; just not sure what! You didn't say,
but is the scanner program using the Wire library or not?
I definitely see some differences in the data streams in the 2nd set of
pictures, but I'm not sure what they mean. There are a couple of strange
pulses on the SCL line also:
[image: image-1]
<https://user-images.githubusercontent.com/28677227/64609712-89fd9600-d39b-11e9-90e7-d2ab8e3d6bff.jpg>
John
WA2FZW
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#66?email_source=notifications&email_token=ANEQSIUX5ZYQUBMKSDMZA43QI57LTA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6KXXAA#issuecomment-529890176>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANEQSITWUNAQDNNEPN2MQYTQI57LTANCNFSM4GFIYFOQ>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#66?email_source=notifications&email_token=AG2ZI2ZGIMFWVGYAYVA4GVDQI6AJXA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6KYJPA#issuecomment-529892540> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AG2ZI23PY2H65VU5JRIQQV3QI6AJXANCNFSM4GFIYFOQ> . <https://github.com/notifications/beacon/AG2ZI2YABIIJ3L6QACYE5JDQI6AJXA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6KYJPA.gif>
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
This didn't seem to get posted when I replied via email: Well, again, that would lead me to believe the problem is not in the Wire library, but in the Etherkit library. Again I am using the Wire library to communicate with a PCF8574 over the I2C bus with no problem, which would also lead me to believe the Wire library is OK. John |
Hey, Good luck! |
This is where the first error occurs. But using ESP32 that doesn't happen and we only have 5 high pulses in SCL. Jhon, I suspect the problem is with ESP32 i2c libraries as there are more people with this same problem using other i2c modules. Already the (JF3HZB) VFO works, because it built i2c communication without using the ESP32 specific libraries. It's not just Wire.h or Wire.cpp. There are others that are related. |
But yes, there may be a way to work around this in the Etherkit SI5351 library without having to touch the ESP32 i2c libraries. I just don't know how to do this. But I'll try, if I can before you, post the result. Note: I am Brazilian and do not speak English. I'm using google translator. |
There are people saying that they solved the ESP32 i2c problem by updating the package. https://github.com/espressif/arduino-esp32/releases Now I have no way to test this. But as soon as I get home, I'll take the test. |
That would be great! Let us know if it works! And tell me how to go about doing the update! I couldn't figure it out! Thanks! John WA2FZW |
I couldn't make it work. Updated to: |
Wander – Email me direct at my call sign at ARRL.net. I’ll send some code that shows that you can use all 3 clocks independently with TJ’s code. I don’t want to post it on GitHub just yet as testing is not complete.
John
WA2FZW
From: WanderLG [mailto:[email protected]]
Sent: Wednesday, September 11, 2019 10:14 AM
To: etherkit/Si5351Arduino
Cc: John P.; Comment
Subject: Re: [etherkit/Si5351Arduino] library integration on ESP32 (#66)
I couldn't make it work. Updated to:
ESP32 Arduino 1.0.3 RC3 (IDF 3.2)
But still the error continues.
To generate frequency in only one output, CLK0 for example.
The JF3HZB / T.UEBO library works perfectly.
But it's manual so I don't know if it's possible to generate 3 independent outputs, like in this Jason Milldrum library.
VFO JF3HZB
https://onedrive.live.com/?authkey=%21APjYCcc%2DZzSw%2DCQ <https://onedrive.live.com/?authkey=%21APjYCcc%2DZzSw%2DCQ&id=567BE007779244E3%21101672&cid=567BE007779244E3> &id=567BE007779244E3%21101672&cid=567BE007779244E3
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#66?email_source=notifications&email_token=AG2ZI22WVXN5ZXL3CEJQ6C3QJD4IVA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OUDAY#issuecomment-530399619> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AG2ZI2Z4L2MEGIKJBFW4HULQJD4IVANCNFSM4GFIYFOQ> . <https://github.com/notifications/beacon/AG2ZI2Y4F4XZJS2COHXX76LQJD4IVA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OUDAY.gif>
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
Jhon Thank you. I sent the email. Did it get there? |
Yes – Answering now!
From: WanderLG [mailto:[email protected]]
Sent: Wednesday, September 11, 2019 10:40 AM
To: etherkit/Si5351Arduino
Cc: John P.; Comment
Subject: Re: [etherkit/Si5351Arduino] library integration on ESP32 (#66)
Jhon Thank you. I sent the email. Did it get there?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#66?email_source=notifications&email_token=AG2ZI27522UTZNVIAZ7J44DQJD7MJA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OXBYI#issuecomment-530411745> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AG2ZI24G6ZVUNGPTEKQLK4TQJD7MJANCNFSM4GFIYFOQ> . <https://github.com/notifications/beacon/AG2ZI25DYLOTXZGJXHZ5LN3QJD7MJA5CNFSM4GFIYFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OXBYI.gif>
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
I have replaced the wire library by direct sending the i2c commands on the GPIO so called bit banging. Now it looks it works also on ESP32. You have to replace all the wire stuff. But thats relative simple. Did not test everything but for my application it is working. Code can be found on https://github.com/paulh002/VFO-ESP32-Si5351 |
I can confirm that there is still a Wire library problem on ESP32 with version 1.0.4 for Arduino. I can't even get the basic Etherkit test programs to run. I grabbed Paul's i2c and si5351 libraries above and was able to get test programs running. I'm going to move forward with my own code, which uses the VCXO. Paul, if I find glitches I'll post to your github. Hopefully, Espressif will figure out their issue and fix their stock i2c implementation. |
FWIW, I've ordered an ESP32 board so I can see what's going on for myself. If it is down to the Wire implementation for the ESP32 support package, I'll close this issue. However, I'd like this library to be as universal as possible, so it's long past time for me acquire an ESP32 board and make sure it can work. |
Awesome! Thanks for your great work with this library, BTW, I've used it for several little projects and it works like a champ. I've got a Logic analyzer and a pile of different model Arduinos and a few ESPs. If I get motivated to take a stab at things, I'll let you know. Also, if you need a test dummy, I'd love to give back for all your hard work. Just let me know if I can help. |
Some people got it working without an issue, so there is some variation. Maybe if you combine it with an ili9341 spi interface the i2c gets in problems. Anyway I also added multi si5351 support. Would be a nice extension to the library. This to lower the crosstalk between channels. |
The problem is something within the etherkit library, I never used to have this problem until i moved to platformio. My arduino implementation of ESP32 was old, very old and it worked flawlessly. But on anything new it fails. I have gone hunting for the issue but cant find it. I have other libraries for SI5351 that do work with ESP32 the one from adafruit and there is one by Pavel Milanes that works flawlessly, so my guess is that there is something not right in how the etherkit library is talking over I2C. SI5351 is the only thing I have issues with over I2C i have 2 LCD's a RTC and a couple of Port Expanders all hanging off I2C and they work fine, do its not the Wire library, but something in how the etherkit library is talking to the I2C, something is getting lost somewhere. My problem is I needed quadrature output and Jason's library for that does not work with ESP32 and all my protoboards have ESP32 LOL, Yeah i can bust out the flopflops, but that cuts my frequency by 4 and I was working on a 2m implementation HAHA. Keep up the good work Jason, you rock and I do not mean my post to sound critical of you, it works perfectly with ATmega, but something weird with esp32. |
Hi Rob, in stead of moving to an other library, I changed the i2c part of
etherkit. I also changed it to support multiple si5351's. You can get the
code if you like on my github page. paulh002
By the way, I could not give comments to your blog, I think there is some
issue
73 Paul
Op do 24 dec. 2020 06:11 schreef vk4hat <[email protected]>:
… The problem is something within the etherkit library, I never used to have
this problem until i moved to platformio. My arduino implementation of
ESP32 was old, very old and it worked flawlessly. But on anything new it
fails. I have gone hunting for the issue but cant find it.
I have other libraries for SI5351 that do work with ESP32 the one from
adafruit and there is one by Pavel Milanes that works flawlessly, so my
guess is that there is something not right in how the etherkit library is
talking over I2C.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIOBYUFVQYAYEJ6JN3LMCATSWLEQFANCNFSM4GFIYFOQ>
.
|
Thanks Paul, I will grab your code later and see if I can manage to make the quadrature SI5351 work with it. I did fix the comments on my blog, seems Jetpack changed settings and made people login with facebook or google to comment. That might explain why i have not had comments in a long time and no one let me know LOL Cheers Mate |
I have a similar issue with this library (and all others who've contributed) and the ESP32. I've tried the Si5351_Cal_With_Alternate_I2C sketch by WA2FZW and I get an "Si5351 is online", however no frequency output. I've looked into the I2C issues, however I've tried with all the sketches by various people commenting on this topic, and none of them gets me any output. In any case, working with ESP32, I always have to use: If I don't use these, together with Wire.begin(SDA, SCL); my i2c never works with any module or sensor. My setup is PlatformIO on VScode, NodeMCU-32s and an Adafruit module (I probably would have bought the Etherkit if I was aware of it before buying the Adafruit SI5351). I am measuring my output on a Agilent 53131A. |
https://github.com/pavelmc/Si5351mcu This library does work with ESP32 out of the box. Its limited to 2 clocks only though. There is also a Russian\Ukrainian library that works as well, but dont have a link handy. |
I got it somewhat working now. I used the library by pavelmc and by setting the standard I2C pins for ESP32 (SCL - pin 22; SDA - pin 21). I used the simple example, however at 60 MHz I get close to 55 MHz output. At 112.5 MHz, I get 104 MHz output. Is it normal for it to deviate that much? PS: I tried afterwards the library from both Etherkit and WA2FZW. Both not working. Update: I tried with an Arduino Uno I had laying around. I got it to work with the Etherkit example right away. Now I really would like it to work with the ESP32, because this proof that I can get the library working. @NT7S If your still doing some testing on this library and are in need of testers, please let me know, I'm here to help. |
Reset the PPL's |
I assume you mean the PLL? In the library you attached by pavelmc, this is already done as standard. |
If you are making a jump of more than a meg or so, it needs to be called again. I do not have any problem with it being inaccurate. |
Just an update on this problem. I tested the Etherkit library again with Espressif's Arduino esp32-1.0.5-rc6 build. Still no joy. The behavior seems about the same as with the 1.0.4 release. I was hoping the vendor lib's might fix it, since there have been updates in the wire code. Apparently not. :-( I'm having a few minor issues with Paul's "bit-banging" library. It doesn't seem to play well if I'm using I2C via the Wire library on the same pins. I either have to figure out why, or redesign my riser board to bit-bang on a different pair of GPIO ports for using the Si5351. Paul's also doesn't seem to disable transmit when I call: Anyway, I thought I'd share an update. |
Sharing the same ports with Wire can indeed be a problem, in my project I only have si5351's attached. The output_enable function I did not use. But i will check. It is a pity that the wire lib does not work, I tried to look into it did some analysis with my scope that can decode i2c but no luck. Cost too much time to debug this issue. |
Thanks Paul, I read through the code a bit last night and everything looked about right, though I didn't do any serious debugging. I was hoping it was something as simple as you hadn't implemented the routine and just stubbed it in. I'll try to hook up my logic analyzer in the next few days to get a capture of the behavior. If you want to take this offline, since it's not really related to the etherkit library, feel free to contact me at kd2eat at gmail.com. Thanks for writing back :-) |
Here's what works for me: In the SI5351::si5351_read method Change to Arduino 1.8.13 ESP32 package 1.0.6 Windows 10 Regards, Dave |
That would be great, will test it |
I have tested this solution and it works good. |
Thanks, works well. It was the solution for the problem with the ESP32 and the Si5351 board. |
Awesome. Happy that you got it working now. If you run into any other
problems, just sing out, I will try and help as best i can over email
---
********************************************************************************
Rob Powell, VK4HAT.
Blackbutt, QLD, Au.
http://robs-blog.net
********************************************************************************
On 09.11.2022 23:37, PE2BS wrote:
Thanks, works well. It was the solution for the problem with the ESP32
and the Si5351 board.
73
Ruud / PE2BS
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi , I am integrating Si5351Arduino on an ESP32 micro using arduino IDE.
I get erratic behaveures when using the set_freq and set_freq_manual methods; in particular:
SYS_INIT: 1 LOL_A: 1 LOL_B: 1 LOS: 1 REVID: 0
can you please help to fix these issues ?
Thanks in advance for any help and thanks for the wonderfull work done ...
Mike
The text was updated successfully, but these errors were encountered: