I was trying to replicate these same operations with RFM63 module (changes already made in accordance with the Datasheet), but unable to read all the registers correctly. From what I have observed, certain registers work perfectly as they should (read-write operations), but some registers are not consistent with the values when read in a loop. Some registers are infact un-writable unless you have a 0 at address 0.
Tested it with a Logical Analyzer and everything seems to be fine and perfect with respect to Datasheet. To eliminate possibility of damaged hardware tested this with two different RF63 modules
Completely unable to find any information except the datasheet on the web in context of RFM63.
Wanted help to identify what the problem might be.
Any Help would be hugely appreciated.
Thanks
CODE:
`#include
define nssDataPin 10
define nssConfigPin 9
int delayMicro = 20;
uint8_t address = 0x02;
uint8_t value = 0x03;
I was trying to replicate these same operations with RFM63 module (changes already made in accordance with the Datasheet), but unable to read all the registers correctly. From what I have observed, certain registers work perfectly as they should (read-write operations), but some registers are not consistent with the values when read in a loop. Some registers are infact un-writable unless you have a 0 at address 0. Tested it with a Logical Analyzer and everything seems to be fine and perfect with respect to Datasheet. To eliminate possibility of damaged hardware tested this with two different RF63 modules Completely unable to find any information except the datasheet on the web in context of RFM63. Wanted help to identify what the problem might be. Any Help would be hugely appreciated. Thanks
CODE: `#include
define nssDataPin 10
define nssConfigPin 9
int delayMicro = 20; uint8_t address = 0x02; uint8_t value = 0x03;
void setup() { Serial.begin(9600);
pinMode(nssConfigPin, OUTPUT); pinMode(nssDataPin, OUTPUT);
SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV4); SPI.setDataMode(SPI_MODE0); SPI.setBitOrder(MSBFIRST);
digitalWrite(nssConfigPin, HIGH); digitalWrite(nssDataPin, HIGH);
writeRegister(address, value); delay(1); }
void loop() { // put your main code here, to run repeatedly: uint8_t vals = 0;
vals = readRegister(address); Serial.println(vals); delay(1); }
void writeRegister(uint8_t address, uint8_t value){ digitalWrite(nssConfigPin, LOW); delayMicroseconds(delayMicro);
uint8_t addr = address << 1; SPI.transfer(addr | 0x00); SPI.transfer(value);
delayMicroseconds(delayMicro); digitalWrite(nssConfigPin, HIGH); delayMicroseconds(delayMicro); }
uint8_t readRegister(uint8_t address){ uint8_t valReg =0; digitalWrite(nssConfigPin, LOW); delayMicroseconds(delayMicro);
uint8_t addr = address << 1; SPI.transfer(addr | 0x40); valReg = SPI.transfer(0);
DelayMicroseconds (delayMicro); digitalWrite(nssConfigPin, HIGH); delayMicroseconds(delayMicro); return valReg;
}`
OUTPUT:
LOGIC ANALYZER OUTPUT while Writing Register
LOGIC ANALYZER OUPUT while reading the Register