Skip to content

Commit 0f12c68

Browse files
Merge branch 'master' into ubx_modems_custom_boards
2 parents c884197 + 18d4adf commit 0f12c68

File tree

795 files changed

+47980
-12808
lines changed

Some content is hidden

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

795 files changed

+47980
-12808
lines changed

.github/issue_template.md

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,34 @@
66
template may cause the bot to automatically correct this header or may result in a
77
warning message, requesting updates.
88
9-
Please ensure that nothing follows the Issue request type section, all
10-
issue details are within the Description section and no changes are made to the
11-
template format (as detailed below).
9+
Please ensure all sections of the template below are filled in and no changes
10+
are made to the template format. Only bugs should be raised here as issues.
11+
Questions or enhancements should instead be raised on our forums:
12+
https://forums.mbed.com/ .
1213
1314
*************************************************************************************
1415
1516
-->
1617

17-
### Description
18+
### Description of defect
1819

1920
<!--
20-
Required
2121
Add detailed description of what you are reporting.
2222
Good example: https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html
23-
Things to consider sharing:
24-
- What target does this relate to?
25-
- What toolchain (name + version) are you using?
26-
- What tools (name + version - is it mbed-cli, online compiler or IDE) are you using?
27-
- What is the SHA of Mbed OS (git log -n1 --oneline)?
28-
- Steps to reproduce. (Did you publish code or a test case that exhibits the problem?)
2923
-->
3024

3125

32-
### Issue request type
26+
#### Target(s) affected by this defect ?
27+
28+
29+
#### Toolchain(s) (name and version) displaying this defect ?
30+
31+
32+
#### What version of Mbed-os are you using (tag or sha) ?
33+
34+
#### What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
35+
36+
37+
#### How is this defect reproduced ?
3338

34-
<!--
35-
Required
36-
Please add only one X to one of the following types. Do not fill multiple types (split the issue otherwise.)
37-
Please note this is not a GitHub task list, indenting the boxes or changing the format to add a '.' or '*' in front
38-
of them would change the meaning incorrectly. The only changes to be made are to add a description text under the
39-
description heading and to add a 'x' to the correct box.
40-
-->
41-
[ ] Question
42-
[ ] Enhancement
43-
[ ] Bug
4439

