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

fix sanity checks for new CFG_sx1276_radio boards #790

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

Conversation

croghostrider
Copy link

No description provided.

@terrillmoore
Copy link
Member

Since they changed the silicon ID, I conclude that there are other changes we have to take into account. The LMIC should record the silicon ID for easy reference at this point; and we must review the LMIC to determine whether other changes are needed. See, for example, #787, which is possibly related. I'd rather not make this change until the review has been done; and I have no time to review, nor hardware that has this value in the registers. Deferring.

@terrillmoore
Copy link
Member

See, for example, #787, which is possibly related.

Turns out, not related. The datasheet with the change still shows 0x12 as the chip id. Google search indicates that the differences between 0x12 and 0x13 are not yet documented. More info is needed.

@terrillmoore
Copy link
Member

I checked today on Semtech's site and there's still not an updated datasheet with the new chip ID.

@terrillmoore
Copy link
Member

A detailed review and comparison of the latest datasheet shows a new footnote:
image
So it's possible that a chip with ID 0x13 simply denotes a wafer delivery of an SX1276.

@@ -1109,7 +1109,7 @@ int radio_init () {
// some sanity checks, e.g., read version number
u1_t v = readReg(RegVersion);
#ifdef CFG_sx1276_radio
if(v != 0x12 )
if(v != 0x12 & v != 0x13)
Copy link
Member

Choose a reason for hiding this comment

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

if(v != 0x12 & v != 0x13):

This should be &&, not &. Or else if ((v & ~1u) == 0x12), which might be smaller on AVR. Ideally, this would be a macro or inline check: if (is_sx1276_like(v)), where is_sx1276_like() looks at v and makes the decision.

We've not heard more on this since the last few years; has Semtech documented this? Or is this not relevant after all?

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.

2 participants