Commit Graph

17612 Commits (61f12b48ad8be46a67be932fc7e88292ddf810a7)

Author SHA1 Message Date
TomoYamanaka 52cbc33d44 Implementation of LPTICKER feature for Renesas mbed boards
Although other venders implement this feature by using RTC, in my H/W(RZ_A1), I cannot use RTC because it does not satisfy the spec of LP Ticker (ms order and low frequency between 8 KHz and 64 KHz).
Therefore I implemented this feature by creating 1024 division by MTU2(Multi function Timer pulse Unit 2) in order to satisfy this spec.
As a result of investigating, the most unaffected channel among MTU2 placed on GR-PEACH and GR-LYCHEE was channel 3, so I use channel 3 for this feature.

- mbed_drv_cfg.h
  I added a macro of MTU2 channel to this file for commonalizing code for GR-PEACH and GR-LYCHEE, and referenced it's macro at us_ticker.c.
- targets.json
  I added a macro for enabling LP Ticker.
- mtu2.c mtu2.h
  I defined fuction of MTU2's clock supply and stop.
  Because MTU2 is utilized by pwm driver too, those function were referenced at lp_ticker driver and pwm driver.

- lp_ticker.c lp_ticker_init()
  In order to satisfy the LP Ticker spec, I implemented by creating 1024 division by MTU2.
  When an interrupt is required, it will be set with ticker_set_interrupt().

- lp_ticker.c lp_ticker_free()
  This function stops the counting and powerdown the lp_ticker.

- lp_ticker.c lp_read()
  This function returns the timer counter of MTU2.

- lp_ticker.c lp_ticker_set_interrupt()
  In order to satisfy specifications, I implemented lp_ticker_set_interrupt() function.

- lp_ticker.c lp_ticker_fire_interrupt()
  In order to satisfy spec, I implemented lp_ticker_fire_interrupt() function.
  Also I added GIC_EnableIRQ for allowing the interrupt at end of function.

- lp_ticker.c lp_ticker_get_info()
  To satisfy the spec, I implemented lp_ticker_get_info() function. The value of freq includes rounding off.
2018-07-31 19:22:03 +09:00
Mika Leppänen d35f5b08ec Removed device emac check from emac greentea tests
DEVICE_EMAC is defined only for boards with default Ethernet emac.
It is not defined for example for Realtek RTL8195AM board that
does not have Ethernet. Removed the check for device emac from emac
greentea tests.
2018-07-31 13:18:17 +03:00
Antti Yli-Tokola 20f647435a Update mbed-coap version to 4.5.1
Fixes error: IOTCLT-2883 - Blockwise observations not completing
2018-07-31 10:31:09 +03:00
cyliangtw 2fcbcf1789
Initialized return value of numaker_emac link-out 2018-07-31 12:01:43 +08:00
Jimmy Brisson fb42bb0439 Stabilize macro ordering in mbed_config.h 2018-07-30 11:05:32 -05:00
Jimmy Brisson 28064f1319 Use hash to determine changes to command files 2018-07-30 10:41:58 -05:00
Hasnain Virk 31aaea6749 [IOTCELL-1181] Fixing incorrect NetID causing ABP Failures
The issue rose up when using ARMC6. A test case didn't initialize NetID
parameter for ABP while using connect(params) API. NetID is the first 7 bits
of the Device Address. It makes sense to actually remove the net-id parameter
from ABP settings as the stack can deduce it from device address. However, the ABP
structure is exposed in public APIs, so we can't really do that at the moment.
Simpler fix is to move the mask that helps us to extract first 7 bits of the device address
is exposed in lorawan_types.h and the user can use it to deduce correct net-id.
2018-07-30 15:02:35 +03:00
Ashok Rao 8c07fcd09f Changing default SPI CS pin to SD card on MTB 2018-07-30 12:23:37 +01:00
deepikabhavnani feda35503b Remove debug print 2018-07-27 13:40:43 -05:00
Senthil Ramakrishnan 6221e6fa23 Optimize the configuration for RTX evr events to disable the ones not in use 2018-07-27 13:05:16 -05:00
Jimmy Brisson 4da77916d5 Reduce include paths further
by 0.45% for Mbed Cloud Client
2018-07-27 09:43:30 -05:00
Martin Kojtal cde18aa0bc cellular: astyle fix 2018-07-27 13:33:20 +01:00
Nis Madsen 5567ac3be6 MPS2 platform: Enable interrupt on rx for UART 2018-07-27 14:11:27 +02:00
Kimmo Vaisanen 668c6ab6fa Lora: Fix cancel_sending
This commit fixes some bugs from cancel_sending() method:
-  System crashed if method was called before initialization.
   Now LORAWAN_STATUS_NOT_INITIALIZED will be returned.
