2023-04-16 04:47 AM
However, when I ran the code on my custom board, I am not getting any data from the BLE. I am stuck at line hci_reset().
I initialized the SPI and BLE but when I ran the debegger, I did not reach the line before hci_reset(); when I set the interrupt to PULL UP the CS pin always remains in the LOW state and when I set it to NO PULL the CS pin always remains in the HGHT state.
I have attached my code below. Can anyone help me diagnose this problem?
static uint8_t Sensor_DeviceInit(void)
{
uint8_t ret;
//uint16_t service_handle, dev_name_char_handle, appearance_char_handle;
//uint8_t device_name[] = {SENSOR_DEMO_NAME};
uint8_t hwVersion;
uint16_t fwVersion;
uint8_t bdaddr_len_out;
uint8_t config_data_stored_static_random_address = 0x80;
//Sw reset of the device
static uint8_t Sensor_DeviceInit(void)
{
uint8_t ret;
//uint16_t service_handle, dev_name_char_handle, appearance_char_handle;
//uint8_t device_name[] = {SENSOR_DEMO_NAME};
uint8_t hwVersion;
uint16_t fwVersion;
uint8_t bdaddr_len_out;
uint8_t config_data_stored_static_random_address = 0x80;
//Sw reset of the device
hci_reset();
TIMER_IF_DelayMs(2000);
getBlueNRGVersion(&hwVersion, &fwVersion);
ret = aci_hal_read_config_data(config_data_stored_static_random_address,
&bdaddr_len_out, bdaddr);
return ret;
}();
TIMER_IF_DelayMs(2000);
getBlueNRGVersion(&hwVersion, &fwVersion);
ret = aci_hal_read_config_data(config_data_stored_static_random_address,
&bdaddr_len_out, bdaddr);
return ret;
}