RFM69 ISM Transceiver driver for esp-idf.
I ported from this.
ESP-IDF V4.4/V5.x.
ESP-IDF V5.0 is required when using ESP32-C2.
ESP-IDF V5.1 is required when using ESP32-C6.
git clone https://github.com/nopnop2002/esp-idf-rf69
cd esp-idf-rf69
idf.py set-target {esp32/esp32s2/esp32s3/esp32c2/esp32c3/esp32c6}
idf.py menuconfig
idf.py flash
Note for ESP32C3
For some reason, there are development boards that cannot use GPIO06, GPIO08, GPIO09, GPIO19 for SPI clock pins.
According to the ESP32C3 specifications, these pins can also be used as SPI clocks.
I used a raw ESP-C3-13 to verify that these pins could be used as SPI clocks.
- Set TX power high
If you are using a high power RF69 such as the RFM69HW/RFM69HCW, you must to set the TX power high.
If you are using a not high power RF69 such as the RFM6W/RFM69CW, you don't need to set the TX power high.
The ESP32 series has three SPI BUSs.
SPI1_HOST is used for communication with Flash memory.
You can use SPI2_HOST and SPI3_HOST freely.
When you use SDSPI(SD Card via SPI), SDSPI uses SPI2_HOST BUS.
When using this module at the same time as SDSPI or other SPI device using SPI2_HOST, it needs to be changed to SPI3_HOST.
When you don't use SDSPI, both SPI2_HOST and SPI3_HOST will work.
Previously it was called HSPI_HOST / VSPI_HOST, but now it is called SPI2_HOST / SPI3_HOST.
RFM69 | ESP32 | ESP32-S2/S3 | ESP32-C2/C3/C6 | |
---|---|---|---|---|
MISO | -- | GPIO19 | GPIO37 | GPIO4 |
SCK | -- | GPIO18 | GPIO36 | GPIO3 |
MOSI | -- | GPIO23 | GPIO35 | GPIO2 |
NSS | -- | GPIO5 | GPIO34 | GPIO1 |
RESET | -- | GPIO16 | GPIO38 | GPIO0 |
GND | -- | GND | GND | GND |
VCC | -- | 3.3V | 3.3V | 3.3V |
You can change it to any pin using menuconfig.
The pinout of RFM69 is different for each model.
RFM69CW/HCW has the same foot pattern as ESP12.
Therefore, a pitch conversion PCB for ESP12 can be used.
RFM69W/HW does not have the same foot pattern as ESP12.
http://www.airspayce.com/mikem/arduino/RadioHead/classRH__RF69.html
Interrupts are not used in this project.
I used these example.
https://github.com/adafruit/RadioHead/tree/master/examples/feather/RadioHead69_RawDemo_RX
https://github.com/adafruit/RadioHead/tree/master/examples/feather/RadioHead69_RawDemo_TX
Wireing for ATmega328
#define RFM69_CS 4 // to NSS
#define RFM69_INT 3 // to DIO0
#define RFM69_RST 2 // to RESET
#define LED 13
Wireing for ESP8266
#define RFM69_CS 2 // to NSS
#define RFM69_INT 15 // to DIO0
#define RFM69_RST 16 // to RESET
#define LED 0