-  Method returned LORAWAN_STATUS_BUSY error when no send request was pending.
   LORAWAN_STATUS_OK should be returned in this case.
-  LORAWAN_STATUS_BUSY is now returned if backoff timer is just about to be
   dispatched (time_left returns 0).
2018-07-27 13:30:27 +03:00
Cruz Monrreal 8292affb53
Merge pull request #7609 from bremoran/patch-2
Make location meaningful in print_error_report
2018-07-26 22:07:22 -05:00
Cruz Monrreal 639285a0e2
Merge pull request #7608 from theotherjimmy/fix-make
Tools: Correct `win_to_unix` path handling
2018-07-26 15:53:23 -05:00
Cruz Monrreal cc506eed14
Merge pull request #7603 from OpenNuvoton/nuvoton_override_gcc_sbrk
Nuvoton: Replace __wrap__sbrk with overriding _sbrk
2018-07-26 12:54:45 -05:00
Cruz Monrreal 8755e56fd6
Merge pull request #7567 from theotherjimmy/managed-update-image
Tools: Generate update images with managed bl mode
2018-07-26 10:51:40 -05:00
Cruz Monrreal 5d4f636bb1
Merge pull request #7578 from VeijoPesonen/conn_failure_tolerance
Makes Greentea TCP test cases to timeout less in connection errors
2018-07-26 10:29:48 -05:00
Cruz Monrreal dcd358f3e7
Merge pull request #7558 from theotherjimmy/tc-arm-v8m
Tools: Select compiler based on arch version
2018-07-26 10:27:21 -05:00
Cruz Monrreal c5680b5b9d
Merge pull request #7584 from SenRamakri/sen_wait_us_Enhancement
Minor enhancement to wait_us
2018-07-26 10:26:17 -05:00
Brendan Moran 96fbd02f8c
Make location meaningful in print_error_report
`handle_error` calls `MBED_CALLER_ADDR()`, but this is always a location from within platform/mbed_error.c. This is because `handle_error` is declared static. This does not cause the function to be inlined however. Instead, it is called by each function within mbed_error.c. For example, mbed_error yields this code:

```
000625c8 <mbed_error>:
   625c8:       b510            push    {r4, lr}
   625ca:       460c            mov     r4, r1
   625cc:       4611            mov     r1, r2
   625ce:       461a            mov     r2, r3
   625d0:       9b02            ldr     r3, [sp, #8]
   625d2:       f7ff feff       bl      623d4 <handle_error>
   625d6:       b968            cbnz    r0, 625f4 <mbed_error+0x2c>
   625d8:       4620            mov     r0, r4
   625da:       f7ff ff67       bl      624ac <print_error_report.constprop.0>
   625de:       f7ff fea8       bl      62332 <core_util_is_isr_active>
   625e2:       b910            cbnz    r0, 625ea <mbed_error+0x22>
   625e4:       f7ff fe9f       bl      62326 <core_util_are_interrupts_enabled>
   625e8:       b908            cbnz    r0, 625ee <mbed_error+0x26>
   625ea:       bf30            wfi
   625ec:       e7fd            b.n     625ea <mbed_error+0x22>
   625ee:       2001            movs    r0, #1
   625f0:       f000 f948       bl      62884 <__wrap_exit>
   625f4:       4800            ldr     r0, [pc, #0]    ; (625f8 <mbed_error+0x30>)
   625f6:       bd10            pop     {r4, pc}
   625f8:       80ff010f        .word   0x80ff010f
```

Note that at `625d2` there is a bl to handle error. That replaces the LR, which means that ALL calls to mbed_error will report a location of 0x625d6 or 0x625d7 (user vs. supervisor). I do not expect that this was the intention of the code. The simplest fix is to change line 99:

```C
static inline mbed_error_status_t handle_error(mbed_error_status_t error_status, unsigned int error_value, const char *filename, int line_number)
```

Since `handle_error()` will be inlined, the link register will be kept the same, so `MBED_CALLER_ADDR()` will yield the expected result. However, there is no guarantee that the compiler will respect the `inline` keyword in all circumstances.

The result is that each function that wishes to report its caller must extract its caller. This code cannot be centralised.

