Skip to content

Commit 7995e8b

Browse files
authored
Merge pull request #8756 from ashok-rao/br-Murata-BL241
Add Murata WSM-BL241 as new target
2 parents 78bd531 + ff55961 commit 7995e8b

File tree

4 files changed

+249
-0
lines changed

4 files changed

+249
-0
lines changed
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'features' section of the target description in 'targets.json' for more details.
3+
/* mbed Microcontroller Library
4+
* Copyright (c) 2018, Arm Limited and affiliates.
5+
* SPDX-License-Identifier: Apache-2.0
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
#ifndef MBED_PINNAMES_H
20+
#define MBED_PINNAMES_H
21+
22+
#include "cmsis.h"
23+
24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
28+
typedef enum {
29+
PIN_INPUT,
30+
PIN_OUTPUT
31+
} PinDirection;
32+
33+
#define PORT_SHIFT 3
34+
35+
typedef enum {
36+
p0 = 0,
37+
p1 = 1,
38+
p2 = 2,
39+
p3 = 3,
40+
p4 = 4,
41+
p5 = 5,
42+
p6 = 6,
43+
p7 = 7,
44+
p8 = 8,
45+
p9 = 9,
46+
p10 = 10,
47+
p11 = 11,
48+
p12 = 12,
49+
p13 = 13,
50+
p14 = 14,
51+
p15 = 15,
52+
p16 = 16,
53+
p17 = 17,
54+
p18 = 18,
55+
p19 = 19,
56+
p20 = 20,
57+
p21 = 21,
58+
p22 = 22,
59+
p23 = 23,
60+
p24 = 24,
61+
p25 = 25,
62+
p26 = 26,
63+
p27 = 27,
64+
p28 = 28,
65+
p29 = 29,
66+
p30 = 30,
67+
p31 = 31,
68+
69+
// Module pins. Refer datasheet for pin numbers.
70+
P0_0 = p0,
71+
P0_1 = p1,
72+
P0_2 = p2,
73+
P0_3 = p3,
74+
P0_4 = p4,
75+
P0_5 = p5,
76+
P0_6 = p6,
77+
P0_7 = p7,
78+
79+
P0_8 = p8,
80+
P0_9 = p9,
81+
P0_10 = p10,
82+
P0_11 = p11,
83+
P0_12 = p12,
84+
P0_13 = p13,
85+
P0_14 = p14,
86+
P0_15 = p15,
87+
88+
P0_16 = p16,
89+
P0_17 = p17,
90+
P0_18 = p18,
91+
P0_19 = p19,
92+
P0_20 = p20,
93+
P0_21 = p21,
94+
P0_22 = p22,
95+
P0_23 = p23,
96+
97+
P0_24 = p24,
98+
P0_25 = p25,
99+
P0_26 = p26,
100+
P0_27 = p27,
101+
P0_28 = p28,
102+
P0_29 = p29,
103+
P0_30 = p30,
104+
P0_31 = p31,
105+
106+
// Not connected
107+
NC = (int)0xFFFFFFFF,
108+
109+
//Mbed MTB pin defines.
110+
P_1 = P0_9,
111+
P_2 = P0_6,
112+
P_3 = P0_0,
113+
P_4 = P0_1,
114+
P_5 = NC,
115+
P_6 = NC,
116+
P_7 = NC,
117+
P_8 = NC,
118+
P_9 = P0_2,
119+
P_10 = P0_5,
120+
P_11 = P0_3,
121+
P_12 = P0_4,
122+
P_13 = P0_29,
123+
P_14 = P0_7,
124+
P_15 = P0_8,
125+
126+
P_17 = P0_21,
127+
128+
P_19 = NC,
129+
P_20 = NC,
130+
P_21 = NC,
131+
P_22 = P0_18,
132+
P_23 = P0_16,
133+
P_24 = P0_15,
134+
P_25 = P0_14,
135+
P_26 = P0_10,
136+
P_27 = P0_20,
137+
P_28 = P0_17,
138+
P_29 = P0_13,
139+
P_30 = NC,
140+
P_31 = NC,
141+
P_32 = NC,
142+
P_33 = NC,
143+
P_34 = NC,
144+
P_35 = NC,
145+
P_36 = NC,
146+
P_37 = NC,
147+
148+
//LEDs
149+
LED1 = P_22,
150+
LED_RED = LED1,
151+
152+
LED2 = NC,
153+
LED3 = NC,
154+
155+
GP0 = P_23,
156+
//Standardized button name
157+
BUTTON1 = GP0,
158+
159+
//Nordic SDK pin names
160+
RX_PIN_NUMBER = P_15,
161+
TX_PIN_NUMBER = P_2,
162+
163+
CTS_PIN_NUMBER = P_14,
164+
RTS_PIN_NUMBER = P_10,
165+
166+
// mBed interface Pins
167+
USBTX = TX_PIN_NUMBER,
168+
USBRX = RX_PIN_NUMBER,
169+
STDIO_UART_TX = TX_PIN_NUMBER,
170+
STDIO_UART_RX = RX_PIN_NUMBER,
171+
STDIO_UART_CTS = CTS_PIN_NUMBER,
172+
STDIO_UART_RTS = RTS_PIN_NUMBER,
173+
174+
SPI_MOSI = P_9,
175+
SPI_MISO = P_11,
176+
SPI_NCS = P_22, //CS for SPIFlash on MTB
177+
SPI_SCK = P_12,
178+
179+
I2C_SDA = P_25,
180+
I2C_SCL = P_24,
181+
182+
//MTB aliases
183+
AIN0 = P_13,
184+
185+
} PinName;
186+
187+
typedef enum {
188+
PullNone = 0,
189+
PullDown = 1,
190+
PullUp = 2,
191+
PullDefault = PullUp
192+
} PinMode;
193+
194+
#ifdef __cplusplus
195+
}
196+
#endif
197+
198+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'features' section of the target description in 'targets.json' for more details.
3+
/* mbed Microcontroller Library
4+
* Copyright (c) 2018, Arm Limited and affiliates.
5+
* SPDX-License-Identifier: Apache-2.0
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
#ifndef MBED_DEVICE_H
20+
#define MBED_DEVICE_H
21+
22+
#include "objects.h"
23+
24+
#endif

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/mbed_lib.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,27 @@
7676
"NRF52_PAN_64"
7777
]
7878
},
79+
"MTB_MURATA_WSM_BL241": {
80+
"target.macros_add": [
81+
"CONFIG_GPIO_AS_PINRESET",
82+
"NRF52_PAN_12",
83+
"NRF52_PAN_15",
84+
"NRF52_PAN_20",
85+
"NRF52_PAN_30",
86+
"NRF52_PAN_31",
87+
"NRF52_PAN_36",
88+
"NRF52_PAN_51",
89+
"NRF52_PAN_53",
90+
"NRF52_PAN_54",
91+
"NRF52_PAN_55",
92+
"NRF52_PAN_58",
93+
"NRF52_PAN_62",
94+
"NRF52_PAN_63",
95+
"NRF52_PAN_64"
96+
],
97+
"target.lf_clock_src": "NRF_LF_SRC_XTAL",
98+
"target.console-uart-flow-control": null
99+
},
79100
"NRF52_DK": {
80101
"target.macros_add": [
81102
"CONFIG_GPIO_AS_PINRESET",

targets/targets.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6363,6 +6363,12 @@
63636363
"release_versions": ["5"],
63646364
"device_name": "nRF52832_xxAA"
63656365
},
6366+
"MTB_MURATA_WSM_BL241": {
6367+
"inherits": ["MCU_NRF52832"],
6368+
"release_versions": ["5"],
6369+
"device_name": "nRF52832_xxAA",
6370+
"detect_code": ["0466"]
6371+
},
63666372
"DELTA_DFBM_NQ620": {
63676373
"supported_form_factors": ["ARDUINO"],
63686374
"inherits": ["MCU_NRF52832"],

0 commit comments

Comments
 (0)