diff --git a/bsp/microchip/README.md b/bsp/microchip/README.md index 23aafff20e1c4a0b80344db4d7bf6c2c8e97be54..b812216577fb8a908ca4eb8994ab2fddd31d087b 100644 --- a/bsp/microchip/README.md +++ b/bsp/microchip/README.md @@ -2,6 +2,10 @@ Supported Microchip SAM (ARM Cortex-Mx Core) MCU is as following: +## ARM Cortex-M23 Series +- saml10 | 3.3V Cortex-M23 with ultra low power +- saml11 | 3.3V Cortex-M23 with ultra low power and trust-zone + ## ARM Cortex-M0+ Series - samc21 | 5V Cortex-M0+ with 2 CAN-FD support - saml21 | 3.3V low power Cortex-M0+ diff --git a/bsp/microchip/common/applications/adc_demo.c b/bsp/microchip/common/applications/adc_demo.c index 900719f97eba99e6f69933f9913e43fb9d6288fb..156c31088fcc728a61b08524c9a32bca685e6fbe 100644 --- a/bsp/microchip/common/applications/adc_demo.c +++ b/bsp/microchip/common/applications/adc_demo.c @@ -16,7 +16,7 @@ #ifdef SAM_ADC_EXAMPLE -#if defined(SOC_SAMC21) +#if defined(SOC_SAMC21) || defined(SOC_SAML10) #define ADC_RESOLUTION_12BIT ADC_CTRLC_RESSEL_12BIT_Val #define ADC_RESOLUTION_16BIT ADC_CTRLC_RESSEL_16BIT_Val #elif defined(SOC_SAME54) diff --git a/bsp/microchip/samc21/rtconfig.py b/bsp/microchip/samc21/rtconfig.py index 23ed9c87e289f85535514626e7992d622ce98e14..61d50ab753fc69ff3643a3dcbd37bc053c4cc81e 100644 --- a/bsp/microchip/samc21/rtconfig.py +++ b/bsp/microchip/samc21/rtconfig.py @@ -49,7 +49,7 @@ if PLATFORM == 'gcc': DEVICE = ' -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -mlong-calls' CFLAGS = DEVICE + ' -Dgcc' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' - LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T bsp/samc21/gcc/gcc/samc21j18a_flash.ld' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread-' + DEVICE_PART + '.map,-cref,-u,Reset_Handler -T bsp/samc21/gcc/gcc/samc21j18a_flash.ld' CPATH = '' LPATH = '' @@ -63,5 +63,5 @@ if PLATFORM == 'gcc': CXXFLAGS = CFLAGS CFLAGS += ' -std=c99' - POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + POST_ACTION = OBJCPY + ' -O binary $TARGET rt-thread-' + DEVICE_PART + '.bin\n' + SIZE + ' $TARGET \n' diff --git a/bsp/microchip/same54/bsp/stdio_start.c b/bsp/microchip/same54/bsp/stdio_start.c deleted file mode 100644 index db8d3625e576b3cdec9c00c1157f8ea6a115cef4..0000000000000000000000000000000000000000 --- a/bsp/microchip/same54/bsp/stdio_start.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file or main.c - * to avoid loosing it when reconfiguring. - */ - -#include "atmel_start.h" -#include "stdio_start.h" - -void STDIO_REDIRECT_0_example(void) -{ - /* Print welcome message */ - printf("\r\nHello ATMEL World!\r\n"); -} - -void stdio_redirect_init(void) -{ - - usart_sync_enable(&TARGET_IO); - stdio_io_init(&TARGET_IO.io); -} diff --git a/bsp/microchip/same54/bsp/stdio_start.h b/bsp/microchip/same54/bsp/stdio_start.h deleted file mode 100644 index bee5325be1991fd6effd23422ff298af8bd08262..0000000000000000000000000000000000000000 --- a/bsp/microchip/same54/bsp/stdio_start.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Code generated from Atmel Start. - * - * This file will be overwritten when reconfiguring your Atmel Start project. - * Please copy examples or other code you want to keep to a separate file or main.c - * to avoid loosing it when reconfiguring. - */ -#ifndef STDIO_MAIN_H -#define STDIO_MAIN_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include - -#include -#include - -void STDIO_REDIRECT_0_example(void); - -/** - * \brief Initialize STDIO Redirect - */ -void stdio_redirect_init(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* STDIO_MAIN_H */ diff --git a/bsp/microchip/same54/rtconfig.py b/bsp/microchip/same54/rtconfig.py index 289cea31edff4edc43365cd84ff5241e58dd4eee..61f9e4cc1a74a7c170ae93bbe3bc1eb9822dcc75 100644 --- a/bsp/microchip/same54/rtconfig.py +++ b/bsp/microchip/same54/rtconfig.py @@ -51,7 +51,7 @@ if PLATFORM == 'gcc': DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -mlong-calls' CFLAGS = DEVICE + ' -Dgcc' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' - LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T bsp/gcc/gcc/same54p20a_flash.ld' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread-' + DEVICE_PART + '.map,-cref,-u,Reset_Handler -T bsp/gcc/gcc/same54p20a_flash.ld' CPATH = '' LPATH = '' @@ -65,5 +65,5 @@ if PLATFORM == 'gcc': CXXFLAGS = CFLAGS CFLAGS += ' -std=c99' - POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + POST_ACTION = OBJCPY + ' -O binary $TARGET rt-thread-' + DEVICE_PART + '.bin\n' + SIZE + ' $TARGET \n' diff --git a/bsp/microchip/same70/rtconfig.py b/bsp/microchip/same70/rtconfig.py index 8fbfc8dfb4dd5db422102d345a9f78aac4ddb8af..be5cf773d599b3181b0dbd3090e3fa44ef42c5a3 100644 --- a/bsp/microchip/same70/rtconfig.py +++ b/bsp/microchip/same70/rtconfig.py @@ -51,7 +51,7 @@ if PLATFORM == 'gcc': DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -mlong-calls' CFLAGS = DEVICE + ' -Dgcc' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' - LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T bsp/same70b/gcc/gcc/same70q21b_flash.ld' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread-' + DEVICE_PART + '.map,-cref,-u,Reset_Handler -T bsp/same70b/gcc/gcc/same70q21b_flash.ld' CPATH = '' LPATH = '' @@ -65,5 +65,5 @@ if PLATFORM == 'gcc': CXXFLAGS = CFLAGS CFLAGS += ' -std=c99' - POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + POST_ACTION = OBJCPY + ' -O binary $TARGET rt-thread-' + DEVICE_PART + '.bin\n' + SIZE + ' $TARGET \n' diff --git a/bsp/microchip/saml10/.config b/bsp/microchip/saml10/.config new file mode 100644 index 0000000000000000000000000000000000000000..c14c47c50b3f727ebe0e3ee5daac47b91af748ac --- /dev/null +++ b/bsp/microchip/saml10/.config @@ -0,0 +1,654 @@ +# +# Automatically generated file; DO NOT EDIT. +# RT-Thread Configuration +# + +# +# RT-Thread Kernel +# +CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_ARCH_DATA_TYPE is not set +# CONFIG_RT_USING_SMP is not set +CONFIG_RT_ALIGN_SIZE=4 +# CONFIG_RT_THREAD_PRIORITY_8 is not set +CONFIG_RT_THREAD_PRIORITY_32=y +# CONFIG_RT_THREAD_PRIORITY_256 is not set +CONFIG_RT_THREAD_PRIORITY_MAX=32 +CONFIG_RT_TICK_PER_SECOND=200 +CONFIG_RT_USING_OVERFLOW_CHECK=y +CONFIG_RT_USING_HOOK=y +CONFIG_RT_HOOK_USING_FUNC_PTR=y +CONFIG_RT_USING_IDLE_HOOK=y +CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 +CONFIG_IDLE_THREAD_STACK_SIZE=256 +# CONFIG_RT_USING_TIMER_SOFT is not set + +# +# kservice optimization +# +# CONFIG_RT_KSERVICE_USING_STDLIB is not set +# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set +# CONFIG_RT_USING_TINY_FFS is not set +# CONFIG_RT_PRINTF_LONGLONG is not set +CONFIG_RT_DEBUG=y +# CONFIG_RT_DEBUG_COLOR is not set +# CONFIG_RT_DEBUG_INIT_CONFIG is not set +# CONFIG_RT_DEBUG_THREAD_CONFIG is not set +# CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set +# CONFIG_RT_DEBUG_IPC_CONFIG is not set +# CONFIG_RT_DEBUG_TIMER_CONFIG is not set +# CONFIG_RT_DEBUG_IRQ_CONFIG is not set +# CONFIG_RT_DEBUG_MEM_CONFIG is not set +# CONFIG_RT_DEBUG_SLAB_CONFIG is not set +# CONFIG_RT_DEBUG_MEMHEAP_CONFIG is not set +# CONFIG_RT_DEBUG_MODULE_CONFIG is not set + +# +# Inter-Thread communication +# +CONFIG_RT_USING_SEMAPHORE=y +CONFIG_RT_USING_MUTEX=y +CONFIG_RT_USING_EVENT=y +CONFIG_RT_USING_MAILBOX=y +CONFIG_RT_USING_MESSAGEQUEUE=y +# CONFIG_RT_USING_SIGNALS is not set + +# +# Memory Management +# +CONFIG_RT_USING_MEMPOOL=y +CONFIG_RT_USING_SMALL_MEM=y +# CONFIG_RT_USING_SLAB is not set +# CONFIG_RT_USING_MEMHEAP is not set +CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y +# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set +# CONFIG_RT_USING_SLAB_AS_HEAP is not set +# CONFIG_RT_USING_USERHEAP is not set +# CONFIG_RT_USING_NOHEAP is not set +# CONFIG_RT_USING_MEMTRACE is not set +# CONFIG_RT_USING_HEAP_ISR is not set +CONFIG_RT_USING_HEAP=y + +# +# Kernel Device Object +# +CONFIG_RT_USING_DEVICE=y +# CONFIG_RT_USING_DEVICE_OPS is not set +# CONFIG_RT_USING_INTERRUPT_INFO is not set +CONFIG_RT_USING_CONSOLE=y +CONFIG_RT_CONSOLEBUF_SIZE=128 +CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" +CONFIG_RT_VER_NUM=0x40100 +CONFIG_ARCH_ARM=y +# CONFIG_RT_USING_CPU_FFS is not set +CONFIG_ARCH_ARM_CORTEX_M=y +# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set + +# +# RT-Thread Components +# +CONFIG_RT_USING_COMPONENTS_INIT=y +CONFIG_RT_USING_USER_MAIN=y +CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048 +CONFIG_RT_MAIN_THREAD_PRIORITY=10 +# CONFIG_RT_USING_LEGACY is not set +# CONFIG_RT_USING_MSH is not set +# CONFIG_RT_USING_DFS is not set +# CONFIG_RT_USING_FAL is not set +# CONFIG_RT_USING_LWP is not set + +# +# Device Drivers +# +CONFIG_RT_USING_DEVICE_IPC=y +CONFIG_RT_USING_SYSTEM_WORKQUEUE=y +CONFIG_RT_SYSTEM_WORKQUEUE_STACKSIZE=2048 +CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23 +CONFIG_RT_USING_SERIAL=y +CONFIG_RT_USING_SERIAL_V1=y +# CONFIG_RT_USING_SERIAL_V2 is not set +CONFIG_RT_SERIAL_USING_DMA=y +CONFIG_RT_SERIAL_RB_BUFSZ=64 +# CONFIG_RT_USING_CAN is not set +# CONFIG_RT_USING_HWTIMER is not set +# CONFIG_RT_USING_CPUTIME is not set +CONFIG_RT_USING_I2C=y +# CONFIG_RT_I2C_DEBUG is not set +# CONFIG_RT_USING_I2C_BITOPS is not set +# CONFIG_RT_USING_PHY is not set +# CONFIG_RT_USING_PIN is not set +# CONFIG_RT_USING_ADC is not set +# CONFIG_RT_USING_DAC is not set +# CONFIG_RT_USING_PWM is not set +# CONFIG_RT_USING_MTD_NOR is not set +# CONFIG_RT_USING_MTD_NAND is not set +# CONFIG_RT_USING_PM is not set +# CONFIG_RT_USING_RTC is not set +# CONFIG_RT_USING_SDIO is not set +# CONFIG_RT_USING_SPI is not set +# CONFIG_RT_USING_WDT is not set +# CONFIG_RT_USING_AUDIO is not set +# CONFIG_RT_USING_SENSOR is not set +# CONFIG_RT_USING_TOUCH is not set +# CONFIG_RT_USING_HWCRYPTO is not set +# CONFIG_RT_USING_PULSE_ENCODER is not set +# CONFIG_RT_USING_INPUT_CAPTURE is not set +# CONFIG_RT_USING_WIFI is not set + +# +# Using USB +# +# CONFIG_RT_USING_USB is not set +# CONFIG_RT_USING_USB_HOST is not set +# CONFIG_RT_USING_USB_DEVICE is not set + +# +# C/C++ and POSIX layer +# +CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 + +# +# POSIX (Portable Operating System Interface) layer +# +# CONFIG_RT_USING_POSIX_FS is not set +# CONFIG_RT_USING_POSIX_DELAY is not set +# CONFIG_RT_USING_POSIX_CLOCK is not set +# CONFIG_RT_USING_POSIX_TIMER is not set +# CONFIG_RT_USING_PTHREADS is not set +# CONFIG_RT_USING_MODULE is not set + +# +# Interprocess Communication (IPC) +# +# CONFIG_RT_USING_POSIX_PIPE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set +# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set + +# +# Socket is in the 'Network' category +# +# CONFIG_RT_USING_CPLUSPLUS is not set + +# +# Network +# +# CONFIG_RT_USING_SAL is not set +# CONFIG_RT_USING_NETDEV is not set +# CONFIG_RT_USING_LWIP is not set +# CONFIG_RT_USING_AT is not set + +# +# Utilities +# +# CONFIG_RT_USING_RYM is not set +# CONFIG_RT_USING_ULOG is not set +# CONFIG_RT_USING_UTEST is not set +# CONFIG_RT_USING_VAR_EXPORT is not set +# CONFIG_RT_USING_RT_LINK is not set +# CONFIG_RT_USING_VBUS is not set + +# +# RT-Thread Utestcases +# +# CONFIG_RT_USING_UTESTCASES is not set + +# +# RT-Thread online packages +# + +# +# IoT - internet of things +# +# CONFIG_PKG_USING_LWIP is not set +# CONFIG_PKG_USING_LORAWAN_DRIVER is not set +# CONFIG_PKG_USING_PAHOMQTT is not set +# CONFIG_PKG_USING_UMQTT is not set +# CONFIG_PKG_USING_WEBCLIENT is not set +# CONFIG_PKG_USING_WEBNET is not set +# CONFIG_PKG_USING_MONGOOSE is not set +# CONFIG_PKG_USING_MYMQTT is not set +# CONFIG_PKG_USING_KAWAII_MQTT is not set +# CONFIG_PKG_USING_BC28_MQTT is not set +# CONFIG_PKG_USING_WEBTERMINAL is not set +# CONFIG_PKG_USING_LIBMODBUS is not set +# CONFIG_PKG_USING_FREEMODBUS is not set +# CONFIG_PKG_USING_NANOPB is not set + +# +# Wi-Fi +# + +# +# Marvell WiFi +# +# CONFIG_PKG_USING_WLANMARVELL is not set + +# +# Wiced WiFi +# +# CONFIG_PKG_USING_WLAN_WICED is not set +# CONFIG_PKG_USING_RW007 is not set +# CONFIG_PKG_USING_COAP is not set +# CONFIG_PKG_USING_NOPOLL is not set +# CONFIG_PKG_USING_NETUTILS is not set +# CONFIG_PKG_USING_CMUX is not set +# CONFIG_PKG_USING_PPP_DEVICE is not set +# CONFIG_PKG_USING_AT_DEVICE is not set +# CONFIG_PKG_USING_ATSRV_SOCKET is not set +# CONFIG_PKG_USING_WIZNET is not set +# CONFIG_PKG_USING_ZB_COORDINATOR is not set + +# +# IoT Cloud +# +# CONFIG_PKG_USING_ONENET is not set +# CONFIG_PKG_USING_GAGENT_CLOUD is not set +# CONFIG_PKG_USING_ALI_IOTKIT is not set +# CONFIG_PKG_USING_AZURE is not set +# CONFIG_PKG_USING_TENCENT_IOT_EXPLORER is not set +# CONFIG_PKG_USING_JIOT-C-SDK is not set +# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set +# CONFIG_PKG_USING_JOYLINK is not set +# CONFIG_PKG_USING_EZ_IOT_OS is not set +# CONFIG_PKG_USING_NIMBLE is not set +# CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set +# CONFIG_PKG_USING_OTA_DOWNLOADER is not set +# CONFIG_PKG_USING_IPMSG is not set +# CONFIG_PKG_USING_LSSDP is not set +# CONFIG_PKG_USING_AIRKISS_OPEN is not set +# CONFIG_PKG_USING_LIBRWS is not set +# CONFIG_PKG_USING_TCPSERVER is not set +# CONFIG_PKG_USING_PROTOBUF_C is not set +# CONFIG_PKG_USING_DLT645 is not set +# CONFIG_PKG_USING_QXWZ is not set +# CONFIG_PKG_USING_SMTP_CLIENT is not set +# CONFIG_PKG_USING_ABUP_FOTA is not set +# CONFIG_PKG_USING_LIBCURL2RTT is not set +# CONFIG_PKG_USING_CAPNP is not set +# CONFIG_PKG_USING_AGILE_TELNET is not set +# CONFIG_PKG_USING_NMEALIB is not set +# CONFIG_PKG_USING_PDULIB is not set +# CONFIG_PKG_USING_BTSTACK is not set +# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set +# CONFIG_PKG_USING_WAYZ_IOTKIT is not set +# CONFIG_PKG_USING_MAVLINK is not set +# CONFIG_PKG_USING_BSAL is not set +# CONFIG_PKG_USING_AGILE_MODBUS is not set +# CONFIG_PKG_USING_AGILE_FTP is not set +# CONFIG_PKG_USING_EMBEDDEDPROTO is not set +# CONFIG_PKG_USING_RT_LINK_HW is not set +# CONFIG_PKG_USING_LORA_PKT_FWD is not set +# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set +# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set +# CONFIG_PKG_USING_HM is not set +# CONFIG_PKG_USING_SMALL_MODBUS is not set +# CONFIG_PKG_USING_NET_SERVER is not set + +# +# security packages +# +# CONFIG_PKG_USING_MBEDTLS is not set +# CONFIG_PKG_USING_LIBSODIUM is not set +# CONFIG_PKG_USING_TINYCRYPT is not set +# CONFIG_PKG_USING_TFM is not set +# CONFIG_PKG_USING_YD_CRYPTO is not set + +# +# language packages +# + +# +# JSON: JavaScript Object Notation, a lightweight data-interchange format +# +# CONFIG_PKG_USING_CJSON is not set +# CONFIG_PKG_USING_LJSON is not set +# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set +# CONFIG_PKG_USING_RAPIDJSON is not set +# CONFIG_PKG_USING_JSMN is not set +# CONFIG_PKG_USING_AGILE_JSMN is not set + +# +# XML: Extensible Markup Language +# +# CONFIG_PKG_USING_SIMPLE_XML is not set +# CONFIG_PKG_USING_EZXML is not set +# CONFIG_PKG_USING_LUATOS_SOC is not set +# CONFIG_PKG_USING_LUA is not set +# CONFIG_PKG_USING_JERRYSCRIPT is not set +# CONFIG_PKG_USING_MICROPYTHON is not set +# CONFIG_PKG_USING_PIKASCRIPT is not set + +# +# multimedia packages +# + +# +# LVGL: powerful and easy-to-use embedded GUI library +# +# CONFIG_PKG_USING_LVGL is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set +# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set + +# +# u8g2: a monochrome graphic library +# +# CONFIG_PKG_USING_U8G2_OFFICIAL is not set +# CONFIG_PKG_USING_U8G2 is not set +# CONFIG_PKG_USING_OPENMV is not set +# CONFIG_PKG_USING_MUPDF is not set +# CONFIG_PKG_USING_STEMWIN is not set +# CONFIG_PKG_USING_WAVPLAYER is not set +# CONFIG_PKG_USING_TJPGD is not set +# CONFIG_PKG_USING_PDFGEN is not set +# CONFIG_PKG_USING_HELIX is not set +# CONFIG_PKG_USING_AZUREGUIX is not set +# CONFIG_PKG_USING_TOUCHGFX2RTT is not set +# CONFIG_PKG_USING_NUEMWIN is not set +# CONFIG_PKG_USING_MP3PLAYER is not set +# CONFIG_PKG_USING_TINYJPEG is not set +# CONFIG_PKG_USING_UGUI is not set + +# +# PainterEngine: A cross-platform graphics application framework written in C language +# +# CONFIG_PKG_USING_PAINTERENGINE is not set +# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set +# CONFIG_PKG_USING_MCURSES is not set +# CONFIG_PKG_USING_TERMBOX is not set +# CONFIG_PKG_USING_VT100 is not set +# CONFIG_PKG_USING_QRCODE is not set +# CONFIG_PKG_USING_GUIENGINE is not set + +# +# tools packages +# +# CONFIG_PKG_USING_CMBACKTRACE is not set +# CONFIG_PKG_USING_EASYFLASH is not set +# CONFIG_PKG_USING_EASYLOGGER is not set +# CONFIG_PKG_USING_SYSTEMVIEW is not set +# CONFIG_PKG_USING_SEGGER_RTT is not set +# CONFIG_PKG_USING_RDB is not set +# CONFIG_PKG_USING_ULOG_EASYFLASH is not set +# CONFIG_PKG_USING_ULOG_FILE is not set +# CONFIG_PKG_USING_LOGMGR is not set +# CONFIG_PKG_USING_ADBD is not set +# CONFIG_PKG_USING_COREMARK is not set +# CONFIG_PKG_USING_DHRYSTONE is not set +# CONFIG_PKG_USING_MEMORYPERF is not set +# CONFIG_PKG_USING_NR_MICRO_SHELL is not set +# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set +# CONFIG_PKG_USING_LUNAR_CALENDAR is not set +# CONFIG_PKG_USING_BS8116A is not set +# CONFIG_PKG_USING_GPS_RMC is not set +# CONFIG_PKG_USING_URLENCODE is not set +# CONFIG_PKG_USING_UMCN is not set +# CONFIG_PKG_USING_LWRB2RTT is not set +# CONFIG_PKG_USING_CPU_USAGE is not set +# CONFIG_PKG_USING_GBK2UTF8 is not set +# CONFIG_PKG_USING_VCONSOLE is not set +# CONFIG_PKG_USING_KDB is not set +# CONFIG_PKG_USING_WAMR is not set +# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set +# CONFIG_PKG_USING_LWLOG is not set +# CONFIG_PKG_USING_ANV_TRACE is not set +# CONFIG_PKG_USING_ANV_MEMLEAK is not set +# CONFIG_PKG_USING_ANV_TESTSUIT is not set +# CONFIG_PKG_USING_ANV_BENCH is not set +# CONFIG_PKG_USING_DEVMEM is not set +# CONFIG_PKG_USING_REGEX is not set +# CONFIG_PKG_USING_MEM_SANDBOX is not set +# CONFIG_PKG_USING_SOLAR_TERMS is not set +# CONFIG_PKG_USING_GAN_ZHI is not set +# CONFIG_PKG_USING_FDT is not set +# CONFIG_PKG_USING_CBOX is not set +# CONFIG_PKG_USING_SNOWFLAKE is not set + +# +# system packages +# + +# +# enhanced kernel services +# +# CONFIG_PKG_USING_RT_MEMCPY_CM is not set +# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set + +# +# POSIX extension functions +# +# CONFIG_PKG_USING_POSIX_GETLINE is not set +# CONFIG_PKG_USING_POSIX_WCWIDTH is not set +# CONFIG_PKG_USING_POSIX_ITOA is not set +# CONFIG_PKG_USING_POSIX_STRINGS is not set + +# +# acceleration: Assembly language or algorithmic acceleration packages +# +# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set +# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set +# CONFIG_PKG_USING_QFPLIB_M3 is not set + +# +# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard +# +# CONFIG_PKG_USING_CMSIS_5 is not set +# CONFIG_PKG_USING_CMSIS_RTOS2 is not set + +# +# Micrium: Micrium software products porting for RT-Thread +# +# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set +# CONFIG_PKG_USING_UCOSII_WRAPPER is not set +# CONFIG_PKG_USING_UC_CRC is not set +# CONFIG_PKG_USING_UC_CLK is not set +# CONFIG_PKG_USING_UC_COMMON is not set +# CONFIG_PKG_USING_UC_MODBUS is not set +# CONFIG_PKG_USING_RTDUINO is not set +# CONFIG_PKG_USING_CAIRO is not set +# CONFIG_PKG_USING_PIXMAN is not set +# CONFIG_PKG_USING_PARTITION is not set +# CONFIG_PKG_USING_FLASHDB is not set +# CONFIG_PKG_USING_SQLITE is not set +# CONFIG_PKG_USING_RTI is not set +# CONFIG_PKG_USING_DFS_YAFFS is not set +# CONFIG_PKG_USING_LITTLEFS is not set +# CONFIG_PKG_USING_DFS_JFFS2 is not set +# CONFIG_PKG_USING_DFS_UFFS is not set +# CONFIG_PKG_USING_LWEXT4 is not set +# CONFIG_PKG_USING_THREAD_POOL is not set +# CONFIG_PKG_USING_ROBOTS is not set +# CONFIG_PKG_USING_EV is not set +# CONFIG_PKG_USING_SYSWATCH is not set +# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set +# CONFIG_PKG_USING_PLCCORE is not set +# CONFIG_PKG_USING_RAMDISK is not set +# CONFIG_PKG_USING_MININI is not set +# CONFIG_PKG_USING_QBOOT is not set +# CONFIG_PKG_USING_PPOOL is not set +# CONFIG_PKG_USING_OPENAMP is not set +# CONFIG_PKG_USING_LPM is not set +# CONFIG_PKG_USING_TLSF is not set +# CONFIG_PKG_USING_EVENT_RECORDER is not set +# CONFIG_PKG_USING_ARM_2D is not set +# CONFIG_PKG_USING_MCUBOOT is not set +# CONFIG_PKG_USING_TINYUSB is not set +# CONFIG_PKG_USING_CHERRYUSB is not set +# CONFIG_PKG_USING_KMULTI_RTIMER is not set + +# +# peripheral libraries and drivers +# +# CONFIG_PKG_USING_SENSORS_DRIVERS is not set +# CONFIG_PKG_USING_REALTEK_AMEBA is not set +# CONFIG_PKG_USING_SHT2X is not set +# CONFIG_PKG_USING_SHT3X is not set +# CONFIG_PKG_USING_AS7341 is not set +# CONFIG_PKG_USING_STM32_SDIO is not set +# CONFIG_PKG_USING_ICM20608 is not set +# CONFIG_PKG_USING_BUTTON is not set +# CONFIG_PKG_USING_PCF8574 is not set +# CONFIG_PKG_USING_SX12XX is not set +# CONFIG_PKG_USING_SIGNAL_LED is not set +# CONFIG_PKG_USING_LEDBLINK is not set +# CONFIG_PKG_USING_LITTLED is not set +# CONFIG_PKG_USING_LKDGUI is not set +# CONFIG_PKG_USING_NRF5X_SDK is not set +# CONFIG_PKG_USING_NRFX is not set +# CONFIG_PKG_USING_WM_LIBRARIES is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set +# CONFIG_PKG_USING_INFRARED is not set +# CONFIG_PKG_USING_MULTI_INFRARED is not set +# CONFIG_PKG_USING_AGILE_BUTTON is not set +# CONFIG_PKG_USING_AGILE_LED is not set +# CONFIG_PKG_USING_AT24CXX is not set +# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set +# CONFIG_PKG_USING_AD7746 is not set +# CONFIG_PKG_USING_PCA9685 is not set +# CONFIG_PKG_USING_I2C_TOOLS is not set +# CONFIG_PKG_USING_NRF24L01 is not set +# CONFIG_PKG_USING_TOUCH_DRIVERS is not set +# CONFIG_PKG_USING_MAX17048 is not set +# CONFIG_PKG_USING_RPLIDAR is not set +# CONFIG_PKG_USING_AS608 is not set +# CONFIG_PKG_USING_RC522 is not set +# CONFIG_PKG_USING_WS2812B is not set +# CONFIG_PKG_USING_EMBARC_BSP is not set +# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set +# CONFIG_PKG_USING_MULTI_RTIMER is not set +# CONFIG_PKG_USING_MAX7219 is not set +# CONFIG_PKG_USING_BEEP is not set +# CONFIG_PKG_USING_EASYBLINK is not set +# CONFIG_PKG_USING_PMS_SERIES is not set +# CONFIG_PKG_USING_CAN_YMODEM is not set +# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set +# CONFIG_PKG_USING_QLED is not set +# CONFIG_PKG_USING_PAJ7620 is not set +# CONFIG_PKG_USING_AGILE_CONSOLE is not set +# CONFIG_PKG_USING_LD3320 is not set +# CONFIG_PKG_USING_WK2124 is not set +# CONFIG_PKG_USING_LY68L6400 is not set +# CONFIG_PKG_USING_DM9051 is not set +# CONFIG_PKG_USING_SSD1306 is not set +# CONFIG_PKG_USING_QKEY is not set +# CONFIG_PKG_USING_RS485 is not set +# CONFIG_PKG_USING_RS232 is not set +# CONFIG_PKG_USING_NES is not set +# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set +# CONFIG_PKG_USING_VDEVICE is not set +# CONFIG_PKG_USING_SGM706 is not set +# CONFIG_PKG_USING_STM32WB55_SDK is not set +# CONFIG_PKG_USING_RDA58XX is not set +# CONFIG_PKG_USING_LIBNFC is not set +# CONFIG_PKG_USING_MFOC is not set +# CONFIG_PKG_USING_TMC51XX is not set +# CONFIG_PKG_USING_TCA9534 is not set +# CONFIG_PKG_USING_KOBUKI is not set +# CONFIG_PKG_USING_ROSSERIAL is not set +# CONFIG_PKG_USING_MICRO_ROS is not set +# CONFIG_PKG_USING_MCP23008 is not set +# CONFIG_PKG_USING_BLUETRUM_SDK is not set +# CONFIG_PKG_USING_MISAKA_AT24CXX is not set +# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set +# CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set +# CONFIG_PKG_USING_BL_MCU_SDK is not set +# CONFIG_PKG_USING_SOFT_SERIAL is not set +# CONFIG_PKG_USING_MB85RS16 is not set +# CONFIG_PKG_USING_CW2015 is not set +# CONFIG_PKG_USING_RFM300 is not set + +# +# AI packages +# +# CONFIG_PKG_USING_LIBANN is not set +# CONFIG_PKG_USING_NNOM is not set +# CONFIG_PKG_USING_ONNX_BACKEND is not set +# CONFIG_PKG_USING_ONNX_PARSER is not set +# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set +# CONFIG_PKG_USING_ELAPACK is not set +# CONFIG_PKG_USING_ULAPACK is not set +# CONFIG_PKG_USING_QUEST is not set +# CONFIG_PKG_USING_NAXOS is not set + +# +# miscellaneous packages +# + +# +# project laboratory +# + +# +# samples: kernel and components samples +# +# CONFIG_PKG_USING_KERNEL_SAMPLES is not set +# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set +# CONFIG_PKG_USING_NETWORK_SAMPLES is not set +# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set + +# +# entertainment: terminal games and other interesting software packages +# +# CONFIG_PKG_USING_CMATRIX is not set +# CONFIG_PKG_USING_SL is not set +# CONFIG_PKG_USING_CAL is not set +# CONFIG_PKG_USING_ACLOCK is not set +# CONFIG_PKG_USING_THREES is not set +# CONFIG_PKG_USING_2048 is not set +# CONFIG_PKG_USING_SNAKE is not set +# CONFIG_PKG_USING_TETRIS is not set +# CONFIG_PKG_USING_DONUT is not set +# CONFIG_PKG_USING_COWSAY is not set +# CONFIG_PKG_USING_LIBCSV is not set +# CONFIG_PKG_USING_OPTPARSE is not set +# CONFIG_PKG_USING_FASTLZ is not set +# CONFIG_PKG_USING_MINILZO is not set +# CONFIG_PKG_USING_QUICKLZ is not set +# CONFIG_PKG_USING_LZMA is not set +# CONFIG_PKG_USING_MULTIBUTTON is not set +# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set +# CONFIG_PKG_USING_CANFESTIVAL is not set +# CONFIG_PKG_USING_ZLIB is not set +# CONFIG_PKG_USING_MINIZIP is not set +# CONFIG_PKG_USING_HEATSHRINK is not set +# CONFIG_PKG_USING_DSTR is not set +# CONFIG_PKG_USING_TINYFRAME is not set +# CONFIG_PKG_USING_KENDRYTE_DEMO is not set +# CONFIG_PKG_USING_DIGITALCTRL is not set +# CONFIG_PKG_USING_UPACKER is not set +# CONFIG_PKG_USING_UPARAM is not set +# CONFIG_PKG_USING_HELLO is not set +# CONFIG_PKG_USING_VI is not set +# CONFIG_PKG_USING_KI is not set +# CONFIG_PKG_USING_ARMv7M_DWT is not set +# CONFIG_PKG_USING_UKAL is not set +# CONFIG_PKG_USING_CRCLIB is not set +# CONFIG_PKG_USING_LWGPS is not set +# CONFIG_PKG_USING_STATE_MACHINE is not set +# CONFIG_PKG_USING_DESIGN_PATTERN is not set +# CONFIG_PKG_USING_CONTROLLER is not set +# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set +# CONFIG_PKG_USING_MFBD is not set + +# +# Hardware Drivers Config +# +CONFIG_SOC_SAML10E16=y +# CONFIG_SOC_SAML10E15 is not set +# CONFIG_SOC_SAML10E14 is not set +# CONFIG_SOC_SAML10D16 is not set +# CONFIG_SOC_SAML10D15 is not set +# CONFIG_SOC_SAML10D14 is not set + +# +# Onboard Peripheral Drivers +# +CONFIG_SAML10_ADC0=y +CONFIG_SAML10_I2C0=y + +# +# Application Demo Config +# +CONFIG_SAM_ADC_EXAMPLE=y +CONFIG_SAM_I2C_EXAMPLE=y +CONFIG_SOC_SAML10=y diff --git a/bsp/microchip/saml10/.ignore_format.yml b/bsp/microchip/saml10/.ignore_format.yml new file mode 100644 index 0000000000000000000000000000000000000000..988269df372c6bf0f72c5d66d2a251ad40daebcb --- /dev/null +++ b/bsp/microchip/saml10/.ignore_format.yml @@ -0,0 +1,6 @@ +# files format check exclude path, please follow the instructions below to modify; +# If you need to exclude an entire folder, add the folder path in dir_path; +# If you need to exclude a file, add the path to the file in file_path. + +dir_path: +- bsp diff --git a/bsp/microchip/saml10/Kconfig b/bsp/microchip/saml10/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..e710b26639684c8b2d8cf19a641caeedc555af2f --- /dev/null +++ b/bsp/microchip/saml10/Kconfig @@ -0,0 +1,30 @@ +mainmenu "RT-Thread Configuration" + +config BSP_DIR + string + option env="BSP_ROOT" + default "." + +config RTT_DIR + string + option env="RTT_ROOT" + default "../../.." + +# you can change the RTT_ROOT default: "rt-thread" + +config PKGS_DIR + string + option env="PKGS_ROOT" + default "packages" + +source "$RTT_DIR/Kconfig" +source "$PKGS_DIR/Kconfig" +source "board/Kconfig" + +config SOC_SAML10 + bool + select ARCH_ARM + select ARCH_ARM_CORTEX_M + select RT_USING_COMPONENTS_INIT + select RT_USING_USER_MAIN + default y diff --git a/bsp/microchip/saml10/README.md b/bsp/microchip/saml10/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f6a1089d9fcee4d3781410bf726ea57e572f5ebc --- /dev/null +++ b/bsp/microchip/saml10/README.md @@ -0,0 +1,132 @@ +# SAML10E16A BSP Introduction + +[中文](README_zh.md) +- MCU: ATSAML10E16A @32MHz, 64KB FLASH, 16KB RAM, 1.62V – 3.63V +- L10: Cortex-M23 + Hardware multiplier & divider + ultra low power(< 25 μA/MHz) +- Pin: E=32 pins, D=24pins +- Flash: 16=64KB, 15=32KB, 14=16KB(size=2^n) +- SRAM : 16KB(Flash 64KB), 8KB(Flash 32KB), 4KB(Flash 16KB) +- Datasheet: + +#### KEY FEATURES + +#### Core + - 32 MHz (2.64 CoreMark/MHz and up to 31 DMIPS) Arm® Cortex®-M23 with: + - Single-cycle hardware multiplier + - Hardware divider + - Nested Vector Interrupt Controller (NVIC) + - Memory Protection Unit (MPU) + - Stack Limit Checking + - TrustZone® for ARMv8-M (optional) + +#### Memories + - 16/32/64-KB Flash + - 4/8/16-KB SRAM + - 2-KB Data Flash Write-While-Read (WWR) section for non-volatile data storage + - 256 bytes TrustRAM with physical protection features + +#### System + - Power-on Reset (POR) and programmable Brown-out Detection (BOD) + - 8-channel Direct Memory Access Controller (DMAC) + - 8-channel event system for Inter-peripheral Core-independent Operation + - CRC-32 generator + +#### Clock Management + - Flexible clock distribution optimized for low power + - 32.768 kHz crystal oscillator + - 32.768 kHz ultra low-power internal RC oscillator + - 0.4 to 32 MHz crystal oscillator + - 16/12/8/4 MHz low-power internal RC oscillator + - Ultra low-power digital Frequency-Locked Loop (DFLLULP) + - 32-96 MHz fractional digital Phase-Locked Loop (FDPLL96M) + - One frequency meter + - Low-Power and Power Management + - Active, Idle, Standby with partial or full SRAM retention and off sleep modes: + - Active mode (< 25 μA/MHz) + - Idle mode (< 10 μA/MHz) with 1.5 μs wake-up time + - Standby with Full SRAM Retention (0.5 μA) with 5.3 μs wake-up time + - Off mode (< 100 nA) + - Static and dynamic power gating architecture + - Sleepwalking peripherals + - Two performance levels + - Embedded Buck/LDO regulator with on-the-fly selection + +#### Security + - Up to four tamper pins for static and dynamic intrusion detections + - Data Flash + - Optimized for secure storage + - Address and data scrambling with user-defined key (optional) + - Rapid tamper erase on scrambling key and on one user-defined row + - Silent access for data read noise reduction + - TrustRAM + - Address and data scrambling with user-defined key + - Chip-level tamper detection on physical RAM to resist microprobing attacks + - Rapid tamper erase on scrambling key and RAM data + - Silent access for data read noise reduction + - Data remanence prevention + - Peripherals + - One True Random Generator (TRNG) + - AES-128, SHA-256, and GCM cryptography accelerators (optional) + - Secure pin multiplexing to isolate on dedicated I/O pins a secured communication with external devices from the non-secure application (optional) + - TrustZone for flexible hardware isolation of memories and peripherals (optional) + - Up to six regions for the Flash + - Up to two regions for the Data Flash + - Up to two regions for the SRAM + - Individual security attribution for each peripheral, I/O, external interrupt line, and Event System Channel + - Secure Boot with SHA-based authentication (optional) + - Up to three debug access levels + - Up to three Chip Erase commands to erase part of or the entire embedded memories + - Unique 128-bit serial number + - SAM L11 Securely Key Provisioned (KPH) (optional) + - Key Provisioning using Root of Trust flow + - Security Software Framework using Kinibi-M™ Software Development Kit (SDK) + +#### Advanced Analog and Touch + - One 12-bit 1 Msps Analog-to-Digital Converter (ADC) with up to 10 channels + - Two Analog Comparators (AC) with window compare function + - One 10-bit 350 kSPS Digital-to-Analog Converter (DAC) with external and internal outputs + - Three Operational Amplifiers (OPAMP) + - One enhanced Peripheral Touch Controller (PTC): + - Up to 20 self-capacitance channels + - Up to 100 (10x10) mutual-capacitance channels + - Low-power, high-sensitivity, environmentally robust capacitive touch buttons, sliders, and wheels + - Hardware noise filtering and noise signal desynchronization for high conducted immunity + - Driven Shield Plus for better noise immunity and moisture tolerance + - Parallel Acquisition through Polarity control + - Supports wake-up on touch from Standby Sleep mode + +#### Communication Interfaces + - Up to three Serial Communication Interfaces (SERCOM) that can operate as: + - USART with full-duplex and single-wire half-duplex configuration + - I2C up to 3.4 Mbit/s (High-Speed mode) on one instance and up to 1 Mbit/s (Fast-mode Plus) on the second instance + - Serial Peripheral Interface (SPI) + - ISO7816 on one instance (Available on 32-pin packages only) + - RS-485 on one instance (Available on 32-pin packages only) + - LIN Slave on one instance (Available on 32-pin packages only) + - Timers/Output Compare/Input Capture + - Three 16-bit Timers/Counters (TC), each configurable as: + - One 16-bit TC with two compare/capture channels + - One 8-bit TC with two compare/capture channels + - One 32-bit TC with two compare/capture channels, by using two TCs + - 32-bit Real-Time Counter (RTC) with clock/calendar functions + - Watchdog Timer (WDT) with Window mode + - Input/Output (I/O) + - Up to 25 programmable I/O lines + - Eight external interrupts (EIC) + - One non-maskable interrupt (NMI) + - One Configurable Custom Logic (CCL) that supports: + - Combinatorial logic functions, such as AND, NAND, OR, and NOR + - Sequential logic functions, such as Flip-Flop and Latches + +#### Qualification + - AEC-Q100 Grade 1 (-40°C to 125°C) + - Class-B safety library, IEC 60730 (future) + +#### Packages + - 24-pin VQFN(4*4mm/17 I/O pins) + - 32-pin VQFN(5*5mm/25 I/O pins) + - 32-pin TQFP(7*7mm/17 I/O pins) + - 32-pin WLCSP(2.79*2.79mm/25 I/O pins) + +#### Board info +- [SAM L10 XPLAINED PRO](https://ww1.microchip.com/downloads/en/Appnotes/Getting-Started-with-SAM%20L10L11-Xplained-Pro-DS00002722A.pdf) diff --git a/bsp/microchip/saml10/README_zh.md b/bsp/microchip/saml10/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..9ddb3cfe4103b26b62202ff87e74143cb0a97e11 --- /dev/null +++ b/bsp/microchip/saml10/README_zh.md @@ -0,0 +1,132 @@ +# SAML10E16A BSP 介绍 + +[English](README.md) +- MCU: ATSAML10E16A @32MHz, 64KB FLASH, 16KB RAM, 1.62V – 3.63V +- L10: Cortex-M23内核 + 硬件乘除法 + 超低功耗(< 25 μA/MHz) +- 管脚: E=32 pins, D=24pins +- Flash: 16=64KB, 15=32KB, 14=16KB(size=2^n) +- SRAM : 16KB(Flash 64KB), 8KB(Flash 32KB), 4KB(Flash 16KB) +- 手册: + +#### 关键特性 + +#### 内核 + - 32 MHz (2.64 CoreMark/MHz and up to 31 DMIPS) Arm® Cortex®-M23 with: + - Single-cycle hardware multiplier + - Hardware divider + - Nested Vector Interrupt Controller (NVIC) + - Memory Protection Unit (MPU) + - Stack Limit Checking + - TrustZone® for ARMv8-M (optional) + +#### 内存 + - 16/32/64-KB Flash + - 4/8/16-KB SRAM + - 2-KB Data Flash Write-While-Read (WWR) section for non-volatile data storage + - 256 bytes TrustRAM with physical protection features + +#### 系统特性 + - Power-on Reset (POR) and programmable Brown-out Detection (BOD) + - 8-channel Direct Memory Access Controller (DMAC) + - 8-channel event system for Inter-peripheral Core-independent Operation + - CRC-32 generator + +#### 时钟系统 + - Flexible clock distribution optimized for low power + - 32.768 kHz crystal oscillator + - 32.768 kHz ultra low-power internal RC oscillator + - 0.4 to 32 MHz crystal oscillator + - 16/12/8/4 MHz low-power internal RC oscillator + - Ultra low-power digital Frequency-Locked Loop (DFLLULP) + - 32-96 MHz fractional digital Phase-Locked Loop (FDPLL96M) + - One frequency meter + - Low-Power and Power Management + - Active, Idle, Standby with partial or full SRAM retention and off sleep modes: + - Active mode (< 25 μA/MHz) + - Idle mode (< 10 μA/MHz) with 1.5 μs wake-up time + - Standby with Full SRAM Retention (0.5 μA) with 5.3 μs wake-up time + - Off mode (< 100 nA) + - Static and dynamic power gating architecture + - Sleepwalking peripherals + - Two performance levels + - Embedded Buck/LDO regulator with on-the-fly selection + +#### 安全特性 + - Up to four tamper pins for static and dynamic intrusion detections + - Data Flash + - Optimized for secure storage + - Address and data scrambling with user-defined key (optional) + - Rapid tamper erase on scrambling key and on one user-defined row + - Silent access for data read noise reduction + - TrustRAM + - Address and data scrambling with user-defined key + - Chip-level tamper detection on physical RAM to resist microprobing attacks + - Rapid tamper erase on scrambling key and RAM data + - Silent access for data read noise reduction + - Data remanence prevention + - Peripherals + - One True Random Generator (TRNG) + - AES-128, SHA-256, and GCM cryptography accelerators (optional) + - Secure pin multiplexing to isolate on dedicated I/O pins a secured communication with external devices from the non-secure application (optional) + - TrustZone for flexible hardware isolation of memories and peripherals (optional) + - Up to six regions for the Flash + - Up to two regions for the Data Flash + - Up to two regions for the SRAM + - Individual security attribution for each peripheral, I/O, external interrupt line, and Event System Channel + - Secure Boot with SHA-based authentication (optional) + - Up to three debug access levels + - Up to three Chip Erase commands to erase part of or the entire embedded memories + - Unique 128-bit serial number + - SAM L11 Securely Key Provisioned (KPH) (optional) + - Key Provisioning using Root of Trust flow + - Security Software Framework using Kinibi-M™ Software Development Kit (SDK) + +#### 先进的模拟和触摸功能 + - One 12-bit 1 Msps Analog-to-Digital Converter (ADC) with up to 10 channels + - Two Analog Comparators (AC) with window compare function + - One 10-bit 350 kSPS Digital-to-Analog Converter (DAC) with external and internal outputs + - Three Operational Amplifiers (OPAMP) + - One enhanced Peripheral Touch Controller (PTC): + - Up to 20 self-capacitance channels + - Up to 100 (10x10) mutual-capacitance channels + - Low-power, high-sensitivity, environmentally robust capacitive touch buttons, sliders, and wheels + - Hardware noise filtering and noise signal desynchronization for high conducted immunity + - Driven Shield Plus for better noise immunity and moisture tolerance + - Parallel Acquisition through Polarity control + - Supports wake-up on touch from Standby Sleep mode + +#### 通信接口 + - Up to three Serial Communication Interfaces (SERCOM) that can operate as: + - USART with full-duplex and single-wire half-duplex configuration + - I2C up to 3.4 Mbit/s (High-Speed mode) on one instance and up to 1 Mbit/s (Fast-mode Plus) on the second instance + - Serial Peripheral Interface (SPI) + - ISO7816 on one instance (Available on 32-pin packages only) + - RS-485 on one instance (Available on 32-pin packages only) + - LIN Slave on one instance (Available on 32-pin packages only) + - Timers/Output Compare/Input Capture + - Three 16-bit Timers/Counters (TC), each configurable as: + - One 16-bit TC with two compare/capture channels + - One 8-bit TC with two compare/capture channels + - One 32-bit TC with two compare/capture channels, by using two TCs + - 32-bit Real-Time Counter (RTC) with clock/calendar functions + - Watchdog Timer (WDT) with Window mode + - Input/Output (I/O) + - Up to 25 programmable I/O lines + - Eight external interrupts (EIC) + - One non-maskable interrupt (NMI) + - One Configurable Custom Logic (CCL) that supports: + - Combinatorial logic functions, such as AND, NAND, OR, and NOR + - Sequential logic functions, such as Flip-Flop and Latches + +#### 汽车应用 + - AEC - Q100 Grade 1 (-40°C to 125°C) + - Class-B safety library, IEC 60730 (future) + +#### 封装 + - 24-pin VQFN(4*4mm/17 I/O pins) + - 32-pin VQFN(5*5mm/25 I/O pins) + - 32-pin TQFP(7*7mm/17 I/O pins) + - 32-pin WLCSP(2.79*2.79mm/25 I/O pins) + +#### 官方开发板信息 +- [SAM L10 XPLAINED PRO](https://ww1.microchip.com/downloads/en/Appnotes/Getting-Started-with-SAM%20L10L11-Xplained-Pro-DS00002722A.pdf) \ No newline at end of file diff --git a/bsp/microchip/saml10/SConscript b/bsp/microchip/saml10/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..744d8d782140ebedcf11de3c61a1fc03b3b106d2 --- /dev/null +++ b/bsp/microchip/saml10/SConscript @@ -0,0 +1,14 @@ +# for module compiling +import os +from building import * + +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(d, 'SConscript')) + +Return('objs') diff --git a/bsp/microchip/saml10/SConstruct b/bsp/microchip/saml10/SConstruct new file mode 100644 index 0000000000000000000000000000000000000000..9f8b13d9cf291f5abecb1dcc367907de9689f3b3 --- /dev/null +++ b/bsp/microchip/saml10/SConstruct @@ -0,0 +1,60 @@ +import os +import sys +import rtconfig + +if os.getenv('RTT_ROOT'): + RTT_ROOT = os.getenv('RTT_ROOT') +else: + RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..') + +sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')] +try: + from building import * +except: + print('Cannot found RT-Thread root directory, please check RTT_ROOT') + print(RTT_ROOT) + exit(-1) + +TARGET = 'rt-thread-' + rtconfig.DEVICE_PART + '.' + rtconfig.TARGET_EXT + +DefaultEnvironment(tools=[]) +env = Environment(tools = ['mingw'], + AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, + CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, + AR = rtconfig.AR, ARFLAGS = '-rc', + CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS, + LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) +env.PrependENVPath('PATH', rtconfig.EXEC_PATH) + +if rtconfig.PLATFORM == 'iar': + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread-'+ rtconfig.DEVICE_PART + '.map') + +Export('RTT_ROOT') +Export('rtconfig') + +SDK_ROOT = os.path.abspath('./') + +if os.path.exists(SDK_ROOT + '/common'): + common_path_prefix = SDK_ROOT + '/common' +else: + common_path_prefix = os.path.dirname(SDK_ROOT) + '/common' + +SDK_LIB = common_path_prefix +Export('SDK_LIB') + +# prepare building environment +objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) + +sam_board = 'board' +rtconfig.BSP_LIBRARY_TYPE = sam_board + +# include libraries +objs.extend(SConscript(os.path.join(common_path_prefix, sam_board, 'SConscript'))) + +# include drivers +objs.extend(SConscript(os.path.join(common_path_prefix, 'applications', 'SConscript'))) + +# make a building +DoBuilding(TARGET, objs) diff --git a/bsp/microchip/saml10/applications/SConscript b/bsp/microchip/saml10/applications/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..e806dae56e1b3752350a52607ab6bd479318088e --- /dev/null +++ b/bsp/microchip/saml10/applications/SConscript @@ -0,0 +1,10 @@ +import rtconfig +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd, str(Dir('#'))] + +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +Return('group') diff --git a/bsp/microchip/saml10/applications/main.c b/bsp/microchip/saml10/applications/main.c new file mode 100644 index 0000000000000000000000000000000000000000..e83a6ba307119838cd348ef44e00e0195b49b27a --- /dev/null +++ b/bsp/microchip/saml10/applications/main.c @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Email Notes + * 2022-04-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release + */ + +#include + +#ifdef RT_USING_FINSH +#include +#include +#endif + +#include "atmel_start.h" +#include + +#ifdef SAM_I2C_EXAMPLE +#include "i2c_demo.h" +#endif + +#ifdef SAM_ADC_EXAMPLE +#include "adc_demo.h" +#endif + +static rt_uint8_t led_stack[ 512 ]; +static struct rt_thread led_thread; + +static void led_thread_entry(void* parameter) +{ + unsigned int count=0; + + while (1) + { + /* toggle led */ +#ifndef RT_USING_FINSH + rt_kprintf("led toggle, count : %d\r\n",count); +#endif + count++; + gpio_toggle_pin_level(LED0); + rt_thread_delay( RT_TICK_PER_SECOND/2 ); /* sleep 0.5 second and switch to other thread */ + } +} + +int main(void) +{ + rt_err_t result; + + /* initialize led thread */ + result = rt_thread_init(&led_thread, + "led", + led_thread_entry, + RT_NULL, + (rt_uint8_t*)&led_stack[0], + sizeof(led_stack), + RT_THREAD_PRIORITY_MAX/3, + 5); + if (result == RT_EOK) + { + rt_thread_startup(&led_thread); + } + +#ifdef SAM_I2C_EXAMPLE + i2c_demo_run(); +#endif + +#ifdef SAM_ADC_EXAMPLE + adc_demo_run(); +#endif + + return 0; +} + +/*@}*/ diff --git a/bsp/microchip/saml10/board/Kconfig b/bsp/microchip/saml10/board/Kconfig new file mode 100644 index 0000000000000000000000000000000000000000..6b1252e91c59890e0c9d177bb6cbad4c695876b9 --- /dev/null +++ b/bsp/microchip/saml10/board/Kconfig @@ -0,0 +1,66 @@ +menu "Hardware Drivers Config" + +choice + prompt "select chip type" + default SOC_SAML10E16 + + config SOC_SAML10E16 + bool "SOC_SAML10E16" + help + Refer to SAML10 DataSheet + + config SOC_SAML10E15 + bool "SOC_SAML10E15" + help + Refer to SAML10 DataSheet + + config SOC_SAML10E14 + bool "SOC_SAML10E14" + help + Refer to SAML10 DataSheet + + config SOC_SAML10D16 + bool "SOC_SAML10D16" + help + Refer to SAML10 DataSheet + + config SOC_SAML10D15 + bool "SOC_SAML10D15" + help + Refer to SAML10 DataSheet + + config SOC_SAML10D14 + bool "SOC_SAML10D14" + help + Refer to SAML10 DataSheet +endchoice +endmenu + +menu "Onboard Peripheral Drivers" + depends on SOC_SAML10E16 + + config SAML10_ADC0 + bool "Enable ADC0" + default false + + config SAML10_I2C0 + bool "Enable I2C0" + default false + +endmenu + +menu "Application Demo Config" + config SAM_ADC_EXAMPLE + bool "Enable SAM ADC Example" + depends on SAML10_ADC0 + default true + help + Add ADC example task to project + + config SAM_I2C_EXAMPLE + bool "Enable SAM I2C Example" + depends on SAML10_I2C0 + default true + help + Add I2C example task to project +endmenu diff --git a/bsp/microchip/saml10/board/SConscript b/bsp/microchip/saml10/board/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..2a3d73611ea37c87bc1ec63330d320ea4d9ff445 --- /dev/null +++ b/bsp/microchip/saml10/board/SConscript @@ -0,0 +1,17 @@ +Import('RTT_ROOT') +Import('rtconfig') +from building import * + +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] + +#remove other no use files +#SrcRemove(src, '*.c') + +# You can select chips from the list above +CPPDEFINES = ['SAML10xxx'] + +group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) + +Return('group') \ No newline at end of file diff --git a/bsp/microchip/saml10/board/board.c b/bsp/microchip/saml10/board/board.c new file mode 100644 index 0000000000000000000000000000000000000000..cc49de728ebca63e9c4adf9b453c037f512b046c --- /dev/null +++ b/bsp/microchip/saml10/board/board.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Email Notes + * 2019-07-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release + */ + +#include + +#include +#include "peripheral_clk_config.h" + +#include +#include "board.h" + +#ifdef RT_USING_SERIAL +extern int rt_hw_uart_init(void); +#endif + +static struct io_descriptor* g_stdio; + +void rt_hw_console_output(const char *str) +{ + io_write(g_stdio, (uint8_t *)str, strlen(str)); + while (TARGET_IO.stat != 0); +} +RTM_EXPORT(rt_hw_console_output); + +static inline void hw_board_init_usart(void) +{ + usart_async_get_io_descriptor(&TARGET_IO, &g_stdio); + usart_async_enable(&TARGET_IO); +} + +/** + * This is the timer interrupt service routine. + * + */ +void SysTick_Handler(void) +{ + /* enter interrupt */ + rt_interrupt_enter(); + + rt_tick_increase(); + + /* leave interrupt */ + rt_interrupt_leave(); +} + +/** + * This function will initial SAMC21 board. + */ +void rt_hw_board_init(void) +{ + /* Initializes MCU, drivers and middleware */ + atmel_start_init(); + + /* enable USART stdout module */ + hw_board_init_usart(); + + /* UART driver initialization is open by default */ +#ifdef RT_USING_SERIAL + rt_hw_uart_init(); +#endif + + /* init systick */ + SysTick_Config(CONF_CPU_FREQUENCY / RT_TICK_PER_SECOND); + + /* set pend exception priority */ + NVIC_SetPriority(PendSV_IRQn, (1 << __NVIC_PRIO_BITS) - 1); + +#ifdef RT_USING_HEAP + #if defined(__CC_ARM) || defined(__CLANG_ARM) + rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)HEAP_END); + #elif __ICCARM__ + rt_system_heap_init((void*)HEAP_BEGIN, (void*)HEAP_END); + #else + /* init memory system */ + rt_system_heap_init((void*)&__bss_end, (void*)HEAP_END); + #endif +#endif + + /* Set the shell console output device */ +#if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE) + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); +#endif + +#ifdef RT_USING_COMPONENTS_INIT + rt_components_board_init(); +#endif +} + +/*@}*/ diff --git a/bsp/microchip/saml10/board/board.h b/bsp/microchip/saml10/board/board.h new file mode 100644 index 0000000000000000000000000000000000000000..fbf8042cd9b323a6917c572c61d4827004109d9c --- /dev/null +++ b/bsp/microchip/saml10/board/board.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Email Notes + * 2022-04-16 Kevin.Liu kevin.liu.mchp@gmail.com First Release + */ +#ifndef __BOARD_H__ +#define __BOARD_H__ + +// Internal SRAM memory size[Kbytes] <4-16> +// Default: 16 +#if defined(__SAML10E14A__) || defined(__ATSAML10E14A__) + #define SAML10_SRAM_SIZE 4 +#elif defined(__SAML10E15A__) || defined(__ATSAML10E15A__) + #define SAML10_SRAM_SIZE 8 +#elif defined(__SAML10E16A__) || defined(__ATSAML10E16A__) + #define SAML10_SRAM_SIZE 16 +#elif defined(__SAML10D14A__) || defined(__ATSAML10D14A__) + #define SAML10_SRAM_SIZE 4 +#elif defined(__SAML10D15A__) || defined(__ATSAML10D15A__) + #define SAML10_SRAM_SIZE 8 +#elif defined(__SAML10D16A__) || defined(__ATSAML10D16A__) + #define SAML10_SRAM_SIZE 16 +#else + #error Board does not support the specified device. +#endif + +#define SAML10_SRAM_END (0x20000000 + SAML10_SRAM_SIZE * 1024) + +#if defined(__CC_ARM) || defined(__CLANG_ARM) +extern int Image$$RW_IRAM1$$ZI$$Limit; +#define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit) +#elif __ICCARM__ +#pragma section="HEAP" +#define HEAP_BEGIN (__segment_begin("HEAP")) +#define HEAP_END (__segment_end("HEAP")) +#else +extern int __bss_end; +#define HEAP_BEGIN (&__bss_end) +#define HEAP_END SAML10_SRAM_END +#endif + +void rt_hw_board_init(void); + +#endif + diff --git a/bsp/microchip/saml10/bsp/AtmelStart.env_conf b/bsp/microchip/saml10/bsp/AtmelStart.env_conf new file mode 100644 index 0000000000000000000000000000000000000000..c151e3b2e91974d8e82117116bb652178cb727d5 --- /dev/null +++ b/bsp/microchip/saml10/bsp/AtmelStart.env_conf @@ -0,0 +1,6 @@ + + + + + + diff --git a/bsp/microchip/saml10/bsp/AtmelStart.gpdsc b/bsp/microchip/saml10/bsp/AtmelStart.gpdsc new file mode 100644 index 0000000000000000000000000000000000000000..361ccef5fbd645a9b7ce757290b0909320118120 --- /dev/null +++ b/bsp/microchip/saml10/bsp/AtmelStart.gpdsc @@ -0,0 +1,189 @@ + + Atmel + SAML10 LED switcher + Project generated by Atmel Start + http://start.atmel.com/ + + Initial version + + + Configuration Files generated by Atmel Start + + + + Atmel Start +