I have modified `mbed_error.c` to report the caller of each error reporting function, rather than the error reporting function itself.
2018-07-26 16:21:17 +01:00
Jimmy Brisson 35498dc54c Correct abspath handling 2018-07-26 10:19:23 -05:00
Jimmy Brisson f9c6f21f2e Correct path handling after calls to `win_to_unix` 2018-07-26 09:51:18 -05:00
bcostm b47e599281 F1 ST CUBE V1.6.1: add I2C patches 2018-07-26 15:44:31 +02:00
ccli8 313f322cf7 [Nuvoton] Replace __wrap__sbrk with overriding _sbrk
With _sbrk being weak, we can override it directly rather than #if to support heap with
two-region model.
2018-07-26 15:47:25 +08:00
Veijo Pesonen dd6ec037d7 Makes Greentea TCP test cases to timeout less in connection errors
Made to prevent timeout if a single test case fails. The goal is that
each test case might wait only half of the remaining time reserved for
running TCP test cases.
2018-07-26 09:39:04 +03:00
Senthil Ramakrishnan 7cedccc488 Improved logic in wait_us to avoid division operation in sub-millisec case 2018-07-25 15:04:06 -05:00
Jimmy Brisson 76078f6a50 Include `-t ARM` support for v8m, armc6 targets 2018-07-25 11:48:14 -05:00
Jimmy Brisson 8be6a03a4b Correct test_api usage of build_project 2018-07-25 11:29:59 -05:00
Jimmy Brisson ac14e37a77 Correct result usage in reporting infra 2018-07-25 10:04:18 -05:00
bcostm 8ce35ba845 F1 ST CUBE V1.6.1
- stm32f1xx hal V1.1.2
2018-07-25 14:20:11 +02:00
Martin Kojtal b170e1c44d
Merge pull request #7587 from SeppoTakalo/fix-tpcserver-warning
Allow legacy TCPServer::accept() to override inherited Socket::accept()
2018-07-25 14:20:05 +02:00
Martin Kojtal 7adfcbef71
Merge pull request #7551 from M-ichae-l/realtek-rtl8195am-remove-DEVICE_EMAC
realtek rtl8195am remove DEVICE_EMAC
2018-07-25 14:18:57 +02:00
ccli8 caf06e83c1 [Nuvoton] Fix __user_setup_stackheap and ARM_LIB_STACK/ARM_LIB_HEAP cannot co-exist in RTOS-less build 2018-07-25 17:19:09 +08:00
Przemyslaw Stekiel c0ee843d63 Add lp/us ticker_free() functions stub.
This patch adds only empty stubs of `us_ticker_free()` and `lp_ticker_free()` for all boards where these functions are not implemented.
2018-07-25 08:58:38 +02:00
Przemyslaw Stekiel 239ce02142 tests-mbed_hal-common_tickers: add ticker_free() functional tests. 2018-07-25 08:54:51 +02:00
Przemyslaw Stekiel 0f9ce651e7 Add ticker_free() function to the ticker interface. 2018-07-25 08:54:51 +02:00
Przemyslaw Stekiel 28d8f4595f Add requirements and pseudo code for HAL ticker_free() function. 2018-07-25 08:54:50 +02:00
ccli8 d6ae30a728 [Nuvoton] Merge multiple ARM/ARMC6 sys.cpp into one 2018-07-25 10:04:31 +08:00
Cruz Monrreal 0df9e15e4e
Merge pull request #7549 from TomoYamanaka/improve_ether
Revise heap and stack size for Ethernet of GR-PEACH
2018-07-24 11:47:45 -05:00
Cruz Monrreal e4108b5842
Merge pull request #7554 from jamesbeyond/fm_flash
Enable HAL Flash API on Fast Models MPS2 targets
2018-07-24 11:47:00 -05:00
Seppo Takalo 96a90c2f2f Allow legacy TCPServer::accept() to override inherited Socket::accept() 2018-07-24 18:06:04 +03:00
Cruz Monrreal 5d5ca62a5e
Merge pull request #7553 from bcostm/fix_L496_sct
STM32L496: fix RAM size in ARM scatter file
2018-07-23 10:14:05 -05:00
Cruz Monrreal a252e5ed96
Merge pull request #7530 from jeromecoutant/PR_RTOS_TICKLESS
RTOS SYSTIMER test error in TICKLESS mode
2018-07-23 10:13:50 -05:00
Cruz Monrreal 0c2ffe5e58
Merge pull request #7519 from Wiznet/master
Wiznet: fix us_ticker & gpio bug
2018-07-23 10:13:10 -05:00
Cruz Monrreal 21dbbc5e8b
Merge pull request #7510 from mattbrown015/fix_stm32_gpio_irq_deepsleep
STM32: Improve GPIO IRQ edge detection when waking from deepsleep
2018-07-23 10:12:49 -05:00
Cruz Monrreal 25bb200586
Merge pull request #7480 from klaas019/master
Add MTS Dragonfly bootloader back after accidental removal from pr #7131
2018-07-23 10:12:31 -05:00
Cruz Monrreal 057138c2a0
Merge pull request #7536 from ganesh-ramachandran/master
Add Support for Toshiba TMPM3H6
2018-07-20 12:38:25 -05:00
Jimmy Brisson 24df8f89bf Correct MockNotifier construction in test 2018-07-20 11:43:56 -05:00