Closed rolotumazi closed 11 years ago
Are you sending these packets to the right address? Ike's example listens for 0xDEADBEEF00 but your code here sends to 0xDEADBEEF01.
Yes, i can confirm that i'm sending to and receiving on address 0xDEADBEEF01 using Ike's example. by changing the TX side to "ping-remote-led-every500ms-using-vlo.c" the communication fails. the relevant corresponding code on the Ike's RX i'm using is below. Is there anything specific i need to implement in the "msprf24.c" or "nrf_userconfig.h" files to get "ping-remote-led-every500ms-using-vlo.c" to work? i've only commented out the SPI selection in the "nrf_userconfig.h" file.
//#define RF24_SPI_DRIVER_USCI_A 1
//#define RF24_SPI_DRIVER_USCI_B 1
and here's the piece of code of Ike's RX i'm using with only the address changed.
/* Initial values for nRF24L01+ library config variables */
rf_crc = RF24_EN_CRC | RF24_CRCO; // CRC enabled, 16-bit
rf_addr_width = 5;
rf_speed_power = RF24_SPEED_1MBPS | RF24_POWER_0DBM;
rf_channel = 120;
msprf24_init();
msprf24_set_pipe_packetsize(0, 32);
msprf24_open_pipe(0, 1); // Open pipe#0 with Enhanced ShockBurst
// Set our RX address
addr[0] = 0xDE; addr[1] = 0xAD; addr[2] = 0xBE; addr[3] = 0xEF; addr[4] = 0x01;
w_rx_addr(0, addr);
Assuming your CE/CSN/IRQ pins on the G2452 example are the same, then no it should "just work".
Can you put an LPM4 after this section:
// Transmit to 0xDEADBEEF01
msprf24_standby();
user = msprf24_current_state();
addr[0] = 'r'; addr[1] = 'a'; addr[2] = 'd'; addr[3] = '0'; addr[4] = '1';
memcpy(addr, "\xDE\xAD\xBE\xEF\x01", 5);
w_tx_addr(addr);
Then run it, stop the program inside the debugger and examine the value of the "user" variable? Curious to see if the library sees your transceiver properly.
I usually do this from mspdebug's command prompt with:
sym find user (this gives you an address in hex) md
2e.g. md 0x204 2
that was good advice, thank you! it's alive! i forgot that the MISO and MOSI connections needed to be swapped over for the g2452. so if i check on the "user" variable now after stopping the program in the debugger with a "LPM4;" right after
// Transmit to 0xDEADBEEF01
msprf24_standby();
user = msprf24_current_state();
addr[0] = 'r'; addr[1] = 'a'; addr[2] = 'd'; addr[3] = '0'; addr[4] = '1';
memcpy(addr, "\xDE\xAD\xBE\xEF\x01", 5);
w_tx_addr(addr);
i get a value of "2" at address 0x0208 i understand that to mean that the radio is in a state of "RF24_STATE_STANDBY_I" at this point.
i also replaced lines:
addr[0] = 'r'; addr[1] = 'a'; addr[2] = 'd'; addr[3] = '0'; addr[4] = '1';
memcpy(addr, "\xDE\xAD\xBE\xEF\x01", 5);
with:
addr[0] = 0xDE; addr[1] = 0xAD; addr[2] = 0xBE; addr[3] = 0xEF; addr[4] = 0x01;
on both "ping-remote-led-every500ms-using-vlo.c" and Ike's RX and that seemed to have done... well something.
the current consumption is good. i've extended the sleep time to 100 cycles (~ 5 secs) and during this time the power draw is below 30uA.
Thank you very much!
Good stuff! Glad to hear it's figured out. Yeah I'm not sure why TI decided to go flip-flop the USCI_B pins when they introduced the G2xx3, it's goofy to me especially since it's now their established "standard" per http://processors.wiki.ti.com/index.php/BYOB ...
Hi,
i'm trying to get the example "ping-remote-led-every500ms-using-vlo.c" running on a g2452 and i need some help please.
i've managed to get a pair of g2553's running the "ike-uscia-rx.c" and "ike-uscia-tx.c" examples. i thought a good test would be to run "ping-remote-led-every500ms-using-vlo.c" on a g2452 alongside "ike-uscia-rx.c" on a g2553. the LEDs would give me some visual feedback as to what is and isn't going on. below is the adapted "ping-remote-led-every500ms-using-vlo.c" example that i expected would work. i thought the problem could also be that my "nrf_userconfig.h" or "msprf24.c" file may need adjustments but i've not been able to establish this. any help would be greatly appreciated!