mirror of https://github.com/ARMmbed/mbed-os.git
commit
07afcf25c1
|
@ -0,0 +1,70 @@
|
|||
/* mbed Microcontroller Library
|
||||
* Copyright (c) 2017 ARM Limited
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
#include "hal/device_uid_api.h"
|
||||
#include "platform/mbed_assert.h"
|
||||
#include "platform/CriticalSectionLock.h"
|
||||
#include "drivers/DeviceUid.h"
|
||||
|
||||
#if DEVICE_DEVICEUID
|
||||
|
||||
namespace mbed {
|
||||
|
||||
uint8_t DeviceUid::_uidbuf[MBED_DEVICEUID_SIZE] = {0};
|
||||
uint8_t* DeviceUid::_uidptr = NULL;
|
||||
char DeviceUid::_strbuf[DEVICEUID_STRING_BUFFER_SIZE] = {'\0'};
|
||||
char* DeviceUid::_strptr = NULL;
|
||||
#ifndef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
const char DeviceUid::_hexChars[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||
#endif
|
||||
|
||||
DeviceUid::DeviceUid()
|
||||
{
|
||||
populate_uid_buf();
|
||||
}
|
||||
|
||||
void DeviceUid::populate_uid_buf()
|
||||
{
|
||||
if (_uidptr == NULL) {
|
||||
CriticalSectionLock lock;
|
||||
device_uid_get_uid(_uidbuf);
|
||||
_uidptr = _uidbuf;
|
||||
}
|
||||
}
|
||||
|
||||
void DeviceUid::populate_str_buf()
|
||||
{
|
||||
if (_strptr == NULL) {
|
||||
CriticalSectionLock lock;
|
||||
#ifdef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
device_uid_get_str(_strbuf);
|
||||
_strptr = _strbuf;
|
||||
#else
|
||||
int pos = 0;
|
||||
populate_uid_buf();
|
||||
for (int i = 0; i < MBED_DEVICEUID_SIZE; ++i) {
|
||||
_strbuf[pos++] = _hexChars[_uidptr[i] >> 4];
|
||||
_strbuf[pos++] = _hexChars[_uidptr[i] & 0x0F];
|
||||
}
|
||||
_strbuf[pos] = '\0';
|
||||
_strptr = _strbuf;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
#endif
|
|
@ -0,0 +1,128 @@
|
|||
/* mbed Microcontroller Library
|
||||
* Copyright (c) 2017 ARM Limited
|
||||
*
|
||||
* Licensed 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 MBED_DEVICEUID_H
|
||||
#define MBED_DEVICEUID_H
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
||||
#if defined(DEVICE_DEVICEUID) || defined(DOXYGEN_ONLY)
|
||||
|
||||
#ifdef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
#define DEVICEUID_STRING_BUFFER_SIZE MBED_DEVICEUID_STR_SIZE_MAX
|
||||
#else
|
||||
#define DEVICEUID_STRING_BUFFER_SIZE (MBED_DEVICEUID_SIZE * 2 + 1)
|
||||
#endif
|
||||
|
||||
namespace mbed {
|
||||
/** \addtogroup drivers */
|
||||
|
||||
/** DEVICE UID reader class
|
||||
*
|
||||
* @note Synchronization level: Interrupt safe
|
||||
* @ingroup drivers
|
||||
*/
|
||||
class DeviceUid {
|
||||
public:
|
||||
/** DeviceUid constructor
|
||||
*/
|
||||
DeviceUid();
|
||||
|
||||
/** Get size of DEVICE UID in bytes
|
||||
*
|
||||
* @return Size of device's DEVICE UID in bytes
|
||||
*/
|
||||
int size()
|
||||
{
|
||||
return MBED_DEVICEUID_SIZE;
|
||||
}
|
||||
|
||||
/** Get DEVICE UID data pointer
|
||||
*
|
||||
* @return Pointer to uid data buffer
|
||||
*/
|
||||
const uint8_t *data()
|
||||
{
|
||||
populate_uid_buf();
|
||||
return _uidptr;
|
||||
}
|
||||
|
||||
/** Get DEVICE UID vendor string
|
||||
*
|
||||
* @return Pointer to zero terminated uid vendor string
|
||||
*
|
||||
* @note
|
||||
* If vendor did not define MBED_DEVICEUID_STR_SIZE_MAX, DeviceUid driver will
|
||||
* assume the HAL interface function device_uid_get_str() is not implemented
|
||||
* on the target, and instead the driver will construct just an ASCII
|
||||
* string out of the uid byte buffer contents.
|
||||
*
|
||||
*/
|
||||
const char *c_str()
|
||||
{
|
||||
populate_str_buf();
|
||||
return _strptr;
|
||||
}
|
||||
|
||||
/** Overload operator for byte pointer
|
||||
*
|
||||
* @return Pointer to uid data buffer
|
||||
*/
|
||||
operator const uint8_t*()
|
||||
{
|
||||
populate_uid_buf();
|
||||
return _uidptr;
|
||||
}
|
||||
|
||||
operator const char*()
|
||||
{
|
||||
populate_str_buf();
|
||||
return _strptr;
|
||||
}
|
||||
|
||||
/** Overload operator for array subscript
|
||||
*
|
||||
* @param x DEVICE UID Byte index
|
||||
*
|
||||
* @return Byte located at index x
|
||||
*/
|
||||
uint8_t operator[](int x)
|
||||
{
|
||||
if (x >= 0 && x < MBED_DEVICEUID_SIZE) {
|
||||
populate_uid_buf();
|
||||
return _uidptr[x];
|
||||
}
|
||||
|
||||
return 0x00;
|
||||
}
|
||||
|
||||
private:
|
||||
void populate_uid_buf();
|
||||
void populate_str_buf();
|
||||
|
||||
static uint8_t _uidbuf[MBED_DEVICEUID_SIZE];
|
||||
static uint8_t* _uidptr;
|
||||
static char _strbuf[DEVICEUID_STRING_BUFFER_SIZE];
|
||||
static char* _strptr;
|
||||
#ifndef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
static const char _hexChars[16];
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace mbed
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,73 @@
|
|||
/** \addtogroup hal */
|
||||
/** @{*/
|
||||
/* mbed Microcontroller Library
|
||||
* Copyright (c) 2017 ARM Limited
|
||||
*
|
||||
* Licensed 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 MBED_DEVICE_UID_API_H
|
||||
#define MBED_DEVICE_UID_API_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "device.h"
|
||||
|
||||
#if DEVICE_DEVICEUID
|
||||
|
||||
#if !defined(MBED_DEVICEUID_SIZE) || (MBED_DEVICEUID_SIZE == 0)
|
||||
#error "DEVICE UID Vendor implementation must define macro MBED_DEVICEUID_SIZE with the non-zero uid size in bytes!"
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_DEVICEUID_STR_SIZE_MAX) || (MBED_DEVICEUID_STR_SIZE_MAX == 0)
|
||||
#warning "DEVICE UID max vendor string length not defined or zero! device_uid_get_str() HAL interface is disabled!"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup hal_device_uid DEVICEUID hal functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** Get DEVICE UID data bytes
|
||||
*
|
||||
* @param uid Byte buffer for uid. Must be of size MBED_DEVICEUID_SIZE
|
||||
*
|
||||
*/
|
||||
void device_uid_get_uid(uint8_t *uid);
|
||||
|
||||
#ifdef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
/** Get DEVICE UID vendor string
|
||||
*
|
||||
* @param str Character buffer for vendor specific UID string. Must be of size MBED_DEVICEUID_STR_SIZE_MAX
|
||||
*
|
||||
* @note
|
||||
* Implementing this function on target side can be used to provide a vendor specific
|
||||
* string describing the contents of the UID.
|
||||
* The string length including terminating zero character must not exceed MBED_DEVICEUID_STR_SIZE_MAX bytes!
|
||||
*
|
||||
*/
|
||||
void device_uid_get_str(char *str);
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/** @}*/
|
1
mbed.h
1
mbed.h
|
@ -70,6 +70,7 @@
|
|||
#include "drivers/RawSerial.h"
|
||||
#include "drivers/UARTSerial.h"
|
||||
#include "drivers/FlashIAP.h"
|
||||
#include "drivers/DeviceUid.h"
|
||||
|
||||
// mbed Internal components
|
||||
#include "drivers/Timer.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define MBED_CRITICALSECTIONLOCK_H
|
||||
|
||||
#include "platform/mbed_critical.h"
|
||||
#include "platform/mbed_toolchain.h"
|
||||
|
||||
namespace mbed {
|
||||
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) 2017 Nordic Semiconductor ASA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list
|
||||
* of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA
|
||||
* integrated circuit in a product or a software update for such product, must reproduce
|
||||
* the above copyright notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* 4. This software, with or without modification, must only be used with a
|
||||
* Nordic Semiconductor ASA integrated circuit.
|
||||
*
|
||||
* 5. Any software provided in binary or object form under this license must not be reverse
|
||||
* engineered, decompiled, modified and/or disassembled.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
|
||||
#if DEVICE_DEVICEUID
|
||||
|
||||
#include "nrf.h"
|
||||
#include "device_uid_api.h"
|
||||
|
||||
#define UID_WORDS 2
|
||||
|
||||
void device_uid_get_uid(uint8_t *uid)
|
||||
{
|
||||
int pos = 0;
|
||||
|
||||
for (int i = (UID_WORDS-1); i >= 0; --i) {
|
||||
for (int j = 3; j >= 0; --j) {
|
||||
uid[pos++] = (uint8_t)((NRF_FICR->DEVICEID[i] >> (j*8)) & 0xFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,150 @@
|
|||
/* mbed Microcontroller Library
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2017, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "device.h"
|
||||
|
||||
#if DEVICE_DEVICEUID
|
||||
|
||||
#include <string.h>
|
||||
#if defined(TARGET_STM32F0)
|
||||
#include "stm32f0xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32F1)
|
||||
#include "stm32f1xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32F2)
|
||||
#include "stm32f2xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32F3)
|
||||
#include "stm32f3xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32F4)
|
||||
#include "stm32f4xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32F7)
|
||||
#include "stm32f7xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32L0)
|
||||
#include "stm32l0xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32L1)
|
||||
#include "stm32l1xx_ll_utils.h"
|
||||
#elif defined(TARGET_STM32L4)
|
||||
#include "stm32l4xx_ll_utils.h"
|
||||
#else
|
||||
#error "Unsupported STM32 device!"
|
||||
#endif
|
||||
#include "device_uid_api.h"
|
||||
|
||||
#define UID_WORDS 3
|
||||
|
||||
#ifdef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
static int cpu_uid_itoa(int value, char *sp, int radix);
|
||||
#endif
|
||||
|
||||
void device_uid_get_uid(uint8_t *uid)
|
||||
{
|
||||
uint32_t uid_buf[UID_WORDS];
|
||||
int pos = 0;
|
||||
|
||||
uid_buf[0] = LL_GetUID_Word0();
|
||||
uid_buf[1] = LL_GetUID_Word1();
|
||||
uid_buf[2] = LL_GetUID_Word2();
|
||||
|
||||
for (int i = (UID_WORDS-1); i >= 0; --i) {
|
||||
for (int j = 3; j >= 0; --j) {
|
||||
uid[pos++] = (uint8_t)((uid_buf[i] >> (j*8)) & 0xFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MBED_DEVICEUID_STR_SIZE_MAX
|
||||
void device_uid_get_str(char *str)
|
||||
{
|
||||
char buffer[16];
|
||||
char lot_number[8];
|
||||
uint8_t wafer_number;
|
||||
uint16_t x, y;
|
||||
uint32_t uid_buf[UID_WORDS];
|
||||
|
||||
uid_buf[0] = LL_GetUID_Word0();
|
||||
uid_buf[1] = LL_GetUID_Word1();
|
||||
uid_buf[2] = LL_GetUID_Word2();
|
||||
|
||||
lot_number[0] = (uid_buf[2] >> 24) & 0x000000FF;
|
||||
lot_number[1] = (uid_buf[2] >> 16) & 0x000000FF;
|
||||
lot_number[2] = (uid_buf[2] >> 8) & 0x000000FF;
|
||||
lot_number[3] = uid_buf[2] & 0x000000FF;
|
||||
lot_number[4] = (uid_buf[1] >> 24) & 0x000000FF;
|
||||
lot_number[5] = (uid_buf[1] >> 16) & 0x000000FF;
|
||||
lot_number[6] = (uid_buf[1] >> 8) & 0x000000FF;
|
||||
lot_number[7] = '\0';
|
||||
|
||||
wafer_number = uid_buf[1] & 0x000000FF;
|
||||
|
||||
x = (uid_buf[0] >> 16) & 0x0000FFFF;
|
||||
y = uid_buf[0] & 0x0000FFFF;
|
||||
|
||||
// make a string in format "LLLLLL:WWW:XXXXX:YYYYY" - max 23 chars including terminating zero
|
||||
strcpy(str, lot_number);
|
||||
strcat(str, ":");
|
||||
cpu_uid_itoa(wafer_number, buffer, 10);
|
||||
strcat(str, buffer);
|
||||
strcat(str, ":");
|
||||
cpu_uid_itoa(x, buffer, 10);
|
||||
strcat(str, buffer);
|
||||
strcat(str, ":");
|
||||
cpu_uid_itoa(y, buffer, 10);
|
||||
strcat(str, buffer);
|
||||
}
|
||||
|
||||
int cpu_uid_itoa(int value, char *sp, int radix)
|
||||
{
|
||||
char tmp[16];// be careful with the length of the buffer
|
||||
char *tp = tmp;
|
||||
int i;
|
||||
unsigned v = value;
|
||||
|
||||
while (v || tp == tmp) {
|
||||
i = v % radix;
|
||||
v /= radix; // v/=radix uses less CPU clocks than v=v/radix does
|
||||
if (i < 10) {
|
||||
*tp++ = i+'0';
|
||||
}
|
||||
else {
|
||||
*tp++ = i + 'a' - 10;
|
||||
}
|
||||
}
|
||||
|
||||
int len = tp - tmp;
|
||||
|
||||
while (tp > tmp) {
|
||||
*sp++ = *--tp;
|
||||
}
|
||||
*sp = '\0';
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,42 @@
|
|||
/***************************************************************************//**
|
||||
* @file device_uid_api.c
|
||||
*******************************************************************************
|
||||
* @section License
|
||||
* <b>(C) Copyright 2017 Silicon Labs, http://www.silabs.com</b>
|
||||
*******************************************************************************
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed 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.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "device.h"
|
||||
|
||||
#if DEVICE_DEVICEUID
|
||||
|
||||
#include "em_system.h"
|
||||
#include "device_uid_api.h"
|
||||
|
||||
|
||||
void device_uid_get_uid(uint8_t *uid)
|
||||
{
|
||||
int pos = 0;
|
||||
uint64_t tempuid = SYSTEM_GetUnique();
|
||||
|
||||
for (int i = (MBED_DEVICEUID_SIZE - 1); i >= 0; --i) {
|
||||
uid[pos++] = (uint8_t)((tempuid >> (i*8)) & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -705,14 +705,14 @@
|
|||
"public": false,
|
||||
"extra_labels": ["STM"],
|
||||
"supported_toolchains": ["ARM", "uARM", "IAR", "GCC_ARM"],
|
||||
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2"],
|
||||
"macros": ["TRANSACTION_QUEUE_SIZE_SPI=2", "MBED_DEVICEUID_SIZE=12", "MBED_DEVICEUID_STR_SIZE_MAX=23"],
|
||||
"config": {
|
||||
"lse_available": {
|
||||
"help": "Define if a Low Speed External xtal (LSE) is available on the board (0 = No, 1 = Yes). If Yes, the LSE will be used to clock the RTC, LPUART, ... otherwise the Low Speed Internal clock (LSI) will be used",
|
||||
"value": "1"
|
||||
}
|
||||
},
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"]
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "DEVICEUID"]
|
||||
},
|
||||
"LPC54114": {
|
||||
"supported_form_factors": ["ARDUINO"],
|
||||
|
@ -1891,7 +1891,7 @@
|
|||
"inherits": ["FAMILY_STM32"],
|
||||
"core": "Cortex-M4F",
|
||||
"extra_labels_add": ["STM32F4", "STM32F439", "STM32F439ZI","STM32F439xx", "STM32F439xI"],
|
||||
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "HSE_VALUE=24000000", "HSE_STARTUP_TIMEOUT=5000", "CB_INTERFACE_SDIO","CB_CHIP_WL18XX","SUPPORT_80211D_ALWAYS","WLAN_ENABLED","MBEDTLS_ARC4_C","MBEDTLS_DES_C","MBEDTLS_MD4_C","MBEDTLS_MD5_C","MBEDTLS_SHA1_C"],
|
||||
"macros_add": ["MBEDTLS_CONFIG_HW_SUPPORT", "HSE_VALUE=24000000", "HSE_STARTUP_TIMEOUT=5000", "CB_INTERFACE_SDIO","CB_CHIP_WL18XX","SUPPORT_80211D_ALWAYS","WLAN_ENABLED","MBEDTLS_ARC4_C","MBEDTLS_DES_C","MBEDTLS_MD4_C","MBEDTLS_MD5_C","MBEDTLS_SHA1_C"],
|
||||
"device_has_add": ["CAN", "EMAC", "TRNG", "FLASH"],
|
||||
"device_has_remove": ["RTC", "SLEEP"],
|
||||
"features": ["LWIP"],
|
||||
|
@ -2006,7 +2006,7 @@
|
|||
"inherits": ["Target"],
|
||||
"core": "Cortex-M0",
|
||||
"OVERRIDE_BOOTLOADER_FILENAME": "nrf51822_bootloader.hex",
|
||||
"macros": ["NRF51", "TARGET_NRF51822", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\""],
|
||||
"macros": ["NRF51", "TARGET_NRF51822", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"", "MBED_DEVICEUID_SIZE=8"],
|
||||
"MERGE_BOOTLOADER": false,
|
||||
"extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822"],
|
||||
"OUTPUT_EXT": "hex",
|
||||
|
@ -2048,7 +2048,7 @@
|
|||
},
|
||||
"program_cycle_s": 6,
|
||||
"features": ["BLE"],
|
||||
"device_has": ["ANALOGIN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"]
|
||||
"device_has": ["ANALOGIN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE", "DEVICEUID"]
|
||||
},
|
||||
"MCU_NRF51_16K_BASE": {
|
||||
"inherits": ["MCU_NRF51"],
|
||||
|
@ -2590,7 +2590,7 @@
|
|||
"EFM32": {
|
||||
"inherits": ["Target"],
|
||||
"extra_labels": ["Silicon_Labs", "EFM32"],
|
||||
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT"],
|
||||
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_DEVICEUID_SIZE=8"],
|
||||
"public": false
|
||||
},
|
||||
"EFM32GG990F1024": {
|
||||
|
@ -2607,7 +2607,7 @@
|
|||
"EFM32GG_STK3700": {
|
||||
"inherits": ["EFM32GG990F1024"],
|
||||
"progen": {"target": "efm32gg-stk"},
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -2660,7 +2660,7 @@
|
|||
},
|
||||
"EFM32LG_STK3600": {
|
||||
"inherits": ["EFM32LG990F256"],
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"device_name": "EFM32LG990F256",
|
||||
"config": {
|
||||
|
@ -2715,7 +2715,7 @@
|
|||
"EFM32WG_STK3800": {
|
||||
"inherits": ["EFM32WG990F256"],
|
||||
"progen": {"target": "efm32wg-stk"},
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -2769,7 +2769,7 @@
|
|||
},
|
||||
"EFM32ZG_STK3200": {
|
||||
"inherits": ["EFM32ZG222F32"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -2823,7 +2823,7 @@
|
|||
},
|
||||
"EFM32HG_STK3400": {
|
||||
"inherits": ["EFM32HG322F64"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -2876,7 +2876,7 @@
|
|||
},
|
||||
"EFM32PG_STK3401": {
|
||||
"inherits": ["EFM32PG1B100F256GM32"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -2939,7 +2939,7 @@
|
|||
},
|
||||
"EFR32MG1_BRD4150": {
|
||||
"inherits": ["EFR32MG1P132F256GM48"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -2982,7 +2982,7 @@
|
|||
},
|
||||
"TB_SENSE_1": {
|
||||
"inherits": ["EFR32MG1P233F256GM48"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 5,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -3030,7 +3030,7 @@
|
|||
},
|
||||
"EFM32PG12_STK3402": {
|
||||
"inherits": ["EFM32PG12B500F1024GL125"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "TRNG", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "TRNG", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 2,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -3084,7 +3084,7 @@
|
|||
"TB_SENSE_12": {
|
||||
"inherits": ["EFR32MG12P332F1024GL125"],
|
||||
"device_name": "EFR32MG12P332F1024GL125",
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "TRNG", "FLASH"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2CSLAVE", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPISLAVE", "SPI_ASYNCH", "STDIO_MESSAGES", "TRNG", "FLASH", "DEVICEUID"],
|
||||
"forced_reset_timeout": 5,
|
||||
"config": {
|
||||
"hf_clock_src": {
|
||||
|
@ -3212,7 +3212,8 @@
|
|||
"CMSIS_VECTAB_VIRTUAL",
|
||||
"CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"",
|
||||
"NO_SYSTICK",
|
||||
"MBED_TICKLESS"
|
||||
"MBED_TICKLESS",
|
||||
"MBED_DEVICEUID_SIZE=8"
|
||||
],
|
||||
"MERGE_BOOTLOADER": false,
|
||||
"extra_labels": ["NORDIC", "MCU_NRF51", "MCU_NRF51822_UNIFIED", "NRF5", "SDK11"],
|
||||
|
@ -3257,21 +3258,21 @@
|
|||
"NRF51_DK": {
|
||||
"supported_form_factors": ["ARDUINO"],
|
||||
"inherits": ["MCU_NRF51_32K_UNIFIED"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
|
||||
"device_has": ["ANALOGIN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE", "DEVICEUID"],
|
||||
"release_versions": ["2", "5"],
|
||||
"device_name": "nRF51822_xxAA"
|
||||
},
|
||||
"NRF51_DONGLE": {
|
||||
"inherits": ["MCU_NRF51_32K_UNIFIED"],
|
||||
"progen": {"target": "nrf51-dongle"},
|
||||
"device_has": ["I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
|
||||
"device_has": ["I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE", "DEVICEUID"],
|
||||
"release_versions": ["2", "5"]
|
||||
},
|
||||
"MCU_NRF52": {
|
||||
"inherits": ["Target"],
|
||||
"core": "Cortex-M4F",
|
||||
"macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S132", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"", "MBED_TICKLESS"],
|
||||
"device_has": ["STCLK_OFF_DURING_SLEEP"],
|
||||
"macros": ["NRF52", "TARGET_NRF52832", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S132", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"", "MBED_TICKLESS", "MBED_DEVICEUID_SIZE=8"],
|
||||
"device_has": ["STCLK_OFF_DURING_SLEEP", "DEVICEUID"],
|
||||
"extra_labels": ["NORDIC", "MCU_NRF52", "MCU_NRF52832", "NRF5", "SDK11", "NRF52_COMMON"],
|
||||
"OUTPUT_EXT": "hex",
|
||||
"is_disk_virtual": true,
|
||||
|
@ -3351,8 +3352,8 @@
|
|||
"MCU_NRF52840": {
|
||||
"inherits": ["Target"],
|
||||
"core": "Cortex-M4F",
|
||||
"macros": ["TARGET_NRF52840", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S140", "NRF_SD_BLE_API_VERSION=5", "NRF52840_XXAA", "NRF_DFU_SETTINGS_VERSION=1", "NRF_SD_BLE_API_VERSION=5", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"", "MBED_TICKLESS"],
|
||||
"device_has": ["STCLK_OFF_DURING_SLEEP"],
|
||||
"macros": ["TARGET_NRF52840", "BLE_STACK_SUPPORT_REQD", "SOFTDEVICE_PRESENT", "S140", "NRF_SD_BLE_API_VERSION=5", "NRF52840_XXAA", "NRF_DFU_SETTINGS_VERSION=1", "NRF_SD_BLE_API_VERSION=5", "CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"", "MBED_TICKLESS", "MBED_DEVICEUID_SIZE=8"],
|
||||
"device_has": ["STCLK_OFF_DURING_SLEEP", "DEVICEUID"],
|
||||
"extra_labels": ["NORDIC", "MCU_NRF52840", "NRF5", "SDK13", "NRF52_COMMON"],
|
||||
"OUTPUT_EXT": "hex",
|
||||
"is_disk_virtual": true,
|
||||
|
|
Loading…
Reference in New Issue