Skip to content

Commit c8d034c

Browse files
HoZHelkartben
authored andcommitted
soc: stm32: stm32wb0x: Dedicate RAM section for BLE part
Dedicate RAM section on STM32WB0x for BLE part based on the number of radio tasks and device type. Signed-off-by: Ali Hozhabri <[email protected]>
1 parent 9e26341 commit c8d034c

File tree

1 file changed

+11
-0
lines changed
  • soc/st/stm32/stm32wb0x

1 file changed

+11
-0
lines changed

soc/st/stm32/stm32wb0x/soc.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,17 @@ uint32_t SystemCoreClock = 16000000U;
4141
Z_GENERIC_SECTION("stm32wb0_RAM_VR")
4242
__used RAM_VR_TypeDef RAM_VR;
4343

44+
#if defined(CONFIG_BT)
45+
/**
46+
* SRAM0 memory reserved for usage by the MR_BLE Radio hardware.
47+
*
48+
* N.B.: radio driver defines CFG_BLE_NUM_RADIO_TASKS.
49+
*/
50+
Z_GENERIC_SECTION("stm32wb0_BLUE_RAM")
51+
static uint8_t __used __blue_RAM[sizeof(GLOBALSTATMACH_TypeDef) +
52+
CFG_BLE_NUM_RADIO_TASKS * sizeof(STATMACH_TypeDef)];
53+
#endif /* CONFIG_BT */
54+
4455
/** Power Controller node (shorthand for upcoming macros) */
4556
#define PWRC DT_INST(0, st_stm32wb0_pwr)
4657

0 commit comments

Comments
 (0)