Certain instances of the TPM are missing some registers, updated
TPM driver handles this variation. This issue was discovered when
running the PWMOUT tests using the ci-test-shield
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
IAR 7.8 does not support dynamic heap, and some test/addition of new
feature fail on this device because of less static RAM memory.
Reducing the heap memory size for the same reason.
The vector table relocation sequence depends on:
1. Whether the SoftDevice is present.
2. The Application is a bootloader or not.
If the SoftDevice is present and the application is a bootloader
the MBR must be initialized to trap SoftDevice service calls
before setting the new vector table address.
The SCB->VTOR must be set to point at the MBR as well.
If the SoftDevice is not present the SCB->VTOR can point at the
new vector table directly.
We cannot rely on the default value as a pin could
be use for Analog purposes in which this bit is cleared
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
SPI pins are not initialized correctly according to the current
SPI mode.
This commit changes how the SPI instance is configured and ensures
that:
1. SPI pins are initialized on each object initialization.
2. SPI pins are reinitialized on each mode or object change.
3. SPI instance is only initialized when a change has occured.
* Updates driver library to v2.3.1 (2018q1) for bugfixes and convenience functions
* Provides library in correct format (2-byte wchar_t flag) for compiling with ARMCC (#6695 uncovered by #6577)
* Reverts to using a statically-allocated packet buffer since malloc is not thread-safe (and the asserts have been turned on)
This commit changes the conversion function to do all the calculation
inside the HAL in ticks instead of microseconds.
The conversion will be done in Mbed OS side.
As SystemCoreClock is not a constant, it can not be used to initialise
the ticker_info_t structure.
Change-Id: I8fd4bf20dc5be8b965aca45f800a631275ccc724
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit changes the code to fix the compiler warnings on ARM,
GCC_ARM and IAR.
Change-Id: I92676d2cc85daacde9f43f1898377a2cea750c50
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit changes the clock frequency to the good value of 25 MHz.
Change-Id: I18e559718619e3b1942c42fda2413b690c7b5852
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit does not bring functional changes.
Here is the list of changes:
- merge CMSDK_CM3DS.h and SMM_MPS2.h into CM3DS.h
- remove unused code
- split copyright headers from first comment of each file
Change-Id: I79b7ee01689439b7d2fde9d13035a5edf17f69ff
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
- fix compiler warning message of flash_api.c
- fix compiler warning message of startup_ADuCM4050.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
* Consolidated device_has and macros to the main MCU targets.
* Moved errata configuration to mbed_lib.json for HAL implementation.
* Moved clock configuration to mbed_lib.json for HAL implementation.
* Moved UART configuration to mbed_lib.json for HAL implementation.
Instance counter keeps track of how many objects have been
initialized and freed. On the first object the instance is
enabled and on the last object the instance is disabled.
Serial implementation uses UARTE instead of UART peripheral:
* EasyDMA is used for reading and writing data.
* Triple buffering for receiving data.
See README for full description.
When possible, the I2C HAL will now use the TWI driver in SDK 14.
The manual I2C API still maps onto the old TWI peripheral directly
because the TWI driver doesn't provide the needed low-level functionality.
The NRF52 series can map digital signals to any physical pin which
makes it challenging to associate pin names with hardware instances.
pinmap_ex:
Keep track of which hardware instance is in use and what pins are
associated with it. Currently only supports I2C and SPI, but
provides a mechanism for allocating the shared I2C/SPI hardware.
PeripheralPinsDefault:
Optional pin map for pre-assigning hardware instances at compile
time. This makes it easier to optimize hardware utilization.
* Add NRF_SD_BLE_API_VERSION=5 macro to MCU_NRF52832 target
* Added initial Softdevice v5 API support for nRF5XPalGattClient.cpp
* Added initial Softdevice v5 API support for nRF5xGap.h
* Added initial Softdevice v5 API support for nRF5xGattServer.cpp
* Make sure the ah() hash function used by the security manager is declared with C linkage
* Removed 'ARM porting pending' checks in Nordic SDK
* Added BLE configuration to mbed_lib.json for NRF52x targets
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in btle.cpp; adopted polling dispatch model
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in nRF5xn.cpp
* Migrated APIs and events model for Nordic SDK14.2 & SD API v5 in nRF5xGap.cpp
* Added const qualifier to hwCallbacks's p_ble_evt parameter in nRF5xGattServer
* Add workaround to enable Radio Notification module from Nordic SDK
* Disabled SWI1 interrupt manually from SWI driver module
* Added missing include directive for "nrf_nvic.h" in ble_radio_notification.c
* Set correct number of custom UUIDs
* Adjust Softdevice RAM requirements for NRF52832/S132
* RAM settings for the application were adjusted as follow:
* Start: 0x20003800
* Size: 0xC800
* Adjust Softdevice RAM requirements for NRF52840/S140
* RAM settings for the application were adjusted as follow:
* Start: 0x20003700 (was 0x20003000)
* Size: 0xC900
* Added 3dBm as a permitted TX Power value for NRF52832
* Fix address type recovery in GAP
* Return min non-connectable adv interval compatible with infrastrcture's expectations
* Moved BLE driver from TARGET_SDK_14_2/FEATURE_BLE to TARGET_SDK_14_2/TARGET_SOFTDEVICE_COMMON/ble
* When multiple TRNG objects are initialized, destroying the first
object will turn the TRNG off for the other objects. This fix
adds a counter to ensure that only when the last object is
destroyed will it cause the TRNG to be disabled.
* The corner case where a user request 0 bytes is correctly handled
and will now return immediately.
Add fstorage and fds from Nordic SDK for SoftDevice compatible
flash storage. Mbed HAL flash API mapped to use fstorage API
to ensure write and erase doesn't conflict with BLE operation.
Various bug fixes:
* Moved SPIM3 location in vector table based on new location in SDK 14.2.
* Updated vector table entries and size in startup code and linker scripts.
* Added missing vector table RAM section to IAR linker script.
Ability to swap SoftDevices using the mbed configuration system.
For example, build NRF52840_DK without SoftDevice:
"target_overrides": {
"*": {
"target.MERGE_SOFT_DEVICE": false,
"target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S140"],
"target.extra_labels_add": ["SOFTDEVICE_NONE"]
}
}
Pinned down vector table to beginningn of RAM.
Critical section enter/exit is now delegated to Nordic SDK's
sd_nvic_critical_region_enter
sd_nvic_critical_region_exit
When the SoftDevice is not included these functions map to
__disable_irq
__enable_irq
Initial commit for separating NRF52 code from the NRF51 and for
combining the NRF52832 and NRF52840 SDK to version 14.
nRF5_SDK_14.2.0_17b948a.zip has been used as baseline.
The folders in SDK/components:
* ble
* boards
* device
* drivers_nrf
* libraries
* softdevice
have been copied to TARGET_NORDIC/TARGET_NRF52/TARGET_SDK14.
Each folder contains a README.md file describing any modifications
made to that particular folder. Most common operation is deletion
of files.
If the need arise in the future the missing files can be added again.
The SoftDevices have been moved to TARGET_SOFTDEVICE_x folders for
flexible selection.
ble.h has been renamed to nrf_ble.h to avoid namespace clash with
mbed OS BLE.
Fix the following warnings:
[Warning] wifi_util.c@791,20: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] wifi_util.c@835,21: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following errors:
[Warning] dhcps.c@158,1: label 'Exit' defined but not used [-Wunused-label]
[Warning] dhcps.c@161,13: 'dump_client_table' defined but not used [-Wunused-function]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] wifi_promisc.c@113,61: missing braces around initializer [-Wmissing-braces]
[Warning] wifi_promisc.c@297,52: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] wifi_promisc.c@403,52: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warning:
[Warning] lwip_intf.c@134,5: this 'if' clause does not guard... [-Wmisleading-indentation]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] tcm_heap.c@70,18: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=]
[Warning] tcm_heap.c@70,28: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=]
[Warning] tcm_heap.c@336,6: unused variable 'i' [-Wunused-variable]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 4 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 5 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 6 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 7 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 8 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 4 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 5 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 6 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 7 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 8 has type 'char*' [-Wformat=]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] wifi_conf.c@326,28: suggest parentheses around comparison in operand of '|' [-Wparentheses]
[Warning] wifi_conf.c@451,39: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,43: format '%x' expects argument of type 'unsigned int *', but argument 4 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,47: format '%x' expects argument of type 'unsigned int *', but argument 5 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,51: format '%x' expects argument of type 'unsigned int *', but argument 6 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,55: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,39: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,43: format '%x' expects argument of type 'unsigned int *', but argument 4 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,47: format '%x' expects argument of type 'unsigned int *', but argument 5 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,51: format '%x' expects argument of type 'unsigned int *', but argument 6 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,55: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,59: format '%x' expects argument of type 'unsigned int *', but argument 8 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,63: format '%x' expects argument of type 'unsigned int *', but argument 9 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 10 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 11 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 12 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 13 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 14 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 15 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@831,16: format '%d' expects argument of type 'int *', but argument 3 has type 'rtw_security_t * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@1335,2: suggest parentheses around assignment used as truth value [-Wparentheses]
[Warning] wifi_conf.c@1398,13: pointer targets in passing argument 1 of 'rtw_mfree' differ in signedness [-Wpointer-sign]
[Warning] wifi_conf.c@1724,7: variable 'ret' set but not used [-Wunused-but-set-variable]
[Warning] wifi_conf.c@1770,6: variable 'ret' set but not used [-Wunused-but-set-variable]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] osdep_service.c@58,11: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] osdep_service.c@208,61: suggest braces around empty body in an 'else' statement [-Wempty-body]
[Warning] osdep_service.c@1063,16: pointer targets in passing argument 1 of '_rtw_mfree' differ in signedness [-Wpointer-sign]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] hal_ssi.h@28,85: suggest braces around empty body in an 'if' statement [-Wempty-body]
[Warning] spi_api.c@87,27: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] spi_api.c@76,14: unused variable 'MaxSsiFreq' [-Wunused-variable]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warning:
[Warning] pwmout_api.c@65,29: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tony Wu <tonywu@realtek.com>
Fix the following warnings:
[Warning] i2c_api.c@94,26: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] i2c_api.c@231,5: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
[Warning] i2c_api.c@460,14: unused variable 'i2c_default_addr' [-Wunused-variable]
Signed-off-by: Tony Wu <tonywu@realtek.com>
The ci-shield tests that manually generate the START, STOP
by calling the HAL functions were failing. The byte operation
HAL functions cannot use the MCUXpresso SDK driver API's.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Some platforms have interface chips with hardware flow control
enabled by default. This commit adds configurable flow control to
STDOUT.
Usage:
* Define pin names STDIO_UART_RTS for Rx-flow-control and
STDIO_UART_CTS for Tx-flow-control.
* Set target.console-uart-flow-control. Valid options are:
null, RTS, CTS, and RTSCTS.
Replace looping construct with actual block writes.
Transaction in spi_master_block_write funtion is protected by critical
section to ensure it is completed without interruption. A hardware
limitation may cause data corruption if the TX fifo is allowed to run
empty.
Fix hundreds of excessive compiler warnings due to out of enum type range
Examples shown as follows:
mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/hal_i2c.h", Line: 329, Col: 34
mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h", Line: 172, Col: 11
Signed-off-by: Tony Wu <tonywu@realtek.com>
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
Compile: stm32f7xx_hal_pcd.c
../targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c: In function 'PCD_WriteEmptyTxFifo':
../targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c:1310:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len > ep->maxpacket)
^
../targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_pcd.c:1325:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len > ep->maxpacket)
^
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
Add mbed_critical include file to disable compiler warning messages.
MTB_ADV_WISE_1530 and MTB_USI_WM_BN_BM_22 includes same usi chip,
so common USI_WM_BN_BM_22 target has been created.
MTB_ADV_WISE_1530 and MTB_USI_WM_BN_BM_22 are inheting the common usi target
Since revision 5499db1 (mbed-os-5.6.0) a hardfault occurs after a power-cycle.
It doesn't occur after a reset when the application has been downloaded using
drag-and-drop or via debugger. This is probably the reason why this problem
isn't detected when testing new mbed releases.
The hardfault occured in hal_sleep(). Adding a __NOP after __WFI solves the
problem although I don't fully understand why.
- Revision ca661f9 is the last revision where the problem doesn't occur.
- The problem doesn't occur when compiling with GCC instead of ARM compiler
- This issue describes a similar, but not identical problem and led me to test adding a __NOP: https://github.com/ARMmbed/mbed-os/issues/5065