Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 55 of 55

Thread: Probable race condition in Radiohead library

  1. #51
    Junior Member
    Join Date
    Jun 2017
    Location
    NL
    Posts
    13
    Hi,
    I think I found the real root cause of the issue. For a Teensy 3.5 at 72 MHz or above the 100ns Hold-up time for NSS after the falling edge of the SCK line is not adhered to. At 72 MHz the timing margin is too narrow, at 96 and 120 MHz NSS rises high already when SCK is still high. For details see attached.
    A workaround is described as well.
    Something nice with a real defined delay at the end of the last spi clock cycle is a bit too much for my current coding skills within these myriad of files.
    But I might get there.
    Pim
    Attached Files Attached Files

  2. #52
    I'm having the same issue with RH_ASK. It's freezing on the second call to driver.waitPacketSent(0)
    Using TeensyDuino 1.3.6 and the most recent zip of RH from GITHUB.

  3. #53
    Junior Member
    Join Date
    Jun 2017
    Location
    NL
    Posts
    13
    Hi,
    1. Github is large but not the place where the latest RH library is. It can be found here: http://www.airspayce.com/mikem/arduino/RadioHead/
    2. The ASK interface is not based on SPI unlike the RF95 interface which is based on SPI. Hence the solution above very likely is not applicable.

    Pim
    Quote Originally Posted by Break Stuff View Post
    I'm having the same issue with RH_ASK. It's freezing on the second call to driver.waitPacketSent(0)
    Using TeensyDuino 1.3.6 and the most recent zip of RH from GITHUB.

  4. #54
    Junior Member
    Join Date
    Aug 2017
    Posts
    1
    Hello!

    I'm having the same problem, stuck at rf95.waitPacketSent(); with and example code from Dragino that can be found here:
    https://github.com/dragino/Arduino-P...nt_Arduino.ino

    I'm using an ATMega328P with a 3.3v power supply @ 8MHz w/external xtal; and a Lora BEE module pre-loaded with 915Mhz freq.

    Can anyone help me? I'm testing those modules and don't know where to go from here. Thank you in advance!

  5. #55
    Member
    Join Date
    Nov 2015
    Location
    colorado
    Posts
    30
    Although you are using an AtMega 328 rather than a Teensy, you may be running into the same issue discussed in the first 10 or so posts in this thread. The fix for that issue was incorporated into the Teensyduino v137 distribution. The fix was only implemented for the RF95, and to my knowledge it has not been incorporated into any other versions of the RadioHead library. The Teensyduino version can be found here: https://github.com/PaulStoffregen/RadioHead

    Some confusion exists as later in this thread PimN identified another issue that he ran up against and posted links for a version of RadioHead that fixed his issue. His library does not contain the fix for the race condition issue originally discussed. Your problem may be related to either or both of the issues discussed in this thread. I suggest that you incorporate the fixes from the Teensyduino RH lib and then the lib linked by PimN in hopes that one of them solves your problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •