Why my BlueNRG-MS/SPBTLE-RF chip in not initializing/does not communicate with STM32L073RZ MCU?
Hello,
In a working "version 1" of a cutom PCB, I used a SPBTLE-RF chip to communicate with my STM32 MCU.
MOSI, MISO, CLK, RST, and IRQ pins are wired to the MCU. RST is materially pulled-up, and IRQ is materially pulled-down. MOSI, MISO, CLK are configured as SPI bus lines in the ioc file, while RST and IRQ are materially wired but let as Reset_State pins (means high impedance?) in the ioc file so never used nor configurated in the code.
In my actual "version 2" of my custom PCB, MOSI, MISO, CLK, are wired to the MCU. RST and IRQ are notmaterially wired to the MCU anymore. BLE_RST remains materially pulled-up with same resistor value (10kOhms), and BLE_IRQ is materially pulled-down (10kOhms). The SPI initialization pins in the ioc files are exactly the same (data bits, baud rate...) in both version.
Issue : I cannot initialize the BLE chip.
I tried :
1. solder the BLE_RST to the MCU and set the pin in the ioc as GPIO output 0 default value. then, wait for the power supply to be stable, wait for all the peripherals to be initialized, then software toggle the ble reset pin and finally initialize the BLE.
Result : BLE still not initialized.
BLE_init function is as :
/* Initialize the BlueNRG HCI */
hci_init(user_notify, NULL);
/* get the BlueNRG HW and FW versions */
getBlueNRGVersion(&hwVersion, &fwVersion);
/*
* Reset BlueNRG SPI interface again otherwise we won't
* be able to change its MAC address.
* aci_hal_write_config_data() must be the first
* command after reset otherwise it will fail.
*/
hci_reset();
and inside getBlueNRGVersion there is status = hci_le_read_local_version(&hci_version, &hci_revision, &lmp_pal_version, &manufacturer_name, &lmp_pal_subversion); and the status is BLE_TIMEOUT, not BLE_SUCCESS.
Observation : when RST becomes high, IRQ becomes high (means data event from BLE chip is ready), CLK becomes low (ready for communication). But then CLK never high up again...
I could try to wire IRQ pin, but as the version 1 of my custom PCB works with IRQ pin let in Reset State in the ioc file, I don't know what to add in my firmware once it will be wired?
Any help would be greatly appreciated,
Thank you!
Chloé
