Commit Graph

19288 Commits (9a91e340042cd0786989eb50b34cf8dfcc71b62c)

Author SHA1 Message Date
Juho Eskeli e9f845bb7a Clear error programming flags before erase & program operations 2018-10-19 11:46:55 +01:00
jeromecoutant 95c46b5d21 STM32 RTC : write RTC time while LPTICKER is enabled
This fix avoid a long waiting loop in rtc_write function,
  which was not acceptable in TICKLESS context.

Implementation comments added.

Global variable name has been updated for easier maintenance:
- LPTICKER_counter is the U32 continuous tick counter
- LPTICKER_RTC_time is the RTC time used to get the time difference
   between rtc_read_lp() calls
2018-10-19 11:46:55 +01:00
Yossi Levy 8f95eb5d8c Adding back blockdevice example after removing it for PR #7774. Target should be K64F 2018-10-19 11:46:55 +01:00
Jimmy Brisson a191140852 Tools: Fix Python3 + firmware header traeback
### Description

Traceback:
```
Merging Regions
  Filling region bootloader with mbed-cloud-client-example/mbed-os/features/FEATURE_BOOTLOADER/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM/mbed-bootloader-k64f-block_device-sotp-v3_4_0.bin
  Padding region bootloader with 0x9a4 bytes
Traceback (most recent call last):
  File "mbed-cloud-client-example/mbed-os/tools/make.py", line 293, in <module>
    ignore=options.ignore
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 548, in build_project
    merge_region_list(region_list, res, notify)
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 423, in merge_region_list
    _fill_header(region_list, region).tofile(header_filename, format='hex')
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 380, in _fill_header
    header.puts(start, struct.pack(fmt, time()))
struct.error: required argument is not an integer
```

reason: `time()` returns a float. So the fix is to force it to be an `int`.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Ganesh Ramachandran b3d935c169 Fix for pinmap & usticker free() to TMPM3H6
Implemented usticker free()
Fix pinmap data overwriting to same port pins
2018-10-19 11:46:55 +01:00
Kimmo Vaisanen 5e105ddb7b Cellular: Fix ATHandler_stub compiler warnings 2018-10-19 11:46:55 +01:00
Kimmo Vaisanen bff5c3be86 Cellular: Fix AT_CellularStack unittest
Missing CellularSocket constructor caused uninitialized values to be used.

Also changed comparision macros to ASSERT_EQ as suggested by GoogleTest guide.
2018-10-19 11:46:55 +01:00
bcostm 34530633e2 STM32: Fix I2C stop condition
Need to ensure the transmission has been started before sending a STOP condition.

Issue found on the NUCLEO_H743ZI due certainly to the high-speed clock used.

But this is normally needed also on all STM32 devices using the I2C peripheral version 2.
2018-10-19 11:46:55 +01:00
Jimmy Brisson b44bf98b77 tools: Make "file" key in notifications consistant
### Description

2 calls to `notify.cc_verbose` used the a FileRef object in place of
the file's name. Other calls to `notify.cc_info` would use just the
file name. This PR changes these 2 calls to be consistant with the rest.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Jimmy Brisson 00f93471f3 tools, NRF51-post-build: Use paths to hex files
### Description

The NRF51 post build hook finds it's hex files using the Resources
object. This PR fixes the corner case where the hex files within a
project have a name!=path (This really only happens online).

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
2018-10-19 11:46:55 +01:00
Mirela Chirica 8346498a28 Cellular: Fix greentea network set credentials test case 2018-10-19 11:46:55 +01:00
Seppo Takalo 2ca0f74a21 Fix WIFI_CONNECT_PARAMS_CHANNEL_FAIL testcase.
Test case was assuming that secure and unsecure SSID were on different
channels.
This is not a requirement and it should be OK to run on same channel.

Fixed the testcase by using +1 on channel number to get a wrong channel.
2018-10-19 11:46:55 +01:00
Ganesh Ramachandran 334dab3463 Fixed pwmout & serial fuart
pwmout:
Used SystemCoreClock