.github/pull_request_template.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
### Description
1+
<!--
2+
For more information on the requirements for pull requests, please see [the contributing guidelines](https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html#pull-request-types).
3+
-->
4+
### Description (*required*)
25

36
<!--
47
Required
58
Add here detailed changes summary, testing results, dependencies
69
Good example: https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html (Pull request template)
710
-->
11+
##### Summary of change (*What the change is for and why*)
812

913

10-
### Pull request type
14+
##### Documentation (*Details of any document updates required*)
15+
16+
----------------------------------------------------------------------------------------------------------------
17+
### Pull request type (*required*)
1118

1219
<!--
1320
Required
@@ -16,25 +23,44 @@
1623
of them would change the meaning incorrectly. The only changes to be made are to add a description text under the
1724
description heading and to add a 'x' to the correct box.
1825
-->
19-
[ ] Fix
20-
[ ] Refactor
21-
[ ] Target update
22-
[ ] Functionality change
23-
[ ] Docs update
24-
[ ] Test update
25-
[ ] Breaking change
26+
[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
27+
[] Feature update (New feature / Functionality change / New API)
28+
[] Major update (Breaking change E.g. Return code change / API behaviour change)
29+
30+
----------------------------------------------------------------------------------------------------------------
31+
### Test results (*required*)
2632

27-
### Reviewers
33+
<!--
34+
Required
35+
For example, add test results for new target
36+
-->
37+
[] No Tests required for this change (E.g docs only update)
38+
[] Covered by existing mbed-os tests (Greentea or Unittest)
39+
[] Tests / results supplied as part of this PR
40+
41+
42+
----------------------------------------------------------------------------------------------------------------
43+
### Reviewers (*optional*)
2844

2945
<!--
3046
Optional
3147
Request additional reviewers with @username
3248
-->
3349

34-
### Release Notes
50+
----------------------------------------------------------------------------------------------------------------
51+
### Release Notes (*required for feature/major PRs*)
3552

3653
<!--
37-
Optional
38-
In case of breaking changes, functionality changes or refactors, please add release notes here.
39-
For more information, please see [the contributing guidelines](https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html#pull-request-types).
54+
All 3 sections are compulsory for Major PR types. For Feature PRs only the summary section is required.
55+
This section is automatically added to release notes. Please fill in each sub-section with sufficient detail for a user.
56+
For more information, please see [the contributing guidelines](https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html#pull-request-types).
4057
-->
58+
59+
##### Summary of changes
60+
61+
##### Impact of changes
62+
63+
##### Migration actions required
64+
65+
66+

TESTS/host_tests/reset_reason.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"""
1717
import time
1818
from mbed_host_tests import BaseHostTest
19-
from mbed_host_tests.host_tests_runner.host_test_default import DefaultTestSelector
2019

2120
DEFAULT_SYNC_DELAY = 4.0
2221

@@ -32,6 +31,7 @@
3231
MSG_KEY_RESET_REASON = 'reason'
3332
MSG_KEY_DEVICE_RESET = 'reset'
3433
MSG_KEY_SYNC = '__sync'
34+
MSG_KEY_RESET_COMPLETE = 'reset_complete'
3535

3636
RESET_REASONS = {
3737
'POWER_ON': '0',
@@ -80,6 +80,7 @@ def setup(self):
8080
self.register_callback(MSG_KEY_RESET_REASON_RAW, self.cb_reset_reason_raw)
8181
self.register_callback(MSG_KEY_RESET_REASON, self.cb_reset_reason)
8282
self.register_callback(MSG_KEY_DEVICE_RESET, self.cb_reset_reason)
83+
self.register_callback(MSG_KEY_RESET_COMPLETE, self.cb_reset_reason)
8384

8485
def cb_device_ready(self, key, value, timestamp):
8586
"""Request a raw value of the reset_reason register.
@@ -142,7 +143,10 @@ def test_steps(self):
142143
__ignored_clear_ack = yield
143144

144145
# Reset the device using DAP.
145-
self.reset_dut(DefaultTestSelector.RESET_TYPE_SW_RST)
146+
self.reset()
147+
__ignored_reset_ack = yield # 'reset_complete'
148+
time.sleep(self.sync_delay)
149+
self.send_kv(MSG_KEY_SYNC, MSG_VALUE_DUMMY)
146150
reset_reason = yield
147151
raise_if_different(RESET_REASONS['PIN_RESET'], reset_reason, 'Wrong reset reason. ')
148152
self.send_kv(MSG_KEY_RESET_REASON, MSG_VALUE_RESET_REASON_CLEAR)

TESTS/mbed_drivers/flashiap/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ void flashiap_cross_sector_program_test()
143143
TEST_ASSERT_EQUAL_INT32(0, ret);
144144

145145
uint32_t page_size = flash_device.get_page_size();
146+
uint8_t erase_value = flash_device.get_erase_value();
146147

147148
// Erase last two sectors
148149
uint32_t address = flash_device.get_flash_start() + flash_device.get_flash_size();
@@ -170,7 +171,7 @@ void flashiap_cross_sector_program_test()
170171
data[i] = rand() % 256;
171172
}
172173
for (uint32_t i = prog_size; i < aligned_prog_size; i++) {
173-
data[i] = 0xFF;
174+
data[i] = erase_value;
174175
}
175176

176177
ret = flash_device.program(data, address, prog_size);

TESTS/mbed_hal/qspi/flash_configs/SiliconLabs/EFM32GG11_STK3701/flash_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@
2323
#define QSPI_SECTOR_COUNT 1024 // for MX25R3235F
2424
#endif
2525

26+
#define QSPI_MIN_FREQUENCY 2000000
27+
2628
#endif // MBED_QSPI_FLASH_CONFIG_H

TESTS/mbed_hal/qspi/flash_configs/flash_configs.h

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,8 @@
1717
#ifndef MBED_FLASH_CONFIGS_H
1818
#define MBED_FLASH_CONFIGS_H
1919

20-
#if defined(TARGET_DISCO_L475VG_IOT01A)
21-
#include "MX25RXX35F_config.h" // MX25R6435F
22-
23-
#elif defined(TARGET_DISCO_F413ZH)
24-
#include "N25Q128A_config.h" // N25Q128A13EF840F
25-
26-
#elif defined(TARGET_DISCO_F746NG)
27-
#include "N25Q128A_config.h" // N25Q128A13EF840E
28-
29-
#elif defined(TARGET_DISCO_F469NI)
30-
#include "N25Q128A_config.h" // N25Q128A13EF840E
31-
32-
#elif defined(TARGET_DISCO_F769NI)
33-
#include "MX25L51245G_config.h" // MX25L51245G
34-
35-
#elif defined(TARGET_DISCO_L4R9I)
36-
#include "MX25LM51245G_config.h" // MX25LM51245G
20+
#if defined(TARGET_MX25R6435F)
21+
#include "MX25RXX35F_config.h"
3722

3823
#elif defined(TARGET_DISCO_L476VG)
3924
#include "N25Q128A_config.h" // N25Q128A13EF840E
@@ -43,6 +28,15 @@
4328
#undef QSPI_CMD_WRITE_DPI
4429
#undef QSPI_CMD_WRITE_QPI
4530

31+
#elif defined(TARGET_N25Q128A)
32+
#include "N25Q128A_config.h"
33+
34+
#elif defined(TARGET_MX25L51245G)
35+
#include "MX25L51245G_config.h"
36+
37+
#elif defined(TARGET_MX25LM51245G)
38+
#include "MX25LM51245G_config.h"
39+
4640
#elif defined(TARGET_RHOMBIO_L476DMW1K)
4741
#include "MT25Q_config.h" // MT25QL128ABA1EW7
4842
/* See STM32L476 Errata Sheet, it is not possible to use Dual-/Quad-mode for the command phase */
@@ -51,9 +45,6 @@
5145
#undef QSPI_CMD_WRITE_DPI
5246
#undef QSPI_CMD_WRITE_QPI
5347

54-
#elif defined(TARGET_DISCO_L496AG)
55-
#include "MX25RXX35F_config.h" // MX25R6435F
56-
5748
#elif defined(TARGET_NRF52840)
5849
#include "NORDIC/NRF52840_DK/flash_config.h"
5950

@@ -82,11 +73,12 @@
8273
#include "S25FL512S_config.h"
8374

8475
#elif defined(TARGET_CYW9P62S1_43012EVB_01)
85-
#include "S25FS128S_config.h"
76+
#include "S25FS512S_config.h"
8677

8778
#elif defined(TARGET_CY8CPROTO_064_SB)
8879
#include "S25FL128S_config.h"
8980

9081
#endif
82+
9183
#endif // MBED_FLASH_CONFIGS_H
9284

TESTS/mbed_hal/qspi/main.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ using namespace utest::v1;
4242

4343

4444

45+
#ifndef QSPI_MIN_FREQUENCY
4546
#define QSPI_MIN_FREQUENCY 1000000
47+
#endif
4648

4749
// max write size is usually page size
4850
#define DATA_SIZE_256 (QSPI_PAGE_SIZE)
@@ -70,12 +72,12 @@ uint8_t rx_buf[DATA_SIZE_1024];
7072

7173

7274
// some target defines QSPI pins as integers thus conversion needed
73-
#define QPIN_0 static_cast<PinName>(QSPI_FLASH1_IO0)
74-
#define QPIN_1 static_cast<PinName>(QSPI_FLASH1_IO1)
75-
#define QPIN_2 static_cast<PinName>(QSPI_FLASH1_IO2)
76-
#define QPIN_3 static_cast<PinName>(QSPI_FLASH1_IO3)
77-
#define QSCK static_cast<PinName>(QSPI_FLASH1_SCK)
78-
#define QCSN static_cast<PinName>(QSPI_FLASH1_CSN)
75+
#define QPIN_0 static_cast<PinName>(MBED_CONF_DRIVERS_QSPI_IO0)
76+
#define QPIN_1 static_cast<PinName>(MBED_CONF_DRIVERS_QSPI_IO1)
77+
#define QPIN_2 static_cast<PinName>(MBED_CONF_DRIVERS_QSPI_IO2)
78+
#define QPIN_3 static_cast<PinName>(MBED_CONF_DRIVERS_QSPI_IO3)
79+
#define QSCK static_cast<PinName>(MBED_CONF_DRIVERS_QSPI_SCK)
80+
#define QCSN static_cast<PinName>(MBED_CONF_DRIVERS_QSPI_CSN)
7981

8082

8183
static uint32_t gen_flash_address()
@@ -344,18 +346,17 @@ void qspi_frequency_test(void)
344346
ret = qspi_init(&qspi.handle, QPIN_0, QPIN_1, QPIN_2, QPIN_3, QSCK, QCSN, freq, 0);
345347
TEST_ASSERT_EQUAL(QSPI_STATUS_OK, ret);
346348

347-
do {
349+
while (ret == QSPI_STATUS_OK && freq >= QSPI_MIN_FREQUENCY) {
348350
// check if the memory is working properly
349351
qspi.cmd.configure(MODE_1_1_1, ADDR_SIZE_24, ALT_SIZE_8);
350-
352+
ret = qspi_frequency(&qspi.handle, freq);
351353
flash_init(qspi);
352354
_qspi_write_read_test(qspi, WRITE_1_1_1, ADDR_SIZE_24, ALT_SIZE_8, WRITE_SINGLE, READ_1_1_1, ADDR_SIZE_24, ALT_SIZE_8, READ_SINGLE, TEST_REPEAT_SINGLE, DATA_SIZE_256, TEST_FLASH_ADDRESS);
353355

354356
utest_printf("frequency setting %d [Hz] - OK\r\n", freq);
355357

356358
freq /= 2;
357-
ret = qspi_frequency(&qspi.handle, freq);
358-
} while (ret == QSPI_STATUS_OK && freq >= QSPI_MIN_FREQUENCY);
359+
}
359360

360361
qspi_free(&qspi.handle);
361362
}

0 commit comments

Comments
 (0)