* arch/arm/include/stm32wb/chip.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __ARCH_ARM_INCLUDE_STM32WB_CHIP_H
#define __ARCH_ARM_INCLUDE_STM32WB_CHIP_H
* Included Files
****************************************************************************/
#include <nuttx/config.h>
* Pre-processor Prototypes
****************************************************************************/
#define STM32WB_NFSMC 0
#define STM32WB_NBTIM 0
#define STM32WB_NATIM 1
#define STM32WB_NGTIM32 1
#define STM32WB_NLPTIM 2
#define STM32WB_NGTIMNDMA 0
#if defined(CONFIG_STM32WB_STM32WB30) || defined(CONFIG_STM32WB_STM32WB50) \
|| defined(CONFIG_STM32WB_STM32WB35) || defined(CONFIG_STM32WB_STM32WB55)
# define STM32WB_NGTIM16 2
#else
# define STM32WB_NGTIM16 0
#endif
#if defined(CONFIG_STM32WB_STM32WB35) || defined(CONFIG_STM32WB_STM32WB55)
# define STM32WB_NDMA 2
# define STM32WB_NI2S 1
# define STM32WB_NI2C 2
# define STM32WB_NUSBOTG 1
# define STM32WB_NCMP 2
# if defined(CONFIG_STM32WB_IO_CONFIG_R) || defined(CONFIG_STM32WB_IO_CONFIG_V)
# define STM32WB_NSPI 3
# else
# define STM32WB_NSPI 2
# endif
#else
# define STM32WB_NDMA 1
# define STM32WB_NI2S 0
# define STM32WB_NI2C 1
# define STM32WB_NUSBOTG 0
# define STM32WB_NCMP 0
# define STM32WB_NSPI 1
#endif
#if defined(CONFIG_STM32WB_STM32WB15) || defined(CONFIG_STM32WB_STM32WB35) \
|| defined(CONFIG_STM32WB_STM32WB55)
# define STM32WB_NLPUART 1
#else
# define STM32WB_NLPUART 0
#endif
#if defined(CONFIG_STM32WB_IO_CONFIG_R) || defined(CONFIG_STM32WB_IO_CONFIG_V)
# define STM32WB_NCAPSENSE 18
#else
# define STM32WB_NCAPSENSE 0
#endif
#if defined(CONFIG_STM32WB_STM32WB55)
# define STM32WB_NLCD 1
* terminals, depending on subfamily.
* 55Cx: 4x13
* 55Rx: 4x28
* 55Vx: 4x44, 8x40 */
#else
# define STM32WB_NLCD 0
#endif
#define STM32WB_NUSART 1
#define STM32WB_NCAN 0
#define STM32WB_NSDIO 0
#define STM32WB_NADC 1
#define STM32WB_NDAC 0
#define STM32WB_NCRC 1
#define STM32WB_NETHERNET 0
#define STM32WB_NRNG 1
#define STM32WB_NDCMI 0
#if defined(CONFIG_STM32WB_IO_CONFIG_C)
# define STM32WB_NGPIO 30
#elif defined(CONFIG_STM32WB_IO_CONFIG_C_48E)
# define STM32WB_NGPIO 37
#elif defined(CONFIG_STM32WB_IO_CONFIG_C_49)
# define STM32WB_NGPIO 25
#elif defined(CONFIG_STM32WB_IO_CONFIG_R)
# define STM32WB_NGPIO 49
#elif defined(CONFIG_STM32WB_IO_CONFIG_V)
# define STM32WB_NGPIO 72
#else
# error "Unsupported STM32WB chip"
#endif
* 1) 12 KiB of SRAM1 beginning at address 0x2000:0000 - 0x2000:3000
* 2) 32 KiB of SRAM2a beginning at address 0x2003:0000 - 0x2003:8000
* 3) 4 KiB of SRAM2b beginning at address 0x2003:8000 - 0x2003:9000
*
* STM32WB3xxx have 96 Kib:
*
* 1) 32 KiB of SRAM1 beginning at address 0x2000:0000 - 0x2000:8000
* 2) 32 KiB of SRAM2a beginning at address 0x2003:0000 - 0x2003:8000
* 3) 32 KiB of SRAM2b beginning at address 0x2003:8000 - 0x2004:0000
*
* STM32WB50CG and STM32WB55xC have 128 Kib:
*
* 1) 64 KiB of SRAM1 beginning at address 0x2000:0000 - 0x2001:0000
* 2) 32 KiB of SRAM2a beginning at address 0x2003:0000 - 0x2003:8000
* 3) 32 KiB of SRAM2b beginning at address 0x2003:8000 - 0x2004:0000
*
* STM32WB55x[E,Y,G] have 256 Kib:
*
* 1) 192 KiB of SRAM1 beginning at address 0x2000:0000 - 0x2001:8000
* 2) 32 KiB of SRAM2a beginning at address 0x2003:0000 - 0x2003:8000
* 3) 32 KiB of SRAM2b beginning at address 0x2003:8000 - 0x2004:0000
*/
#if defined(CONFIG_STM32WB_STM32WB10) || defined(CONFIG_STM32WB_STM32WB15)
# define STM32WB_SRAM1_SIZE (12*1024)
# define STM32WB_SRAM2A_SIZE (32*1024)
# define STM32WB_SRAM2B_SIZE (4*1024)
#elif defined(CONFIG_STM32WB_STM32WB30) || defined(CONFIG_STM32WB_STM32WB35)
# define STM32WB_SRAM1_SIZE (32*1024)
# define STM32WB_SRAM2A_SIZE (32*1024)
# define STM32WB_SRAM2B_SIZE (32*1024)
#elif (defined(CONFIG_STM32WB_STM32WB50) || defined(CONFIG_STM32WB_STM32WB55)) \
&& defined(CONFIG_STM32WB_IO_CONFIG_C)
# define STM32WB_SRAM1_SIZE (64*1024)
# define STM32WB_SRAM2A_SIZE (32*1024)
# define STM32WB_SRAM2B_SIZE (32*1024)
#elif defined(CONFIG_STM32WB_STM32WB55) && \
(defined(CONFIG_STM32WB_IO_CONFIG_R) || defined(CONFIG_STM32WB_IO_CONFIG_V))
# define STM32WB_SRAM1_SIZE (192*1024)
# define STM32WB_SRAM2A_SIZE (32*1024)
# define STM32WB_SRAM2B_SIZE (32*1024)
#else
# error "Unsupported STM32WB chip"
#endif
#define NVIC_SYSH_PRIORITY_MIN 0xf0
#define NVIC_SYSH_PRIORITY_DEFAULT 0x80
#define NVIC_SYSH_PRIORITY_MAX 0x00
#define NVIC_SYSH_PRIORITY_STEP 0x10
#endif