Serial fuart:
SERIAL_5 & SERIAL_3 have same CTS pin (PA7), only function register is different (4 & 2).
pinmap_peripheral() will always return first match from the map.
Hence changed as, if SERIAL_5 is used, then pinmap_peripheral() should return SERIAL_5 (function register 2 to be set).
2018-10-19 11:46:55 +01:00
Veijo Pesonen 976c54b498 Drops removed mbedgt-netsocket cases from test specification 2018-10-19 11:46:55 +01:00
Veijo Pesonen 80fc1462eb Makes mbedgt-network-wifi case to skip channel number check
2.4GHz and 5GHz channels might be using the same SSID. Wifi scan
might also fail occasionally to find secure- and unsecure channels
on same scan so lets not assume that we'll find both.
2018-10-19 11:46:55 +01:00
Veijo Pesonen 584f54fee4 Makes mbedgt-netsocket cases to accept port 0 as destination 2018-10-19 11:46:55 +01:00
Amanda Butler 2cd2292451 Copy edit REAMDE.md
Copy edit file, mostly for active voice and consistent spelling.
2018-10-19 11:46:55 +01:00
ccli8 ab3fb4357e Add README.md for secure library/executable 2018-10-19 11:46:55 +01:00
ccli8 cfa654ee82 Add license file for secure library/executable 2018-10-19 11:46:55 +01:00
Kimmo Vaisanen f16cdf45d9 Add missing SIM PIN configuration item 2018-10-19 11:46:55 +01:00
Russ Butler 2a1560143c Fix the CMSIS macro ARM_MPU_RASR
The update to CMSIS 5.4.0 broke the macro ARM_MPU_RASR. This patch
pulls in the upstream fix from CMSIS:
2ead2adffb (diff-e4bfba5228373d368ac2543d6e5bd4d0)
2018-10-19 11:46:55 +01:00
bcostm 9adc6635a0 STM32: add missing IAR exporters 2018-10-19 11:46:55 +01:00
jeromecoutant 32830342f5 DISCO_L496AG : enable ADC
See User Manual, VREF+ is not connected by default

NB: Use 2.5V as reference (instead of 3.3V)
for internal channels calculation
2018-10-19 11:46:55 +01:00
Jammu Kekkonen c70943b544 Change update file format to binary to all targets
- Change the default file format to binary for all targets, even though some targets need hex as app format, updater always needs bin for now
- Unify the file name generation from generator side and usage side for the update bin
2018-10-19 11:46:55 +01:00
Ganesh Ramachandran 41875b25e0 Implemented us_ticker free() 2018-10-19 11:46:55 +01:00
Ganesh Ramachandran 1fdf672e19 Added usticker feature
To enable the feature US_TICKER, file is newly implemented with Timer B, which has proper clock prescale and free running after match interrupt.
Old us_ticker driver file (Timer A) is producing up to 100us tolerance, which causes to fail US_TICKER feature.
Hence, changed the peripheral ticker A to B.
2018-10-19 11:46:55 +01:00
TomoYamanaka 9894c50d71 Revise the value of return value of flash_get_page_size()
Currently the return value of flash_get_page_size() is 1 since the min size per one writing is 1 byte by Flash spec.
However, I noticed that this value causes a enormous write time When writing large data such as FW update.
So I revised this value to 8 byte by considering the writing time, memory alignment and memory hole.
2018-10-19 11:46:55 +01:00
TomoYamanaka 29aa22267a Support large Flash in Flash iap driver of Renesas
I addressed the cases Flash size is larger than 0x1000000.
2018-10-19 11:46:55 +01:00
TomoYamanaka 9236006557 Improve Flash iap driver of Renesas
I changed _page_program() func because "buf" which is an argument of data_send() for writing must be a RAM address in order to operate in SPI mode.
(ex: if it is ROM table data, writing will be failure.)
Also, I changed the period of interrupt disable/enable at _page_program() func and _sector_erase() func because lock period is too long.
2018-10-19 11:46:55 +01:00
Naveen Kaje 882642c2ab NRF52: Ensure that we configure hardware after flow control changes
Call the routines to program the hardware to reflect the updates made to
flow control so that the object and hardware are in synch.
2018-10-19 11:46:55 +01:00
Jaakko Korhonen 758fca4644 Removed cellular PIN code print from debug log. 2018-10-19 11:46:55 +01:00
Ashok Rao 31dcbc6540 Removing default flow control for BL652 2018-10-19 11:46:55 +01:00
Markus Siglreithmaier 442ec4a14f STM32L4: Use HAL layer functions for sleep implementation 2018-10-19 11:46:55 +01:00
Markus Siglreithmaier 103fa52818 STM32L4: Fix sleep implementation
Correctly detect and handle the low power run mode when entering and exiting sleep mode.

