Commit Graph

78 Commits (de9f9dd3a248b8e4b06894b3d52d81bdace6b5e1)

Author SHA1 Message Date
Jimmy Brisson 1f94ede86c Merge pull request #4744 from deepikabhavnani/spi_issue_4743
Allow user to set default transfer byte for block read
2017-07-24 14:45:30 -05:00
Deepika 1b797e9081 Closed review comments
1. Doxygen and Grammar related
2. Change dummy to spi_fill
3. Remove NXP driver and add default loop in spi block read (same as all
other drivers)
2017-07-21 09:46:22 -05:00
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
Jimmy Brisson 113ee13505 Merge pull request #4472 from c1728p9/workshop_rebase_4037
Silicon Labs: Add flash API support
2017-06-09 16:18:41 -05:00
Martin Kojtal 89b66983b8 Merge pull request #4477 from c1728p9/workshop_rebase_4054
Silicon Labs: Fix bug with SPI MISO and CS handling
2017-06-09 15:05:33 +01:00
Martin Kojtal 8998a55bc7 Merge pull request #4475 from c1728p9/workshop_rebase_4043
Silicon Labs: Add bootloader support
2017-06-09 15:04:55 +01:00
Aksel Skauge Mellbye 0d1bd37746 [Silicon Labs] Add flash API support 2017-06-09 11:51:28 +01:00
Sam Grove 88cbc7e335 Merge pull request #4473 from c1728p9/workshop_rebase_4041
[Silicon Labs] Enable dynamic heap with ARMCC
2017-06-08 15:58:28 -05:00
Sam Grove 8a6f28dd52 Merge pull request #4482 from kegilbert/bugfix/efm32-bootloader-s1-rebase
[Silicon Labs] Bugfix for bootloader on Pearl and Mighty Gecko - Rebase
2017-06-08 15:54:57 -05:00
Sam Grove c136c1330f Merge pull request #4471 from c1728p9/workshop_rebase_4042
[Silicon Labs] Fix compile warnings and ticker test failure
2017-06-08 15:53:55 -05:00
Steven Cooreman 59b3bfa0ce Add behavior to throw away collected entropy on occurrence of a noise alarm. 2017-06-07 17:22:26 -05:00
Steven Cooreman 97ef051eba Remove internal test functions 2017-06-07 17:22:06 -05:00
Steven Cooreman 94450374e7 Update to 4 spaces/tab 2017-06-07 17:21:49 -05:00
Steven Cooreman 66862785c5 Remove leftover comment about mbedTLS plugin 2017-06-07 17:21:28 -05:00
Steven Cooreman 466d4eab22 [Silicon Labs] Add TRNG support
Adding support for the TRNG peripheral present on Series 1 Configuration 2 devices.
2017-06-07 17:20:24 -05:00
Aksel Skauge Mellbye b30e665fc7 [Silicon Labs] Bugfixes to using bootloader with Series 1 devices. 2017-06-06 17:11:18 -05:00
Aksel Skauge Mellbye 9e999bd43b [Silicon Labs] Fix bug with SPI MISO and CS handling 2017-06-06 16:36:15 -05:00
Aksel Skauge Mellbye 5d906a74e6 [Silicon Labs] Add bootloader support
* Make memory sections configurable in linker files
* Dynamically determine vector location in flash for NVIC relocation
* Advertise bootloader support in targets.json
2017-06-06 16:26:11 -05:00
Aksel Skauge Mellbye d5eaa1505c [Silicon Labs] Enable dynamic heap with ARMCC
When using ARM Compiler 5, the RTX config hard-coded the heap and stack
sizes to specific values. This prevented the RTX HAL from dynamically
allocating unused memory as heap space.

Specifically, the HEAP_START define prevents this logic in RTX_CM_lib.h
from activating. The rest of the defines are also set in that header,
and should be removed from here.
2017-06-06 16:21:55 -05:00
Aksel Skauge Mellbye 29bef6fd05 [Silicon Labs] Fix compile warnings and ticker test failure
* Using PinName as bitfield doesn't work without warnings, since NC
  needs all 32 bits to be represented.
* lp_ticker should not be freed when interrupt is disabled, since this
  will kill the timebase.
2017-06-06 16:14:19 -05:00
Sam Grove 5f138810a9 Merge pull request #4294 from ARMmbed/feature_cmsis5
Update CMSIS-Core and RTX to version 5
2017-06-02 23:44:32 -05:00
Bartek Szatkowski 85cc9c8381 Remove deprecated RTX4 config options 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +01:00
Christopher Haster c1de19e49e spi: Added default spi_master_block_write implementation to all targets
There is an easy default implementation of spi_master_block_write that
just calls spi_master_write in a loop, so the default implementation
of spi_master_block_write has been added to all targets.
2017-05-25 12:04:58 -05:00
Kevin Gilbert 83a510751b Added mapping to BTN-labelled switches 2017-04-28 11:31:48 -05:00
Sam Grove 01767268cd Merge pull request #4142 from productize/master
EFM32: Fixed `pwmout_all_inactive` being inversed
2017-04-19 02:27:19 -05:00
Seppe Stas d396306a10 EFM32: Fixed `pwmout_all_inactive` being inversed
If one of the CC channel pins is enabled, `pwmout_all_inactive` it
means a channel is active so it should return `true`.

