spirilis

[Energia Library] Nordic nRF24L01+ library

349 posts in this topic

So, I turned off the auto ACK and changed the check for lastTXfailed to check what address the message was sent to, because I know the two which exists. That means, that the program is doing the same... sending message to all addresses, but it's waiting for the response only for the two of them. And the result is, that it's working well

 

OK [dev-a] - CameraMover
OK [dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK [dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK [dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK [dev-g] - Demo device #1

Share this post


Link to post
Share on other sites

I tried put delays to different places with no result.

 

On device - wait 100ms before sending reply

 

on sender - wait 500ms in the wait() before giving it up

                 - wait 500ms before the wait()

                 - wait 500ms after the wait() before .read

 

nothing helped, still the same problem

 

OK [dev-a] - CameraMover
OK #2[dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK #2[dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK #2[dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK #2[dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK #2[dev-g] - Demo device #1
OK [dev-a] - CameraMover
OK #2[dev-g] - Demo device #1
OK [dev-a] - CameraMover

Share this post


Link to post
Share on other sites

Yeah that's interesting. Wish I had a similar setup so I could slap on the logic analyzer to check but I'm far away from my gadgets right now :D

 

Sent from my Galaxy Note II with Tapatalk

 

 

Share this post


Link to post
Share on other sites

Here's my code for everyone who would like test it:

 

Sender device periodically checks all addresses from dev-a to dev-z and all found devices prints to serial

 

Receiver device is listening on it's address and if receives the right command, it send's back identification string which should be printed to serial by sender device

 

Sender device code

#include "Enrf24.h"
#include "nRF24L01.h"
#include <string.h>
#include <SPI.h>

Enrf24 radio(P2_0, P2_1, P2_2);  // P2.0=CE, P2.1=CSN, P2.2=IRQ

const char IDENTIFY=1;

char rxaddr[] = {'d','e','v','-','0'};
char txaddr[] = {'d','e','v','-','a'};

unsigned long mil;
unsigned long prev_time;

char ch='a';
int verbosity=2; //0 - none, 1 - only responsive devices, 2 - only found devices, 3 - all tries
char packet[]={0,0,0};

void setup() {
  Serial.begin(9600);

  // error
  pinMode(P1_0,OUTPUT);
  digitalWrite(P1_0,LOW);
  // success
  pinMode(P2_3,OUTPUT);
  digitalWrite(P2_3,LOW);

  SPI.begin();
  SPI.setDataMode(SPI_MODE0);
  SPI.setBitOrder(1); // MSB-first

  radio.begin();  // Defaults 1Mbps, channel 0, max TX power

  for(int i=0; i<10; i++)
  {
    digitalWrite(P1_0,HIGH);
    digitalWrite(P2_3,HIGH);
    delay(50);
    digitalWrite(P1_0,LOW);
    digitalWrite(P2_3,LOW);
    delay(50);
  }
  digitalWrite(P1_0,HIGH);
  digitalWrite(P2_3,HIGH);
  delay(1000);
  digitalWrite(P1_0,LOW);
  digitalWrite(P2_3,LOW);
 
  radio.setTXaddress((void*)txaddr);
  radio.setRXaddress((void*)rxaddr);
  radio.enableRX();
  //radio.autoAck(false);
}

void identifyDevices(int slow=0)
{
  char inbuf[33];
 
  if(ch>'z'){ch='a';}
  txaddr[4]=ch;
  radio.setTXaddress((void*)txaddr);
 
  digitalWrite(P1_0,LOW);
  digitalWrite(P2_3,LOW);
 
  packet[0]=IDENTIFY;
 
  radio.lastTXfailed=false;
  radio.print(packet);
  radio.flush();
  //if(ch!='a' && ch!='g'){radio.lastTXfailed=true;}
 
  //Serial.println(ch);
 
  //if(ch!='a' && ch!='g')
  if(radio.lastTXfailed)
  {
    digitalWrite(P1_0,HIGH);
    delay(1);
    digitalWrite(P1_0,LOW);
    
    if(verbosity>2)
    {
      Serial.print("NONE [");
      Serial.print(txaddr[0]);
      Serial.print(txaddr[1]);
      Serial.print(txaddr[2]);
      Serial.print(txaddr[3]);
      Serial.print(txaddr[4]);
      Serial.println("]");
    }
  }
  else
  {
    digitalWrite(P2_3,HIGH);
    delay(5);
    digitalWrite(P2_3,LOW);
    //
    delta_set();
    while (!radio.available(true) && delta_get()<500)
    {
      
    }
    if (radio.read(inbuf))
    {
      if(verbosity>0)
      {
        Serial.print("OK [");
        Serial.print(txaddr[0]);
        Serial.print(txaddr[1]);
        Serial.print(txaddr[2]);
        Serial.print(txaddr[3]);
        Serial.print(txaddr[4]);
        Serial.print("] - ");
        Serial.println(inbuf);
      }
    }
    else
    {
      radio.lastTXfailed=false;
      radio.print(packet);
      radio.flush();
      if(!radio.lastTXfailed)
      {
        delta_set();
        while (!radio.available(true) && delta_get()<500){}
        if (radio.read(inbuf))
        {
          if(verbosity>0)
          {
            Serial.print("OK #2[");
            Serial.print(txaddr[0]);
            Serial.print(txaddr[1]);
            Serial.print(txaddr[2]);
            Serial.print(txaddr[3]);
            Serial.print(txaddr[4]);
            Serial.print("] - ");
            Serial.println(inbuf);
          }
        }
        else
        {
          if(verbosity>1)
          {
            Serial.print("NO RESPONSE [");
            Serial.print(txaddr[0]);
            Serial.print(txaddr[1]);
            Serial.print(txaddr[2]);
            Serial.print(txaddr[3]);
            Serial.print(txaddr[4]);
            Serial.println("]");
          }
        }
      }
      else
      {
        if(verbosity>2)
        {
          Serial.print("NONE [");
          Serial.print(txaddr[0]);
          Serial.print(txaddr[1]);
          Serial.print(txaddr[2]);
          Serial.print(txaddr[3]);
          Serial.print(txaddr[4]);
          Serial.println("]");
        }
      }
    }
    //
  }
  ch++;
  delay(slow);
}

void loop()
{  
  identifyDevices(100);
}

unsigned long delta_set() {
      prev_time = millis();
      return prev_time;
}

unsigned long delta_get() {
      unsigned long time;
      unsigned long delta;
      
      time = millis();
      if (time < prev_time) { // Timer overflow
            delta = 0xffffffff - prev_time + time + 1;
      } else {
            delta = time - prev_time;
      }
      return delta;
}

receiver device code

#include "Enrf24.h"
#include "nRF24L01.h"
#include <string.h>
#include <SPI.h>

Enrf24 radio(P2_0, P2_1, P2_2); // P2.0=CE, P2.1=CSN, P2.2=IRQ

const char IDENTIFY=1;

char rxaddr[] = {'d','e','v','-','g'};
char txaddr[] = {'d','e','v','-','0'};

void setup() {
  Serial.begin(9600);

  SPI.begin();
  SPI.setDataMode(SPI_MODE0);
  SPI.setBitOrder(1); // MSB-first
 
  radio.begin();  // Defaults 1Mbps, channel 0, max TX power

  radio.setRXaddress((void*)rxaddr);
  radio.setTXaddress((void*)txaddr);
 
  pinMode(P1_0, OUTPUT);
  digitalWrite(P1_0, LOW);
  pinMode(P1_3, OUTPUT);
  digitalWrite(P1_3, LOW);
  pinMode(P1_4, OUTPUT);
  digitalWrite(P1_4, LOW);
 
  digitalWrite(P1_0, HIGH);
  delay(100);
  digitalWrite(P1_0, LOW);
  delay(100);
  digitalWrite(P1_0, HIGH);
  delay(100);
  digitalWrite(P1_0, LOW);
  delay(100);
 
  radio.enableRX();  // Start listening
}

void loop() {
 
  char inbuf[33];
 
  while (!radio.available(true))
  {
 
  }
  if (radio.read(inbuf))
  {
    Serial.println(inbuf);
    if (inbuf[0]==IDENTIFY)
    {
     radio.lastTXfailed=false;
     radio.print("Demo device #1");
     radio.flush();
     if(radio.lastTXfailed)
     {
       radio.print("Demo device2 #1");
       radio.flush();
     }
    }
  }
 
}

Share this post


Link to post
Share on other sites

I have a question for you who know how to calculate it.

 

I woud like to make small device which would periodically (every 10s) sent (let's say 5 bytes if it's important). I would use MCU MSP430G2553 (or better G2452?)

 

My question is, how long will it work on battery CR2032 3V 220mAh?

 

I'm planning to use deepsleep and such to maximize the time, but I have no idea what time it could be, I don't know the consumption of NRF24 and the G2553 (or G2452) and don't know how to calculate it.

 

EDIT: Could someone show me an example how to sleep G2553 for 10s, blink LED and sleep again? Thank you

 

Thank you

Share this post


Link to post
Share on other sites

In soft powerdown mode the nRF should use just under 1uA, in LPM3 the msp430 should use 1 or 2uA I think. Not sure that Energia properly supports using LPM3 but I know you can finagle it to do so.

 

Might have to verify the Energia core code does a __bic_SR_register_on_exit (LPM3_bits) at the end of its WDT ISR function. Do some more searching about this since I know others have discussed this problem before.

 

In any case, during active mode (maybe 100ms or less every 5 seconds plus short sub-2ms intervals waking up to maintain the time counter to determine when 5sec has elapsed) the G2553 should use around 3-4mA I believe, and during active TX the nRF will use around 14mA. With autoACK enabled budget around 50ms max for each TX interval.

 

I'm willing to bet that battery would last 6 months or more if you can reliably get the MSP430 to use LPM3 mode.

 

Sent from my Galaxy Note II with Tapatalk

 

 

bluehash likes this

Share this post


Link to post
Share on other sites

Heh this reminds me, I have been envisioning a "LowPower" support API for Energia that would be designed for cross-platform use (eg MSP430 and Tiva) but would require extensive modification to the cores to make it work. It'd be a worthwhile addition to the framework though I think. The idea of a generic API is not farfetched when you consider everyone basically "keeps up with the joneses" implementing the same basic low-power idioms, maybe with small distinguishing changes here and there.

 

Sent from my Galaxy Note II with Tapatalk

 

 

Share this post


Link to post
Share on other sites

Wow! Ok, 6 months is enough to not calculate it exactly.

 

Now I hope someone with experience in the sleep function in energia will help me with the code. It's just a test of the power possibilities of the NRF and MSP and way how to learn the sleeping.

Share this post


Link to post
Share on other sites

I found big problem with Serial. I have implemented the Spirilis's fix to the usci_isr_handler.c so Serial.print(); works. But with the fix Serial.read() is not working. So I'm not able to read from serial at all.

Any Idea how to solve this?

 

Thank you

Share this post


Link to post
Share on other sites

here is the code. With the usci_isr_handler fix it prints nothing, without it it prints everithing sent to the Serial from PC ending with "."

int incomingByte = 0;     // for incoming serial data
char chr='.';             // var to store char from serial port
char string2[16];         // command string (maximum length of the command is set to 16 bytes)
int string2idx = 0;
char commandDivider='.';  // char which devides commands
int moveDelay = 30;       // delay between moves. Usable for slowing down the motor movements
int command_int=0;

void setup()                    // run once, when the sketch starts
{
  Serial.begin(9600);           // set up Serial library at 9600 bps
}

void loop() // run over and over again
{
  while (Serial.available() > 0) {  // while there are data on serial input
    int inChar = Serial.read(); // fill the byte on input into char variable
    chr=(char)inChar;
    if (chr!=commandDivider) { // if input is not command divider
      string2[string2idx++] = inChar;  // add the char in the string array
      string2[string2idx] = 0;         // add 0 byte on the end of the array
    }
    if (chr == commandDivider) {   // if it's the same char as the divider of commands
      command_int=atoi(string2);       // if you want to transform the input string into an integer, use this function
      
      Serial.print("Command: ");
      Serial.println(string2);
      
      if(strcmp(string2,"red")==0)
      {
        analogWrite(2,255); // turn the red LED on
        Serial.println("Red LED is on");
      }
      if(strcmp(string2,"green")==0)
      {
        analogWrite(14,255); // turn the green LED on
        Serial.println("Green LED is on");
      }
      if(strcmp(string2,"off")==0)
      {
        // turn the LEDs off
        analogWrite(14,0);
        analogWrite(2,0);
        Serial.println("LEDs are off");
      }
      
      string2[0] = 0;string2idx = 0; // empty the command
    }
  }
}

Share this post


Link to post
Share on other sites

And really simple one:

char chr;
void setup()
{
  Serial.begin(9600);
}

void loop()
{
  while (Serial.available() > 0) {  // while there are data on serial input
    chr = Serial.read(); // fill the byte on input into char variable
    Serial.print(chr); // print to serial
  }
}

Share this post


Link to post
Share on other sites

Ok, please post your fixed usci_isr_handler.c ... I reviewed my fix for that and I still can't see how Serial.read could be affected as it is only applied to the TX side ISR.

 

Sent from my Galaxy Note II with Tapatalk

 

 

Share this post


Link to post
Share on other sites

With this one it does not work (restart of energia needed):

#include "Energia.h"
#if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__)
#include "usci_isr_handler.h"

/* This dummy function ensures that, when called from any module that
 * is interested in having the USCIAB0TX_VECTOR and USCIAB0TX_VECTOR
 * installed, the linker won't strip the vectors.*/
void usci_isr_install(){}



#if defined(__MSP430_HAS_EUSCI_A0__)
__attribute__((interrupt(USCI_A0_VECTOR)))
void USCIA0_ISR(void)
{
  switch ( UCA0IV )
  {
    case USCI_UART_UCRXIFG: uart_rx_isr(); break;
    case USCI_UART_UCTXIFG: uart_tx_isr(); break;
  }  
}

#else // #if defined(__MSP430_HAS_EUSCI_A0__)
/* USCI_Ax and USCI_Bx share the same TX interrupt vector.
 * UART:
 *    USCIAB0TX_VECTOR services the UCA0TXIFG set in UC0IFG.
 *    USCIAB0RX_VECTOR services the UCA0RXIFG set in UC0IFG.
 * I2C:
 *    USCIAB0TX_VECTOR services both UCB0TXIFG and UCB0RXIFG
 *    set in UC0IFG.
 *    USCIAB0RX_VECTOR services the state change interrupts
 *    UCSTTIFG, UCSTPIFG, UCIFG, UCALIFG set in UCB0STAT.*/

__attribute__((interrupt(USCIAB0TX_VECTOR)))
void USCIAB0TX_ISR(void)
{
        /* USCI_A0 UART interrupt? */
        if (UC0IFG & UCA0TXIFG)
                uart_tx_isr();

        /* USCI_B0 I2C TX RX interrupt. */
        if ((UCB0CTL0 & UCMODE_3) == UCMODE_3 && (UC0IFG & (UCB0TXIFG | UCB0RXIFG)) != 0)
                i2c_txrx_isr();

}
#endif // #if defined(__MSP430_HAS_EUSCI_A0__)
#endif // if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__)

This one works (fot the serial read):

#include "Energia.h"
#if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__)
#include "usci_isr_handler.h"

/* This dummy function ensures that, when called from any module that
 * is interested in having the USCIAB0TX_VECTOR and USCIAB0TX_VECTOR
 * installed, the linker won't strip the vectors.*/
void usci_isr_install(){}



#if defined(__MSP430_HAS_EUSCI_A0__)
__attribute__((interrupt(USCI_A0_VECTOR)))
void USCIA0_ISR(void)
{
  switch ( UCA0IV )
  {
    case USCI_UART_UCRXIFG: uart_rx_isr(); break;
    case USCI_UART_UCTXIFG: uart_tx_isr(); break;
  }  
}

#else // #if defined(__MSP430_HAS_EUSCI_A0__)
/* USCI_Ax and USCI_Bx share the same TX interrupt vector.
 * UART:
 *    USCIAB0TX_VECTOR services the UCA0TXIFG set in UC0IFG.
 *    USCIAB0RX_VECTOR services the UCA0RXIFG set in UC0IFG.
 * I2C:
 *    USCIAB0TX_VECTOR services both UCB0TXIFG and UCB0RXIFG
 *    set in UC0IFG.
 *    USCIAB0RX_VECTOR services the state change interrupts
 *    UCSTTIFG, UCSTPIFG, UCIFG, UCALIFG set in UCB0STAT.*/

__attribute__((interrupt(USCIAB0TX_VECTOR)))
void USCIAB0TX_ISR(void)
{
        /* USCI_A0 UART interrupt? */
        if (UC0IFG & UCA0TXIFG)
                uart_tx_isr();

        /* USCI_B0 I2C TX RX interrupt. */
        if ((UCB0CTL0 & UCMODE_3) == UCMODE_3 && (UC0IFG & (UCB0TXIFG | UCB0RXIFG)) != 0)
                i2c_txrx_isr();

}

__attribute__((interrupt(USCIAB0RX_VECTOR)))
void USCIAB0RX_ISR(void)
{
    /* USCI_A0 UART interrupt? */
    if (UC0IFG & UCA0RXIFG)
        uart_rx_isr();

    /* USCI_B0 I2C state change interrupt. */
    if ((UCB0STAT & (UCALIFG | UCNACKIFG | UCSTTIFG | UCSTPIFG)) != 0)
        i2c_state_isr();
}
#endif // #if defined(__MSP430_HAS_EUSCI_A0__)
#endif // if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__)

Share this post


Link to post
Share on other sites

Ahh k, in the broken example you removed the RX handler (USCIAB0RX_ISR) altogether. That's why Serial.read isn't working. My fix was a small code change to the TX handler, not a TX code change + complete removal of the RX handler. Reinstall the USCIAB0RX_ISR RX handler as-is (no changes necessary) underneath the fixed TX handler and you should have a working Serial.read again.

Sent from my Galaxy Note II with Tapatalk
 

Share this post


Link to post
Share on other sites

I'm afraid I don't understand. Could you post working usci isr handler file? Or should I read your fix again to understand it better?

Share this post


Link to post
Share on other sites

Working handler:

#include "Energia.h"
#if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__)
#include "usci_isr_handler.h"

/* This dummy function ensures that, when called from any module that
 * is interested in having the USCIAB0TX_VECTOR and USCIAB0TX_VECTOR
 * installed, the linker won't strip the vectors.*/
void usci_isr_install(){}



#if defined(__MSP430_HAS_EUSCI_A0__)
__attribute__((interrupt(USCI_A0_VECTOR)))
void USCIA0_ISR(void)
{
  switch ( UCA0IV )
  {
    case USCI_UART_UCRXIFG: uart_rx_isr(); break;
    case USCI_UART_UCTXIFG: uart_tx_isr(); break;
  }
}

#else // #if defined(__MSP430_HAS_EUSCI_A0__)
/* USCI_Ax and USCI_Bx share the same TX interrupt vector.
 * UART:
 *      USCIAB0TX_VECTOR services the UCA0TXIFG set in UC0IFG.
 *      USCIAB0RX_VECTOR services the UCA0RXIFG set in UC0IFG.
 * I2C:
 *      USCIAB0TX_VECTOR services both UCB0TXIFG and UCB0RXIFG
 *      set in UC0IFG.
 *      USCIAB0RX_VECTOR services the state change interrupts
 *      UCSTTIFG, UCSTPIFG, UCIFG, UCALIFG set in UCB0STAT.*/

__attribute__((interrupt(USCIAB0TX_VECTOR)))
void USCIAB0TX_ISR(void)
{
        /* USCI_A0 UART interrupt? */
        if (UC0IFG & UCA0TXIFG)
                uart_tx_isr();

        /* USCI_B0 I2C TX RX interrupt. */
        if ((UCB0CTL0 & UCMODE_3) == UCMODE_3 && (UC0IFG & (UCB0TXIFG | UCB0RXIFG)) != 0)
                i2c_txrx_isr();

}

__attribute__((interrupt(USCIAB0RX_VECTOR)))
void USCIAB0RX_ISR(void)
{
        /* USCI_A0 UART interrupt? */
        if (UC0IFG & UCA0RXIFG)
                uart_rx_isr();

        /* USCI_B0 I2C state change interrupt. */
        if ((UCB0STAT & (UCALIFG | UCNACKIFG | UCSTTIFG | UCSTPIFG)) != 0)
                i2c_state_isr();
}
#endif // #if defined(__MSP430_HAS_EUSCI_A0__)
#endif // if defined(__MSP430_HAS_USCI__) || defined(__MSP430_HAS_EUSCI_A0__)

Note there is a USCIAB0TX_ISR and a USCIAB0RX_ISR.  In your examples, the broken example was missing USCIAB0RX_ISR entirely while the working version had USCIAB0RX_ISR (but did not incorporate my changes to the USCIAB0TX_ISR to fix the SPI / Serial conflict)

hawwwran likes this

Share this post


Link to post
Share on other sites

I am unfamiliar with how Energia works on the Stellaris platform so I won't have much specific diagnostic advice here. I know the nRF24 can't handle >10MHz SPI, and some cheap modules do better with a little capacitance across Vcc/GND (like 10uF).

 

Sent from my Galaxy Note II with Tapatalk

 

 

Share this post


Link to post
Share on other sites

Solved it (not really) by changing the pins. It seems that all the 10 or so configurations I've tried were wrong.

With this pinout it works: Enrf24 radio(PE_1, PE_2, PE_3);  // CE,PSN,IRQ

 

One of these is the culprit:

    PB6 is also MISO(2)

    PD6 is also RX(2)

    PA3 is also CS(0)

 

Maybe someone can explain to me what's wrong but I'm just glad this is over and when I get over it I will do some more testing to see what pins should not be used.

Share this post


Link to post
Share on other sites

I tried to get this library working with MSP430G2553 and launchpad but seems like my modules are broken or something else is wrong. I tried to patch the SPI of energia also but it didn't help.

 

I'm getting this through UART:

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

And after patching the SPI I'm getting:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

Does anyone have any idea what's the issue or can someone provide detailed workflow how they managed to get this library working with energia?

Share this post


Link to post
Share on other sites

The examples that shipped with the library should work.  Be sure things are hooked up properly.  "NO TRANSCEIVER PRESENT" literally means that the library tried to talk to the module, tried to read what its current "address width" is configured to, and didn't find a valid value.  (this is a convenient register to use b/c it can never be 0x00 or 0xFF, typical values you find in an error condition).

 

At the very least, either the CSN port or the SPI ports aren't set up properly, or the module doesn't have power.  Be sure SPI.begin() was run before the library was initialized...

Share this post


Link to post
Share on other sites

Does the Energia need to be patched before compiling those examples? I have tried both TX and RX examples.. I will try to change the CSN, IRQ, and CE ports to other ports on launchpad.

Share this post


Link to post
Share on other sites

I switched MISO and MOSI pins together and tried. The message from UART:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

Then I switched CE and CSN pins together and UART gave me message:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

When I hooked the cables as they're supposed to UART gives me message:

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
 
 
Seems like the module is working but there's something going wrong after module initialization as the deep sleep status is read correctly when module is initialized?

Share this post


Link to post
Share on other sites

 

I switched MISO and MOSI pins together and tried. The message from UART:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

Then I switched CE and CSN pins together and UART gave me message:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

When I hooked the cables as they're supposed to UART gives me message:

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
 
 
Seems like the module is working but there's something going wrong after module initialization as the deep sleep status is read correctly when module is initialized?

 

Yeah, something isn't right.  Try another module?  Different jumper wires (maybe one is frayed or broken)?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now