CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

transceiver RFM69W don't receive

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ftrax



Joined: 24 Sep 2013
Posts: 22
Location: España

View user's profile Send private message

transceiver RFM69W don't receive
PostPosted: Thu Jan 08, 2015 10:29 am     Reply with quote

Hi every One,

I have been working with RFM69W module transceiver for a few days.

I have achieved good result on Tx mode and transmit data but I don't know why the transceiver don't work on the Rx mode. Confused

I hope somebody could help me.

As the code is very long, I give you a link with a .rar file.

https://1drv.ms/u/s!Ak-vLVSBQQHAgdUDReRBMKjhezVKyQ

When the driver and libraries will be finished I will post in the Code Library forum.


Last edited by ftrax on Tue Dec 18, 2018 11:20 am; edited 1 time in total
ftrax



Joined: 24 Sep 2013
Posts: 22
Location: España

View user's profile Send private message

PostPosted: Mon Jan 12, 2015 1:28 am     Reply with quote

please, some advice?

I think I'm doing right and I need some help to figure out what I'm doing wrong.
Ttelmah



Joined: 11 Mar 2010
Posts: 19551

View user's profile Send private message

PostPosted: Mon Jan 12, 2015 2:13 am     Reply with quote

Sorry, but if your code is so large, then I doubt if anybody is going to look at it. It is not the place/way to start for debugging. If it is the 'receive mode' that you are having problems with, then you need to do a basic program that just implements this. This is always the first thing to do when you have a problem. Isolate just the part with the problem. So PIC header. Serial. then the code to implement receive alone. This then becomes something that others may be prepared to look at. The funny thing is that often when you implement just the one part, the problem either disappears, or becomes apparent....
ftrax



Joined: 24 Sep 2013
Posts: 22
Location: España

View user's profile Send private message

PostPosted: Mon Jan 12, 2015 3:18 am     Reply with quote

Thank you for take some time to answer.

I think that the problem is in the “RXPacket” routine, line 264 in the RFM69.c or "SPIBurstRead" line 109 in the spi.c

this is the code

Code:
int RFM69W_RxPacket(void){
   int i = 0;

//! if( input(IRQ) ){
   if( IRQ ){   
      for(i=0;i<21;i++)   
         RxData[i] = 0x00;
           
      SPIBurstRead(0x00, RxData, 21);
      RFM69_ClearFIFO();
     
      for(i=0;i<14;i++){
         if(RxData[i]!=RFM69WData[i])
         break;   
      }
     
      if(i>=14)               //Rx success?
         return(1);
      else
         return(0);
   }
   else
      return(0);
}

void SPIBurstRead( int adr, int *ptr, int length ){
   int i = 0;
   
   if(length<=1)                                            //length must more than one
      return;
   else{
      SCK = 0;         
      nSEL= 0;
      SPICmd8bit(adr);   
      for(i=0;i<length;i++)
         ptr[i] = SPIRead8bit();
         
      nSEL= 1;
   }
}
Ttelmah



Joined: 11 Mar 2010
Posts: 19551

View user's profile Send private message

PostPosted: Mon Jan 12, 2015 4:03 am     Reply with quote

I notice you don't read the RSSI value before the start of the burst read. What happens if you do?.
ftrax



Joined: 24 Sep 2013
Posts: 22
Location: España

View user's profile Send private message

PostPosted: Tue Jan 13, 2015 1:15 am     Reply with quote

It is essential to read the RSSI before?

Which value should I expect?

Thank you very much.
Ttelmah



Joined: 11 Mar 2010
Posts: 19551

View user's profile Send private message

PostPosted: Wed Jan 14, 2015 2:16 am     Reply with quote

I don't know, but the example does.
It just reads this before doing the burst read.
ftrax



Joined: 24 Sep 2013
Posts: 22
Location: España

View user's profile Send private message

PostPosted: Wed Mar 11, 2015 9:05 am     Reply with quote

Hi guys, I finally could I solve the problem.
I created a new post in the section "Code Library" I have attached a .rar where there is a folder with all necessary files, also there is a .pdf with the scheme connection.

http://ul.to/7xukf4ts

Thanks for all. Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group