The generic `hal_sleep` implementation tries to exit LPR mode always, resulting in a spin-loop during a critical section (disabled IRQ).
The new approach returns from LPR to Run mode if enabled (LPR bit set), enters sleep, and resets to the original state on wakeup (WFI).
2018-10-19 11:46:55 +01:00
Deepika 3ec1f7c632 Add required header file and namespace element instead add all 2018-10-19 11:46:55 +01:00
Deepika 758c37e4a8 Version check not needed as driver in part of mbed-os 2018-10-19 11:46:55 +01:00
jeromecoutant 266dff0f37 STM32L1 ADC update for internal channels 2018-10-19 11:46:55 +01:00
ccli8 d9d737f67c Update secure library/executable
1. Remove hal_sleep/hal_deepsleep from secure library
2. Add CLK_Idle_S/CLK_PowerDown_S
2018-10-19 11:46:55 +01:00
ccli8 0faad50f2c Fix hal_deepsleep with serial_can_deep_sleep
Add secure functions CLK_PowerDown_S/CLK_Idle_S
2018-10-19 11:46:55 +01:00
ccli8 bb3875049c Fix serial corruption due to deep sleep
Prevent deep sleep when there is still any character being transmitted on the UART.
This allows tickless to be safely enabled.
2018-10-19 11:46:55 +01:00
ccli8 d8b35fe41d Fix HAL sleep test failure with lp_ticker
Replace wait_us with nu_busy_wait_us in lp_ticker since wait_us is not allowed in sleep test
which would suspend us ticker layer on which wait_us relies. nu_busy_wait_us is implemented
by calling us ticker HAL API directly rather than relying on us ticker layer.
2018-10-19 11:46:55 +01:00
ccli8 faa7c90543 Add nu_delay_cycle_x4
nu_delay_cycle_x4 is a replacement for wait_us when us ticker is not available.
2018-10-19 11:46:55 +01:00
ccli8 9f1b4ed967 Add nu_busy_wait_us
nu_busy_wait_us is a replacement for wait_us when intermediary us ticker layer is disabled.
2018-10-19 11:46:55 +01:00
ccli8 d9d506e1fa Move nu_countdown_init/expired/free implementations to nu_timer.c from nu_timer.h 2018-10-19 11:46:55 +01:00
Naveen Kaje 099d0500ef NRF52: serial_api: Use polling for putc
There are scenarios where putc is called within a critical section, e.g
to log ASSERTs in early initialization code. The interrupts being
disabled here prevents the handlers for the UARTE from executing.
This breaks the tx_in_progress flag based approach. The tx_in_progress
never gets reset. Poll on the TXDRDY instead.

It can be recreated with a simple program as shown here:

*************** Current Behavior ****************
++ MbedOS Error Info ++
Error Status: 0x80FF0100 Code: 256 Module: 255
Error Message: F

************** With Fix *************************

++ MbedOS Error Info ++
Error Status: 0x80FF0100 Code: 256 Module: 255
Error Message: Fatal Run-time error
Location: 0x2C0A9
Error Value: 0x0
Current Thread: Id: 0x20005520 Entry: 0x30EBF StackSize: 0x1000 StackMem: 0x20004520 SP: 0x20005490
For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80FF0100
-- MbedOS Error Info --
nrf failure at .\main.cpp:22
***************************************************
2018-10-19 11:46:55 +01:00
Mahesh Mahadevan 455b44bd0f MIMXRT1050_EVK: Add RTC support
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2018-10-19 11:46:55 +01:00
Thomas Kemmer 90253ef7f5 Use high resolution time for Timer::read(). 2018-10-19 11:46:55 +01:00
Andrew Leech 6334e71cc3 nrf: allow target.mbed_ram_start and target.mbed_ram_size to override settings in linker 2018-10-19 11:46:55 +01:00
Andrew Leech 47c14328cd Ensure target bootloader settings can be overridden in mbed_app.json Values like `target.mbed_rom_start` were being replaced by None and then ignored. 2018-10-19 11:46:55 +01:00
Jenny Plunkett 384257d49c Remove reference to "mBed"
Removed another reference to "mBed"

Another "mBed"
2018-10-19 11:46:55 +01:00