Hi
I've been trying to get this module working but am having some trouble.
I'm not trying to do anything complicated. Just have it exit standby mode (which I assume is the default mode).
Then enter RX mode, and print whatever noise it manages to pick up (Just as a test).
So I'm leaving all values default and just changing the address register values that control the mode of operation which is 0x01 on the RFM95.
Is there anything wrong with my below code?
//Reset pin
HAL_GPIO_WritePin(GPIOH, GPIO_PIN_6, 0);
HAL_GPIO_WritePin(GPIOH, GPIO_PIN_6, 1);
HAL_GPIO_WritePin(GPIOH, GPIO_PIN_6, 0);
//Chip select pin pull down initially
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, 0);
//aTxBuffer is the data to be transmitted
//Send via SPI the register address to be written to
aTxBuffer = 0x01 | 0x80;
HAL_SPI_Transmit(&SpiHandle,&aTxBuffer, 8, 5000);
//Send via SPI the value to write to the previously sent register address
aTxBuffer = 0x05;
HAL_SPI_Transmit(&SpiHandle,&aTxBuffer, 8, 5000);
//Chip select pin high
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, 1);
HAL_Delay(5000);
//Chip select pin low
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, 0);
//Enter standby mode in preparation for receive
aTxBuffer = 0x01 | 0x80;
HAL_SPI_Transmit(&SpiHandle,&aTxBuffer, 8, 5000);
aTxBuffer = 0x01;
HAL_SPI_Transmit(&SpiHandle,&aTxBuffer, 8, 5000);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, 1);
//Standby mode has been entered
//Now receive