Skip to content

Commit ba0a476

Browse files
author
Cruz Monrreal
authored
Merge pull request #8753 from 0xc0170/dev_rollup
Rollup PR: Retest bundled PRs that experienced CI issues
2 parents 1ac4d9b + a2bced7 commit ba0a476

File tree

68 files changed

+6457
-270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+6457
-270
lines changed

TESTS/network/wifi/wifi_connect_nocredentials.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ using namespace utest::v1;
2626
void wifi_connect_nocredentials(void)
2727
{
2828
WiFiInterface *wifi = get_interface();
29-
nsapi_error_t error;
30-
error = wifi->connect();
31-
TEST_ASSERT(error == NSAPI_ERROR_NO_SSID || error == NSAPI_ERROR_PARAMETER);
29+
nsapi_error_t error_connect, error_disconnect;
30+
error_connect = wifi->connect();
31+
error_disconnect = wifi->disconnect();
32+
TEST_ASSERT(error_connect == NSAPI_ERROR_NO_SSID || error_connect == NSAPI_ERROR_PARAMETER);
33+
TEST_ASSERT(error_disconnect == NSAPI_ERROR_NO_CONNECTION);
3234
}

TESTS/network/wifi/wifi_connect_params_channel.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ void wifi_connect_params_channel(void)
3535
}
3636

3737
nsapi_error_t error = wifi->connect(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, get_security(), MBED_CONF_APP_WIFI_CH_SECURE);
38-
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, error);
3938

4039
wifi->set_channel(0);
40+
41+
wifi->disconnect();
42+
43+
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, error);
4144
}
4245

4346
#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID)

TESTS/network/wifi/wifi_connect_params_null.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ using namespace utest::v1;
2525

2626
void wifi_connect_params_null(void)
2727
{
28+
nsapi_error_t error;
2829
WiFiInterface *wifi = get_interface();
29-
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_PARAMETER, wifi->connect(NULL, NULL));
30-
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_PARAMETER, wifi->connect("", ""));
30+
error = wifi->connect(NULL, NULL);
31+
wifi->disconnect();
32+
TEST_ASSERT(error == NSAPI_ERROR_PARAMETER);
33+
error = wifi->connect("", "");
34+
wifi->disconnect();
35+
TEST_ASSERT(error == NSAPI_ERROR_PARAMETER);
3136
}

TESTS/network/wifi/wifi_connect_params_valid_secure.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ void wifi_connect_params_valid_secure(void)
3030
WiFiInterface *wifi = get_interface();
3131

3232
if (wifi->connect(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, get_security()) == NSAPI_ERROR_OK) {
33+
wifi->disconnect();
3334
return;
3435
}
3536

TESTS/network/wifi/wifi_connect_secure.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ void wifi_connect_secure(void)
3232
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->set_credentials(MBED_CONF_APP_WIFI_SECURE_SSID, MBED_CONF_APP_WIFI_PASSWORD, get_security()));
3333

3434
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->connect());
35+
36+
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->disconnect());
3537
}
3638

3739
#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID)

TESTS/network/wifi/wifi_connect_secure_fail.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ void wifi_connect_secure_fail(void)
3232
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->set_credentials(MBED_CONF_APP_WIFI_SECURE_SSID, "aaaaaaaa", get_security()));
3333
nsapi_error_t error;
3434
error = wifi->connect();
35+
wifi->disconnect();
3536
TEST_ASSERT(error == NSAPI_ERROR_AUTH_FAILURE ||
3637
error == NSAPI_ERROR_CONNECTION_TIMEOUT ||
3738
error == NSAPI_ERROR_NO_CONNECTION);
39+
3840
}
3941

4042
#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID)

TESTS/network/wifi/wifi_get_rssi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ void wifi_get_rssi(void)
3636
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->connect());
3737

3838
TEST_ASSERT_INT8_WITHIN(-10, -100, wifi->get_rssi());
39+
40+
TEST_ASSERT_EQUAL_INT(NSAPI_ERROR_OK, wifi->disconnect());
3941
}
4042

4143
#endif // defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)

UNITTESTS/features/lorawan/lorawantimer/unittest.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ set(unittest-test-sources
3737
stubs/equeue_stub.c
3838
)
3939

40+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNDEBUG=1")
41+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDEBUG=1")
42+

