Skip to content

Commit 02d1873

Browse files
authored
Merge pull request #11266 from u-blox/feature_adc_temp_conf
ADC internal temperature support and EMAC header fix
2 parents b005bf2 + 1ab75d3 commit 02d1873

File tree

5 files changed

+35
-1
lines changed
  • features/netsocket/emac-drivers/TARGET_STM_EMAC/TARGET_STM32F4/TARGET_MODULE_UBLOX_ODIN_W2/wifi_emac
  • targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2

5 files changed

+35
-1
lines changed

features/netsocket/emac-drivers/TARGET_STM_EMAC/TARGET_STM32F4/TARGET_MODULE_UBLOX_ODIN_W2/wifi_emac/wifi_emac.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*---------------------------------------------------------------------------
2+
* Copyright (c) 2019, u-blox Malmö, All Rights Reserved
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
117
#if DEVICE_WIFI
218

319
#include "mbed_interface.h"

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/PeripheralPins.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ const PinMap PinMap_ADC[] = {
5555
};
5656

5757
const PinMap PinMap_ADC_Internal[] = {
58-
{NC, NC, 0}
58+
{ADC_TEMP, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)},
59+
{ADC_VREF, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)},
60+
{ADC_VBAT, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)},
61+
{NC, NC, 0}
5962
};
6063

6164

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/TARGET_MBED_CONNECT_ODIN/PinNames.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ typedef enum {
150150
SPI0_CS = PE_11,
151151
SPI1_CS = PE_9,
152152

153+
// ADC internal channels
154+
ADC_TEMP = 0xF0,
155+
ADC_VREF = 0xF1,
156+
ADC_VBAT = 0xF2,
157+
153158
SPI_MOSI = SPI0_MOSI,
154159
SPI_MISO = SPI0_MISO,
155160
SPI_SCK = SPI0_SCK,

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/TARGET_MTB_UBLOX_ODIN_W2/PinNames.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ typedef enum {
164164
I2C_SDA = PF_0,
165165
I2C_SCL = PF_1,
166166

167+
// ADC internal channels
168+
ADC_TEMP = 0xF0,
169+
ADC_VREF = 0xF1,
170+
ADC_VBAT = 0xF2,
171+
167172
SPI0_MOSI = PE_14,
168173
SPI0_MISO = PE_13,
169174
SPI0_SCK = PE_12,

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/TARGET_UBLOX_EVK_ODIN_W2/PinNames.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ typedef enum {
160160
SW0 = PF_2, // Switch-0
161161
SW1 = PB_6, // Green / Switch-1
162162

163+
// ADC internal channels
164+
ADC_TEMP = 0xF0,
165+
ADC_VREF = 0xF1,
166+
ADC_VBAT = 0xF2,
167+
163168
I2C_SCL = D15,
164169
I2C_SDA = D14,
165170
SPI0_MOSI = D11,

0 commit comments

Comments
 (0)