This commit also contains some cleanup in `pwm_init`.
2017-04-10 11:59:44 +02:00
Steven Cooreman ce843e4859 Update pinmap of EFM32PG12 as well 2017-04-06 19:35:10 +02:00
Steven Cooreman 680feb439e Support SPI CPP objects with different pinouts sharing the same peripheral 2017-04-06 19:35:09 +02:00
Steven Cooreman 632586e940 [Silicon Labs] Update TB Sense 2
* Update i2c driver to tackle multiple I2C object instances on different pins
* Update pinmap to enable the extra peripherals of EFx32xG12 over EFx32xG1
2017-03-30 02:57:20 +02:00
Steven Cooreman 0c20f33d2b [Silicon Labs] Rename targets
Due to limitation in the mbed website backend (board names need to be <= 19 characters), we are shortening the CLI target names from THUNDERBOARD to TB.
@screamerbg
2017-03-28 20:14:16 +02:00
Steven Cooreman d2173574d0 Stop using device_has for non-mbed options
As asked by @0xc0170 in PR #3934, we won't be using device_has for indicating RF/Crypto features any longer. RF config options moved to the SL_RAIL lib.json, crypto config options will come with mbedTLS integration.
2017-03-21 16:23:52 +01:00
Steven Cooreman d710ec4e12 Bugfix for EFM32PG12 and EFR32MG12
* Off by one error in the linker scripts reserved one word too little for the vector table
* Re-apply uvisor changes to emlib. To allow uvisor to run, we should make accesses to the romtable through uvisor's secure read gateway
* Copypasta in target name (EFM32PG12, not EFR32PG12)
* Copypasta in the pin definitions (thanks @akselsm)
* Forgot to update PortName for extra ports on MG/PG12
2017-03-21 16:19:46 +01:00
Steven Cooreman 8067bf629f Update clock calibration structs to match latest Gecko SDK 2017-03-20 16:34:12 +01:00
Steven Cooreman 8b6451c74d Add new target EFM32PG12 2017-03-20 16:34:12 +01:00
Steven Cooreman 59dc6da5c4 Update to Gecko SDK 5.1.2
Update RAIL library to 1.5.1
2017-03-20 16:34:12 +01:00
Steven Cooreman ca91e7c2d5 Update to Gecko SDK 5.1.2
Updating CMSIS device headers
2017-03-20 16:34:12 +01:00
Steven Cooreman 1a8c460378 Update to Gecko SDK 5.1.2
Updating emlib
2017-03-20 16:34:12 +01:00
Steven Cooreman 0e098678b5 First pass on TB Sense (and EFR32MG12) support 2017-03-20 16:34:12 +01:00
Christopher Haster aff49d8d1e Renamed files in platform to match source names
critical.h     -> mbed_critical.h
sleep.h        -> mbed_sleep.h
toolchain.h    -> mbed_toolchain.h
rtc_time.h     -> mbed_rtc_time.h
semihost_api.h -> mbed_semihost_api.h
wait_api.h     -> mbed_wait_api.h
2017-02-22 18:17:54 -06:00
Jaeden Amero 378655f40c uVisor: Standardize available legacy heap and stack
With the RTOS, the STACK_SIZE specified here is unrelated to the stack
size available for the main thread (that runs pre_main). Save memory by
reducing the stack size to a more reasonable amount.

On uVisor, HEAP_SIZE is both a minimum available and maximum available
heap size. The heap can't grow beyond the end of the heap into the
neighboring stack. On all uVisor-supported platforms, guarantee at least
0x6000 bytes of heap space. This increases the portability of uVisor
applications as the memory available for legacy heap allocations is
guaranteed. This helps to avoid out of memory errors on platforms that
were previously guaranteeing less memory.
2017-02-07 16:46:38 +00:00
Martin Kojtal ade6722707 Merge pull request #3607 from ARMmbed/feature_hal_sleep
Platform: Add sleep/deepsleep user facing functions
2017-01-26 13:55:33 +02:00
Jaeden Amero 95e5fec8d0 EFM32GG: Fix GCC_ARM linker script
A copy paste error snuck into the uVisor related updates to the EFM32GG
linker script. Fix the error by replacing "m_data" with "RAM".

Fixes: 89641bc7e0 "uVisor: Update K64F and EFM32GG linker scripts"
2017-01-19 17:13:40 +00:00
Bartek Szatkowski 6a045a49a9 Platform: Add sleep/deepsleep user facing functions
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
2017-01-19 09:39:29 +00:00
Alessandro Angelino 89641bc7e0 uVisor: Update K64F and EFM32GG linker scripts
This commit improves consistency between different platforms' linker
scripts. In particular, we use "__UVISOR_SRAM_START" instead of
"__UVISOR_BSS_START" as the uVisor BSS sections might be outside of the
SRAM (for example, when using a tightly-coupled memory).
2017-01-10 13:15:54 +00:00
Steven Cooreman 245e2e2e2d Revert "[EFR32] Adding hardware acceleration for mbed TLS"
This reverts commit c0301b15d2.
2016-11-18 11:05:36 +01:00
Steven Cooreman ef690f734f Fix broken file 2016-11-18 11:03:38 +01:00
Steven Cooreman ed905b7cc8 Revert "[EFR32] Move the mbedTLS hardware acceleration code to EFR32 family"
This reverts commit a0f62b1e4f.
2016-11-18 11:00:57 +01:00