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

cc1101 wrong chipid #208

Closed
13 opened this issue Dec 8, 2020 · 1 comment
Closed

cc1101 wrong chipid #208

13 opened this issue Dec 8, 2020 · 1 comment
Labels
bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented)

Comments

@13
Copy link

13 commented Dec 8, 2020

Describe the bug

I'm not able to get the right chipid of my cc1101, which is 0x0014

12:06:48.004 > CC1101 not found! (1 of 10 tries) CC1101_REG_VERSION == 0x000F, expected 0x0004/0x0014
12:06:48.132 > CC1101 not found! (2 of 10 tries) CC1101_REG_VERSION == 0x008F, expected 0x0004/0x0014
12:06:48.212 > CC1101 not found! (3 of 10 tries) CC1101_REG_VERSION == 0x000F, expected 0x0004/0x0014
12:06:48.307 > CC1101 not found! (4 of 10 tries) CC1101_REG_VERSION == 0x008F, expected 0x0004/0x0014
12:06:48.403 > CC1101 not found! (5 of 10 tries) CC1101_REG_VERSION == 0x000F, expected 0x0004/0x0014
12:06:48.499 > CC1101 not found! (6 of 10 tries) CC1101_REG_VERSION == 0x008F, expected 0x0004/0x0014
12:06:48.578 > CC1101 not found! (7 of 10 tries) CC1101_REG_VERSION == 0x000F, expected 0x0004/0x0014
12:06:48.674 > CC1101 not found! (8 of 10 tries) CC1101_REG_VERSION == 0x008F, expected 0x0004/0x0014
12:06:48.770 > CC1101 not found! (9 of 10 tries) CC1101_REG_VERSION == 0x000F, expected 0x0004/0x0014
12:06:48.865 > CC1101 not found! (10 of 10 tries) CC1101_REG_VERSION == 0x000F, expected 0x0004/0x0014

Fix

I had to reverse a previous patch.

-    int16_t version = getChipVersion();
+    uint8_t version = SPIreadRegister(CC1101_REG_VERSION);

Additional info (please complete):

  • Library version 4.0.0.6
@jgromes
Copy link
Owner

jgromes commented Dec 8, 2020

Ah, I forgot CC1101 has it's own overrides for the SPI methods from Module class. Should be fixed in 81135e0, thanks for reporting.

@jgromes jgromes added bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented) labels Dec 8, 2020
@jgromes jgromes closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Issue was resolved (e.g. bug fixed, or feature implemented)
Projects
None yet
Development

No branches or pull requests

2 participants