Timeline for Printing transmission data from nRF24L01+
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 12, 2018 at 15:37 | comment | added | Mr Chips | many thanks for your help. I have it working now. | |
Apr 11, 2018 at 19:06 | comment | added | Michel Keijzers | True, if you put * in front of it, it shows the content, HOWEVER, I'm sure OBSERVE_TX is not the address itself, it is an offset from a base address, but to be honest, I don't know which one. There must be another #define that contains the base address, so you should use *(base_address + OBSERVE_TX), and similar for others. | |
Apr 11, 2018 at 16:52 | comment | added | Mr Chips | The "observe_tx" register is address 0x08. "PLOS_CNT" is defined as 0x04, and ARC_CNT as 0x00. Bits 0-3 of 0x08 register are counting retries, bits 4-7 of 0x08 are counting packet loss. So, if i substitiute address 0x08, and the other numbers: printf_P(PSTR("OBSERVE_TX=%02x: PLOS_CNT=%x ARC_CNT=%x\r\n"), *(0x08), 0x04, 0x00); it prints OBSERVE_TX=8: PLOS_CNT=4 ARC_CNT=0. These are the numbers, rather than the any value of an address. Have i understood it right ? | |
Apr 11, 2018 at 15:26 | history | edited | Michel Keijzers | CC BY-SA 3.0 |
added 220 characters in body
|
Apr 11, 2018 at 15:20 | history | edited | Michel Keijzers | CC BY-SA 3.0 |
added 220 characters in body
|
Apr 11, 2018 at 15:14 | comment | added | Mr Chips | When i try that, it gives me "observe_tx was not declared in this scope" and the same error for "plos_cnt", and does not compile. So if i declare a variable called "observe_tx", and substitute "4" for "plos_cnt" ("#define PLOS_CNT 4", in nRF24l01.h), then it prints in the serial monitor : "OBSERVE_TX=401: PLOS_CNT=0 ARC_CNT=7304, with ARC jumping 7304, 1ec4, ca88, 7650, 2218, cddc, 79a8.... each time the loop executes. I expect PLOS, ARC to initially both be 0, and for ARC to increment Thanks for your explanation of the additional details - good for my understanding. | |
Apr 11, 2018 at 13:48 | history | answered | Michel Keijzers | CC BY-SA 3.0 |