hello,
i am using nrf52840 dvk with sx1276 lora modules and trying to read my device address using spi i am just calling the below function in main
uint8_t spiCommandData[2];
uint8_t spiReadData[2];
static unsigned char RFM_Read()
{
unsigned char RFM_Data;
spiCommandData[0]=0x42 & 0x7f;
spiCommandData[1]=0;
nrf_gpio_pin_clear(SPI_SS_PIN);
nrf_drv_spi_transfer(&spi, ( uint8_t* )&spiCommandData, 2,( uint8_t* ) &spiReadData, 2);
nrf_gpio_pin_set(SPI_SS_PIN);
// rfm_spi_uninit();
return spiReadData[1];
}
is this correct method to use spi or AM i doing something wrong
thanks and regards
manikandan v