Skip to main content
Associate II
May 11, 2026
Question

STM32L011G4U6 + RFM69HCW

  • May 11, 2026
  • 1 reply
  • 93 views

Hello everyone, I have a custom PCB with an RFM69HCW and an STM32L011G4U6, I'm stuck, transmission and reception work fine, but if I want to add an ID, it gets stuck, here are my two INI files, sorry for my English.

 

void RFM69_Init_RX(void) {
 uart_print("=== RFM69 CAPOT RX INIT (868MHz) ===\r\n");

 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
 HAL_Delay(10);
 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
 HAL_Delay(50);

 RFM69_WriteReg(0x01, 0x04); // Standby
 HAL_Delay(10);

 // === Fréquence 868 MHz ===
 RFM69_WriteReg(0x07, 0xD9);
 RFM69_WriteReg(0x08, 0x00);
 RFM69_WriteReg(0x09, 0x00);

 RFM69_WriteReg(0x11, 0x7F); // Puissance max

 // Configuration Paquet
 RFM69_WriteReg(0x02, 0x00); // Packet mode
 RFM69_WriteReg(0x03, 0x1A);
 RFM69_WriteReg(0x04, 0x0B);

 RFM69_WriteReg(0x2F, 0xAA); // Sync Word
 RFM69_WriteReg(0x30, 0x55);

 RFM69_WriteReg(0x37, 0x00); // Pas d'adressage

 RFM69_WriteReg(0x38, 9); // Payload Length = 8 octets (suffisant pour "arm" et "off")

 RFM69_WriteReg(0x3C, 0x80); // Clear FIFO
 RFM69_WriteReg(0x01, 0x10); // Mode RX

 uart_print("CAPOT RX READY - En écoute (arm/off)\r\n");
}
and : void RFM69_Init_TX(void) {
 uart_print("=== RFM69 TELECOMMANDE INIT (868MHz) ===\r\n");

 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
 HAL_Delay(10);
 HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
 HAL_Delay(50);

 RFM69_WriteReg(0x01, 0x04); // Standby
 HAL_Delay(10);

 // === Fréquence 868 MHz ===
 RFM69_WriteReg(0x07, 0xD9);
 RFM69_WriteReg(0x08, 0x00);
 RFM69_WriteReg(0x09, 0x00);

 RFM69_WriteReg(0x11, 0x7F); // Puissance maximale

 RFM69_WriteReg(0x02, 0x00); // Packet mode
 RFM69_WriteReg(0x03, 0x1A); // Bitrate
 RFM69_WriteReg(0x04, 0x0B);

 RFM69_WriteReg(0x2F, 0xAA); // Sync Word
 RFM69_WriteReg(0x30, 0x55);

 RFM69_WriteReg(0x37, 0x00); // Pas d'adressage

 RFM69_WriteReg(0x38, 8); // Payload Length max (on met 8, c'est suffisant pour "arm" et "off")





 uart_print("TELECOMMANDE RFM69 Initialized\r\n");
}

1 reply

Andrew Neil
Super User
May 12, 2026

@fanfan6966 wrote:

I have a custom PCB

You'll need to show the schematic, then - see: How to write your question to maximize your chances to find a solution

 


@fanfan6966 wrote:

with an RFM69HCW

You mean this: https://www.hoperf.com/modules/rf_transceiver/RFM69HCW.html ?

That's not an ST product, so you need to go to HopeRF for support with that:

https://www.hoperf.com/contact/

 


 wrote:

transmission and reception work fine


So your basic comms & connections must be OK; therefore unlikely to be anything to do with the STM32 itself.

 


@fanfan6966 wrote:

 if I want to add an ID, it gets stuck,


What, exactly, does "stuck" mean here ?

Where, exactly, does it get "stuck" ?

What debugging have you done to find why it's "stuck" ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate II
May 12, 2026

Hello, I know the problem isn't the STM32. When I say it's blocked, it has nothing to do with the STM32, but rather the code. By adding an ID, I no longer have any communication. The manufacturer doesn't respond, nor does their help site. I just thought that someone had probably programmed this type of module using STM32.