features/lwipstack/mbed_lib.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
},
141141
"ARCH_PRO": {
142142
"mem-size": 16362
143-
},
143+
},
144144
"LPC546XX": {
145145
"mem-size": 36496
146146
},
@@ -157,6 +157,9 @@
157157
"tcp-wnd": "(TCP_MSS * 8)",
158158
"pbuf-pool-size": 16,
159159
"mem-size": 51200
160+
},
161+
"MIMXRT1050_EVK": {
162+
"mem-size": 36560
160163
}
161164
}
162165
}
Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
/*
2+
* Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without modification,
6+
* are permitted provided that the following conditions are met:
7+
*
8+
* o Redistributions of source code must retain the above copyright notice, this list
9+
* of conditions and the following disclaimer.
10+
*
11+
* o Redistributions in binary form must reproduce the above copyright notice, this
12+
* list of conditions and the following disclaimer in the documentation and/or
13+
* other materials provided with the distribution.
14+
*
15+
* o Neither the name of Freescale Semiconductor, Inc. nor the names of its
16+
* contributors may be used to endorse or promote products derived from this
17+
* software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
23+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
#include "fsl_gpio.h"
32+
#include "fsl_iomuxc.h"
33+
#include "fsl_clock.h"
34+
#include "mbed_wait_api.h"
35+
36+
/*******************************************************************************
37+
* Code
38+
******************************************************************************/
39+
static void BOARD_InitModuleClock(void)
40+
{
41+
const clock_enet_pll_config_t config = {true, false, 1};
42+
CLOCK_InitEnetPll(&config);
43+
}
44+
45+
void kinetis_init_eth_hardware(void)
46+
{
47+
gpio_pin_config_t gpio_config = {kGPIO_DigitalOutput, 0, kGPIO_NoIntmode};
48+
49+
CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
50+
51+
IOMUXC_SetPinMux(
52+
IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, /* GPIO_AD_B0_09 is configured as GPIO1_IO09 */
53+
0U); /* Software Input On Field: Input Path is determined by functionality */
54+
IOMUXC_SetPinMux(
55+
IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, /* GPIO_AD_B0_10 is configured as GPIO1_IO10 */
56+
0U); /* Software Input On Field: Input Path is determined by functionality */
57+
IOMUXC_SetPinMux(
58+
IOMUXC_GPIO_B1_04_ENET_RX_DATA00, /* GPIO_B1_04 is configured as ENET_RX_DATA00 */
59+
0U); /* Software Input On Field: Input Path is determined by functionality */
60+
IOMUXC_SetPinMux(
61+
IOMUXC_GPIO_B1_05_ENET_RX_DATA01, /* GPIO_B1_05 is configured as ENET_RX_DATA01 */
62+
0U); /* Software Input On Field: Input Path is determined by functionality */
63+
IOMUXC_SetPinMux(
64+
IOMUXC_GPIO_B1_06_ENET_RX_EN, /* GPIO_B1_06 is configured as ENET_RX_EN */
65+
0U); /* Software Input On Field: Input Path is determined by functionality */
66+
IOMUXC_SetPinMux(
67+
IOMUXC_GPIO_B1_07_ENET_TX_DATA00, /* GPIO_B1_07 is configured as ENET_TX_DATA00 */
68+
0U); /* Software Input On Field: Input Path is determined by functionality */
69+
IOMUXC_SetPinMux(
70+
IOMUXC_GPIO_B1_08_ENET_TX_DATA01, /* GPIO_B1_08 is configured as ENET_TX_DATA01 */
71+
0U); /* Software Input On Field: Input Path is determined by functionality */
72+
IOMUXC_SetPinMux(
73+
IOMUXC_GPIO_B1_09_ENET_TX_EN, /* GPIO_B1_09 is configured as ENET_TX_EN */
74+
0U); /* Software Input On Field: Input Path is determined by functionality */
75+
IOMUXC_SetPinMux(
76+
IOMUXC_GPIO_B1_10_ENET_REF_CLK, /* GPIO_B1_10 is configured as ENET_REF_CLK */
77+
1U); /* Software Input On Field: Force input path of pad GPIO_B1_10 */
78+
IOMUXC_SetPinMux(
79+
IOMUXC_GPIO_B1_11_ENET_RX_ER, /* GPIO_B1_11 is configured as ENET_RX_ER */
80+
0U); /* Software Input On Field: Input Path is determined by functionality */
81+
IOMUXC_SetPinMux(
82+
IOMUXC_GPIO_EMC_40_ENET_MDC, /* GPIO_EMC_40 is configured as ENET_MDC */
83+
0U); /* Software Input On Field: Input Path is determined by functionality */
84+
IOMUXC_SetPinMux(
85+
IOMUXC_GPIO_EMC_41_ENET_MDIO, /* GPIO_EMC_41 is configured as ENET_MDIO */
86+
0U); /* Software Input On Field: Input Path is determined by functionality */
87+
IOMUXC_SetPinConfig(
88+
IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, /* GPIO_AD_B0_09 PAD functional properties : */
89+
0xB0A9u); /* Slew Rate Field: Fast Slew Rate
90+
Drive Strength Field: R0/5
91+
Speed Field: medium(100MHz)
92+
Open Drain Enable Field: Open Drain Disabled
93+
Pull / Keep Enable Field: Pull/Keeper Enabled
94+
Pull / Keep Select Field: Pull
95+
Pull Up / Down Config. Field: 100K Ohm Pull Up
96+
Hyst. Enable Field: Hysteresis Disabled */
97+
IOMUXC_SetPinConfig(
98+
IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, /* GPIO_AD_B0_10 PAD functional properties : */
99+
0xB0A9u); /* Slew Rate Field: Fast Slew Rate
100+
Drive Strength Field: R0/5
101+
Speed Field: medium(100MHz)
102+
Open Drain Enable Field: Open Drain Disabled
103+
Pull / Keep Enable Field: Pull/Keeper Enabled
104+
Pull / Keep Select Field: Pull
105+
Pull Up / Down Config. Field: 100K Ohm Pull Up
106+
Hyst. Enable Field: Hysteresis Disabled */
107+
IOMUXC_SetPinConfig(
108+
IOMUXC_GPIO_B1_04_ENET_RX_DATA00, /* GPIO_B1_04 PAD functional properties : */
109+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
110+
Drive Strength Field: R0/5
111+
Speed Field: max(200MHz)
112+
Open Drain Enable Field: Open Drain Disabled
113+
Pull / Keep Enable Field: Pull/Keeper Enabled
114+
Pull / Keep Select Field: Pull
115+
Pull Up / Down Config. Field: 100K Ohm Pull Up
116+
Hyst. Enable Field: Hysteresis Disabled */
117+
IOMUXC_SetPinConfig(
118+
IOMUXC_GPIO_B1_05_ENET_RX_DATA01, /* GPIO_B1_05 PAD functional properties : */
119+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
120+
Drive Strength Field: R0/5
121+
Speed Field: max(200MHz)
122+
Open Drain Enable Field: Open Drain Disabled
123+
Pull / Keep Enable Field: Pull/Keeper Enabled
124+
Pull / Keep Select Field: Pull
125+
Pull Up / Down Config. Field: 100K Ohm Pull Up
126+
Hyst. Enable Field: Hysteresis Disabled */
127+
IOMUXC_SetPinConfig(
128+
IOMUXC_GPIO_B1_06_ENET_RX_EN, /* GPIO_B1_06 PAD functional properties : */
129+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
130+
Drive Strength Field: R0/5
131+
Speed Field: max(200MHz)
132+
Open Drain Enable Field: Open Drain Disabled
133+
Pull / Keep Enable Field: Pull/Keeper Enabled
134+
Pull / Keep Select Field: Pull
135+
Pull Up / Down Config. Field: 100K Ohm Pull Up
136+
Hyst. Enable Field: Hysteresis Disabled */
137+
IOMUXC_SetPinConfig(
138+
IOMUXC_GPIO_B1_07_ENET_TX_DATA00, /* GPIO_B1_07 PAD functional properties : */
139+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
140+
Drive Strength Field: R0/5
141+
Speed Field: max(200MHz)
142+
Open Drain Enable Field: Open Drain Disabled
143+
Pull / Keep Enable Field: Pull/Keeper Enabled
144+
Pull / Keep Select Field: Pull
145+
Pull Up / Down Config. Field: 100K Ohm Pull Up
146+
Hyst. Enable Field: Hysteresis Disabled */
147+
IOMUXC_SetPinConfig(
148+
IOMUXC_GPIO_B1_08_ENET_TX_DATA01, /* GPIO_B1_08 PAD functional properties : */
149+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
150+
Drive Strength Field: R0/5
151+
Speed Field: max(200MHz)
152+
Open Drain Enable Field: Open Drain Disabled
153+
Pull / Keep Enable Field: Pull/Keeper Enabled
154+
Pull / Keep Select Field: Pull
155+
Pull Up / Down Config. Field: 100K Ohm Pull Up
156+
Hyst. Enable Field: Hysteresis Disabled */
157+
IOMUXC_SetPinConfig(
158+
IOMUXC_GPIO_B1_09_ENET_TX_EN, /* GPIO_B1_09 PAD functional properties : */
159+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
160+
Drive Strength Field: R0/5
161+
Speed Field: max(200MHz)
162+
Open Drain Enable Field: Open Drain Disabled
163+
Pull / Keep Enable Field: Pull/Keeper Enabled
164+
Pull / Keep Select Field: Pull
165+
Pull Up / Down Config. Field: 100K Ohm Pull Up
166+
Hyst. Enable Field: Hysteresis Disabled */
167+
IOMUXC_SetPinConfig(
168+
IOMUXC_GPIO_B1_10_ENET_REF_CLK, /* GPIO_B1_10 PAD functional properties : */
169+
0x31u); /* Slew Rate Field: Fast Slew Rate
170+
Drive Strength Field: R0/6
171+
Speed Field: low(50MHz)
172+
Open Drain Enable Field: Open Drain Disabled
173+
Pull / Keep Enable Field: Pull/Keeper Disabled
174+
Pull / Keep Select Field: Keeper
175+
Pull Up / Down Config. Field: 100K Ohm Pull Down
176+
Hyst. Enable Field: Hysteresis Disabled */
177+
IOMUXC_SetPinConfig(
178+
IOMUXC_GPIO_B1_11_ENET_RX_ER, /* GPIO_B1_11 PAD functional properties : */
179+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
180+
Drive Strength Field: R0/5
181+
Speed Field: max(200MHz)
182+
Open Drain Enable Field: Open Drain Disabled
183+
Pull / Keep Enable Field: Pull/Keeper Enabled
184+
Pull / Keep Select Field: Pull
185+
Pull Up / Down Config. Field: 100K Ohm Pull Up
186+
Hyst. Enable Field: Hysteresis Disabled */
187+
IOMUXC_SetPinConfig(
188+
IOMUXC_GPIO_EMC_40_ENET_MDC, /* GPIO_EMC_40 PAD functional properties : */
189+
0xB0E9u); /* Slew Rate Field: Fast Slew Rate
190+
Drive Strength Field: R0/5
191+
Speed Field: max(200MHz)
192+
Open Drain Enable Field: Open Drain Disabled
193+
Pull / Keep Enable Field: Pull/Keeper Enabled
194+
Pull / Keep Select Field: Pull
195+
Pull Up / Down Config. Field: 100K Ohm Pull Up
196+
Hyst. Enable Field: Hysteresis Disabled */
197+
IOMUXC_SetPinConfig(
198+
IOMUXC_GPIO_EMC_41_ENET_MDIO, /* GPIO_EMC_41 PAD functional properties : */
199+
0xB829u); /* Slew Rate Field: Fast Slew Rate
200+
Drive Strength Field: R0/5
201+
Speed Field: low(50MHz)
202+
Open Drain Enable Field: Open Drain Enabled
203+
Pull / Keep Enable Field: Pull/Keeper Enabled
204+
Pull / Keep Select Field: Pull
205+
Pull Up / Down Config. Field: 100K Ohm Pull Up
206+
Hyst. Enable Field: Hysteresis Disabled */
207+
208+
209+
BOARD_InitModuleClock();
210+
211+
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, true);
212+
213+
GPIO_PinInit(GPIO1, 9, &gpio_config);
214+
GPIO_PinInit(GPIO1, 10, &gpio_config);
215+
/* pull up the ENET_INT before RESET. */
216+
GPIO_WritePinOutput(GPIO1, 10, 1);
217+
GPIO_WritePinOutput(GPIO1, 9, 0);
218+
wait_ms(1);
219+
GPIO_WritePinOutput(GPIO1, 9, 1);
220+
}
221+
222+
/*******************************************************************************
223+
* EOF
224+
******************************************************************************/
225+
226+

0 commit comments

Comments
 (0)