2024-02-06 10:41 AM
Hi all. New to embedded programming, but I've worked in C before.
I'm working on a project that involves transmitting between two boards using S2-LP transceivers. The hardware setup is:
- NUCLEO board (STM32L053R8) with built in STLINK
- STEVAL-FK433v2 evaluation board attached
I'm using the X-CUBE SUBG2 package to interface with the S2-LP, but it isn't working at all - I can't read/write registers or the FIFO buffers. I am using the "Custom S2-LP" option because there isn't an available preset. The program builds without errors and launches in debug mode fine, but doesn't actually seem to execute anything. Any and all advice appreciated.
Here's a snippet of the read code that's supposed to read in from the FIFO buffer:
S2LP_SendCommand(CMD_RX);
// light up LED to indicate RX mode
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
// wait for push button to be pressed to start transmission
while(HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_13)){}
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET);
// read from the FIFO buffer
S2LP_ReadFIFO(10, (uint8_t *)RX_FIFO_buffer);