NodeMCU and NRF+, SPI init problem



  • Hi all,
    I'm struggling with my NodeMCU V0.9 gateway (esp8266), the board is powered via the micro usb (from my laptop or from usb charger).
    The board will not init if the CS is connected to the NRF+
    The board cannot be program/flash when the pin is connected to the NRF+.
    If I disconnect the pin and reset the board it will start-up,I can then either program the board or connect the pin and the radio will init (API 2.0).
    I've tried 10k pull down on the CS, but it did not help. still the board will not init when the cs is connected to the NRF+

    Any suggestions?


  • Hardware Contributor

    Hello.

    I don't know about nodemcu 0.9, but i have some 1.0 which i use as mqtt wifi gw. On my side, i use rfm69 radio and have 10-56k pullup on cs. no problem to flash it, hopefully as it's a custom board so it's soldered 🙂 i can't tell you for nrf.
    No radio init means bad connection. It can depend where cs pin is tied too, if it's a pin related to esp boot etc..
    For mine, if it can help, i have CS->GPIO2 and IRQ->GPIO15 (for nodemcu 1.0), then the defines

    #define MY_RF69_IRQ_PIN 15
    #define MY_RF69_SPI_CS 2
    #define MY_RF69_IRQ_NUM 15
    

    i hope this can help.


  • Mod

    @yoram said:

    I've tried 10k pull down on the CS, but it did not help.

    CS lines should be pulled up by default, as they're active low.
    Maybe this explains your issues?



  • Apparently there is an issue with the default CS (GPIO15)
    According to the board schematics documentation, it is already pulled down by 12k.
    It is expected to be low when the board init.
    For some reason when the NRF+ is connected it is running on high level.
    I overcome the problem by connecting the CS to D1 (GPIO5) instead and modified the MyConfig.h accordingly.
    Now I can init the board with no problem and the radio init properly every time.



  • Hi @yoram,

    I am experiencing the same issues, I was wondering if you could provide me with the details of the changes you made to the MyConfig.h when connecting CS to D1?

    Many thanks

    Andy


  • Mod

    Welcome to the MySensors community @Andrew-McInnes

    use

    #define MY_RF24_CS_PIN 5
    

    in your sketch before including MySensors.h

    Details: https://github.com/mysensors/MySensors/blob/8bb3cfb2e14214ae19e8531c989d1e81c9660614/MyConfig.h#L508


Log in to reply
 

Suggested Topics

  • 87
  • 1
  • 10
  • 5
  • 2
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts