Skip to content

Commit be0e1a1

Browse files
committed
fix(cc1101): the GDO0 and GDO2 was inverted, fixed
1 parent 6769998 commit be0e1a1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • firmware_p4/components/Drivers/cc1101

firmware_p4/components/Drivers/cc1101/cc1101.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ void cc1101_enable_async_mode(uint32_t freq_hz) {
463463

464464
// SmartRC defaults for ASK/OOK Async
465465
cc1101_write_reg(CC1101_FSCTRL1, 0x06);
466-
cc1101_write_reg(CC1101_IOCFG2, 0x0D); // Serial Data Output
467-
cc1101_write_reg(CC1101_IOCFG0, 0x2E); // High Impedance (GDO2 is used for RMT)
466+
cc1101_write_reg(CC1101_IOCFG0, 0x0D); // Serial Data Output (RX via GDO0/GPIO8)
467+
cc1101_write_reg(CC1101_IOCFG2, 0x2E); // High Impedance (GDO2 free for TX)
468468
cc1101_write_reg(CC1101_PKTCTRL0, 0x32); // Async mode, Infinite packet length
469469
cc1101_write_reg(CC1101_PKTCTRL1, 0x04); // No addr check
470470

@@ -501,7 +501,7 @@ void cc1101_enable_async_mode(uint32_t freq_hz) {
501501
cc1101_write_reg(CC1101_TEST1, 0x35);
502502
cc1101_write_reg(CC1101_TEST0, 0x09);
503503

504-
ESP_LOGI(TAG, "CC1101 configurado em Async Mode (GDO2 Active High)");
504+
ESP_LOGI(TAG, "CC1101 configurado em Async Mode (GDO0 Serial Out)");
505505
cc1101_strobe(CC1101_SRX);
506506
}
507507

@@ -515,8 +515,8 @@ void cc1101_enable_fsk_mode(uint32_t freq_hz) {
515515
vTaskDelay(pdMS_TO_TICKS(5));
516516

517517
cc1101_write_reg(CC1101_FSCTRL1, 0x06);
518-
cc1101_write_reg(CC1101_IOCFG2, 0x0D);
519-
cc1101_write_reg(CC1101_IOCFG0, 0x2E);
518+
cc1101_write_reg(CC1101_IOCFG0, 0x0D); // Serial Data Output (RX via GDO0/GPIO8)
519+
cc1101_write_reg(CC1101_IOCFG2, 0x2E); // High Impedance (GDO2 free for TX)
520520
cc1101_write_reg(CC1101_PKTCTRL0, 0x32);
521521
cc1101_write_reg(CC1101_PKTCTRL1, 0x04);
522522
cc1101_write_reg(CC1101_PKTLEN, 0x00);

0 commit comments

Comments
 (0)