Commit Graph

99 Commits (6d374c61ac4ad8ec9fd5d10822b2993a1e32a4a1)

Author SHA1 Message Date
Marcus Chang 954ae4a52a itm_api.c implementation for Silicon Labs EFM32 series
SWO frequency: 875 kHz
2018-02-16 08:24:42 -08:00
amq fdc2274720 EFM32: make peripherals conditional
* MCUs within a family like EFM32GG can omit some peripherals, e.g. EFM32GG230 doesn't have UART
* This commit adds a check to make them compilable, relevant mainly for custom boards
2018-01-31 17:35:26 +00:00
PHST 7719c25a99 Add missing EFM32 HAL flash init/deinit function calls 2018-01-24 08:20:38 +01:00
Cruz Monrreal 3cb9728ae7
Merge pull request #5854 from SiliconLabs/bugfix/rtc_overflow
Fix for Silicon Labs RTC
2018-01-16 16:07:43 -06:00
Steven Cooreman 5d6c5dd81d Fix for #5840
This commit fixes #5840. Fix verified by running mbed_hal-lp_ticker test suite with preloaded RTC counter such that it wrapped in the middle of the suite.
Also removes explicit sleep blocking from the us_ticker implementation, since sleep blocking for us tickers is done at mbed HAL level now. This was causing one of the lp_ticker tests to fail.
2018-01-15 21:21:53 +01:00
Steven Cooreman 18c973f132 Allow overriding of DCDC settings per target
Allow custom targets to override the DCDC settings by defining EMU_DCDCINIT_STK_DEFAULT to target-specific initialization values.
2018-01-15 16:36:23 +01:00
Steven Cooreman 813216306c Remove custom Silicon Labs sleep management
Standardize on the mbed sleep manager by removing the sleepmodes API, and statically redirecting hal_sleep to EM1 and hal_deepsleep to EM2.
2017-12-01 12:13:06 +01:00
Martin Kojtal 118c1bb2b4
Merge pull request #5579 from SiliconLabs/feature/rail-2.1
Upgrade Silicon Labs radio driver to v2.1.1
2017-11-30 18:10:46 +00:00
Martin Kojtal 2b84a1742f
Merge pull request #5584 from SiliconLabs/feature/emlib-5.3.3
Upgrade to Silicon Labs HAL
2017-11-30 18:09:04 +00:00
Alessandro Angelino 1b0922e97b EFM32: Use SECURE_ACCESS to access the ROM table
To allow enabling of uVisor on EFM32, the ROM table must be accessed
through the CMSIS-provided SECURE_ACCESS macro.
2017-11-30 11:08:11 +01:00
Steven Cooreman c95728f6fc Fix issue with timer timebase on EFR32
Timer code was written based on integer multiple HF clock frequencies. EFR32 doesn't conform to that (38.4), and so the timestamp ticks were off by 1%. Enough to trip up some CI tests on TB_SENSE_12 (#5496)
2017-11-25 11:23:41 +01:00
Steven Cooreman e900d5a04d Squash warnings by defining 'NC' as unsigned type 2017-11-24 16:14:56 +01:00
Steven Cooreman 73bd5ff5fb Remove deprecated em_int 2017-11-24 16:01:00 +01:00
Steven Cooreman 6c6e762c49 Support USARTs up to USART5 in SPI 2017-11-24 15:53:44 +01:00
Steven Cooreman 53f88b5e26 Support USARTs up to USART5 in serial 2017-11-24 15:53:09 +01:00
Steven Cooreman 3d4cae84d5 Upgrade to emlib 5.3.3 2017-11-24 15:52:20 +01:00
Steven Cooreman 76fd28c825 Upgrade RAIL to v2.1.1 2017-11-24 12:57:43 +01:00
Jimmy Brisson 2f25744b07 Merge pull request #5223 from seppestas/master
Fix analogin scaling for EFM32 target
2017-10-13 09:22:22 -05:00
Seppe Stas 81cc5a4960 Fix analogin scaling for EFM32 target
Fixes #5115.

`analogin_read_u16` returns a value in the range `0x0000 - 0xFFF0`
since the resolution of the ADC is 12 bits. However, in
`analogin_read` this value gets divided by `0xFFFF` assuming the range
is `0x0000-0xFFFF`. This causes a small error in the value returned by
`AnalogIn::read` for the EFM32 target.
2017-09-29 16:07:33 +02:00
Martin Kojtal 29988933aa EFM32: fix fire interrupt (set flags)
There's overflow counter that needs to be 0, and
CC0 flag set.

Fixes #5051
2017-09-22 14:45:30 +01:00
Jimmy Brisson fb53eb65d4 Correct Silabs NVIC selection
Again, the culprit was that the discriminant did not include armc6
2017-09-11 13:20:32 -05:00
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