-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32WB: improve FLASH size #14692
STM32WB: improve FLASH size #14692
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
#include "bstream.h" | ||
#include "hci_mbed_os_adaptation.h" | ||
#include "mbed_trace.h" | ||
#include "platform/mbed_error.h" | ||
|
||
/* STM32WB include files */ | ||
#include "stm32wbxx_ll_ipcc.h" | ||
|
@@ -130,7 +131,8 @@ class HCIDriver : public CordioHCIDriver { | |
HciResetCmd(); | ||
} | ||
|
||
static uint8_t convert_db_to_tx_power_index(int8_t level_db) { | ||
static uint8_t convert_db_to_tx_power_index(int8_t level_db) | ||
{ | ||
const int8_t conversion[] = { | ||
-40, -21, -20, -19, | ||
-18, -16, -15, -14, | ||
|
@@ -151,7 +153,8 @@ class HCIDriver : public CordioHCIDriver { | |
return index; | ||
} | ||
|
||
virtual ble_error_t set_tx_power(int8_t level_db) { | ||
virtual ble_error_t set_tx_power(int8_t level_db) | ||
{ | ||
|
||
|
||
uint8_t buf[2]; | ||
|
@@ -480,10 +483,29 @@ class TransportDriver : public CordioHCITransportDriver { | |
WirelessFwInfo_t wireless_info_instance; | ||
WirelessFwInfo_t *p_wireless_info = &wireless_info_instance; | ||
if (SHCI_GetWirelessFwInfo(p_wireless_info) != SHCI_Success) { | ||
tr_info("SHCI_GetWirelessFwInfo error"); | ||
tr_error("SHCI_GetWirelessFwInfo error"); | ||
} else { | ||
// https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries | ||
// Be sure that you are using the latest BLE FW version | ||
tr_info("WIRELESS COPROCESSOR FW VERSION ID = %d.%d.%d", p_wireless_info->VersionMajor, p_wireless_info->VersionMinor, p_wireless_info->VersionSub); | ||
tr_info("WIRELESS COPROCESSOR FW STACK TYPE = %d", p_wireless_info->StackType); | ||
tr_info("WIRELESS COPROCESSOR FW STACK TYPE = %d (ROM size 0x%x)", p_wireless_info->StackType, MBED_ROM_SIZE); | ||
|
||
#if STM32WB55xx | ||
switch (p_wireless_info->StackType) { | ||
case INFO_STACK_TYPE_BLE_FULL: | ||
if (MBED_ROM_SIZE > 0xCA000) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not depends on the stack version ? The size in ROM is guaranteed to stay the same ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, if size is changing, test would need to add a version condition |
||
error("Wrong MBED_ROM_SIZE with BLE FW\n"); | ||
} | ||
break; | ||
case INFO_STACK_TYPE_BLE_HCI: | ||
if (MBED_ROM_SIZE > 0xE0000) { | ||
error("Wrong MBED_ROM_SIZE with HCI FW\n"); | ||
} | ||
break; | ||
default: | ||
tr_error("StackType %u not expected\n", p_wireless_info->StackType); | ||
} | ||
#endif | ||
} | ||
} | ||
} | ||
|
@@ -532,7 +554,7 @@ class TransportDriver : public CordioHCITransportDriver { | |
/* At this stage, we'll need to wait for ready event, | ||
* passed thru TL_SYS_EvtReceived */ | ||
if (!sysevt_wait()) { | ||
tr_info("ERROR booting WB controler"); | ||
error("ERROR booting WB controler\n"); | ||
return; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this part of code limited to WB55xx (not applicable at other derivatives ? )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, for coming STM32WB15 for ex, only HCI FW will be supported, and FW size is different