Pages: 1 [2]   Go Down
Author Topic: Project freezes after several hours  (Read 1085 times)
0 Members and 1 Guest are viewing this topic.
Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK  I have removed the capacitor, set all the unused inputs to pullups and it still freezes after several hours.

if I hook the receivers data to an arduino board as well, that board doesn't hang, i.e. the data is OK from the rf module.

But I could perhaps get the arduino one to print buflen every time it sees a message ( presumably anything with the right datarate? )

I wonder if this has something to do with it, I don't use multiplexing for my displays, all the LED segments are latched by the TPIC shift regs.

So once the data is displayed, the loop is only checking for a correct length message coming in :-

Code:

void loop ()
{

  //        CHECK FOR INCOMING MESSAGE
  uint8_t buf[VW_MAX_MESSAGE_LEN];
  uint8_t buflen = VW_MAX_MESSAGE_LEN;
 
  delay (20);
  if (vw_get_message(buf, &buflen)) // Non-blocking
  {


that's the loop,  I don't now why the delay is in there, I think that was part of the code I copied.

Greg who has a similar problem doesn't have the delay...

I have several units in the field with this same front end ( up until the "got " message,  that are running fine without hanging up )

It was hung up again this morning , so I guess I will try putting a  switch on the RF modules supply, and just power it up when I want to test it.

Except then there would be no constant white noise coming into the chip, which might confuse it,,,,,,,

Or perhaps  I could disconnect the antenna, and wrap the receiver in foil ( test it with the remote to make sure nothing is getting through ) and just fold the foil open to test it every few hours..

Now the plot thickens !   I had left it frozen, and without my rebooting it the displays have changed ( I have only three 7seg displays hooked up for testing ) one is blank, and one has random segments on ( not a number ).  The lookup table has only valid patterns on.

And when I sent an update from the remote, it worked and displayed the right numbers again....

Driving me nuts !
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like it's time for a bunch more debugging prints. In particular' I'd be interested to have one in an else on the if(vw_get_message.... Documentation says that it'll return a message whether the CRC is correct or not. Might give some insight into your theory about other folks using that frequency. Also, I doubt that it's relevant, but you have some Serial.print activity in setup before Serial.begin.   
Logged

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks I will have a look at that serial print.


I cant add serial prints for debugging as it only hangs up with the chip plugged into the equipment, if I hook up an arduino board to the same Rx output, it doesnt latch !

Meanwhile I have added        vw_wait_rx()      

which makes it wait for an input (blocking )

I only need the loop to do anything after getting a message ( my displays are latched, not multiplexed )

It takes many hours to test it though !  I ill change that serial thing in setup anywaay.
« Last Edit: June 16, 2011, 07:23:24 am by Boffin1 » Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I think it must have been a noisy power supply !

Its been working 20 hours OK now since I changed the PSU   (and made the loop wait for a new message wit the blocking VirtualWire wait instruction.)

Thanks for the forums help
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Pages: 1 [2]   Go Up
Jump to: