There have been reported issues of possible loss of PLL Lock on some Si5351s after attempts to convert to Nextion screen.
I wrote a simple diagnostic aid for troubleshooting Si5351 without the need of additional instrumentation.?
?
The Si5351 register list can be found in AN619.? Reg1 (Interrupt Status Sticky) description on page 15
https://www.skyworksinc.com/-/media/Skyworks/SL/documents/public/application-notes/AN619.pdf
?
Reg 1 gives us access to see if an interrupt had been taken due to PLL Loss of Lock, Crystal loss, Clk In loss etc from the viewpoint of the Si5351 since the last time it was zero'd.
?
I have what I believe to be a correctly working Si5351.? After power up, I read:
R1:0xF8
Then I Zero Reg 1 and I get repeated reads of
R1:0x10
Which indicates a CLKIN loss.?
That could fork into discussions of same die for all 3 variants?
I haven't put in any thought or reading into possible effects of this interrupt being set when the part should not be in a CLKIN mode.?
It's a curious rabbit hole, but no time to explore at the moment.
I do not have a misbehaving (high jitter) Si5351 to test, but some here do.
?
I'm using Reed's firmware as my base.? Not much program memory space available, even less with my previous modifications.
So a simple hack, that should be easily adapted to any version of firmware.
Below are the code snippets for the diagnostic, I hope that it may be helpful or spark more ideas / discussion.
Rgds,
Gary
to si5351.cpp I added an i2cRead function
?
//AG5TX to read registers
uint8_t i2cRead(uint8_t reg) {? ?// read reg via i2c
? Wire.beginTransmission(SI5351BX_ADDR);
? Wire.write(reg);
? Wire.endTransmission(false);
? Wire.requestFrom(SI5351BX_ADDR, 1);
? uint8_t value = Wire.read();
? Wire.endTransmission();
? return(value);
}
?
then made this function as well as the existing read function available by adding the following lines in si5351.h
// AG5TX
void i2cWrite(uint8_t reg, uint8_t val);
uint8_t i2cRead(uint8_t reg);
?
I wholesale replaced ubitx_cat.cpp with?
?
#include <Arduino.h>
#include "si5351.h"
?
void checkCAT(){
? ? char buffer[11];
? ? int eos;
? ? uint8_t reg_val;
?
? ? while (Serial.available() > 0) {
? ? ? ? eos = Serial.readBytesUntil('\n', buffer, 10);
? ? ? ? buffer[eos] = '\0';
? ? ??
? ? ? ? if(!strncmp(buffer,"z1",11)) {
? ? ? ? ? Serial.println("Z1");
? ? ? ? ? i2cWrite(1,0);
? ? ? ? }
? ? ? ? else if(!strncmp(buffer,"r1",11)) {
? ? ? ? ? Serial.print("R1:0x");
? ? ? ? ? reg_val = i2cRead(1);
? ? ? ? ? Serial.println(reg_val,HEX);
? ? ? ? }
?
? ? }
}
?
?
?