Commit Graph

186 Commits (240758db42aaa42b2abd50daea5033c3cc7e80dc)

Author SHA1 Message Date
Martin Kojtal 5f7ecea00b
Revert "MbedCRC and CRC HAL revisions" 2019-11-26 13:45:37 +00:00
Kevin Bracey 1f94428a56 Update HAL CRC API
* Change "is supported" check to be a macro, so it can be done at
  compile-time.
* Eliminate weird shift on 7-bit CRCs.
* Add support for 32-bit CRCs and reversals to TMPM3HQ.
2019-11-13 14:31:49 +02:00
Martin Kojtal eea83007be
Merge pull request #11203 from Tharazi97/Watchdog_lower_limit_timeout_test
Add watchdog lower limit timeout test
2019-10-31 14:25:52 +01:00
Kevin Bracey fb6aa3ef4f Clean up ARM toolchain heap+stack setup in targets
ARM Compiler 6.13 testing revealed linker errors pointing out
conflicting use of `__user_setup_stackheap` and
`__user_initial_stackheap` in some targets. Remove the unwanted
`__user_initial_stackheap` from the targets - the setup is
centralised in the common platform code.

Looking into this, a number of other issues were highlighted

* Almost all targets had `__initial_sp` hardcoded in assembler,
  rather than getting it from the scatter file. This was behind
  issue #11313. Fix this generally.
* A few targets' `__initial_sp` values did not match the scatter
  file layout, in some cases meaning they were overlapping heap
  space. They now all use the area reserved in the scatter file.
  If any problems are seen, then there is an error in the
  scatter file.
* A number of targets were reserving unneeded space for heap and
  stack in their startup assembler, on top of the space reserved in
  the scatter file, so wasting a few K. A couple were using that
  space for the stack, rather than the space in the scatter file.

To clarify expected behaviour:

* Each scatter file contains empty regions `ARM_LIB_HEAP` and
  `ARM_LIB_STACK` to reserve space. `ARM_LIB_STACK` is sized
  by the macro `MBED_BOOT_STACK_SIZE`, which is set by the tools.
  `ARM_LIB_HEAP` is generally the space left over after static
  RAM and stack.
* The address of the end of `ARM_LIB_STACK` is written into the
  vector table and on reset the CPU sets MSP to that address.
* The common platform code in Mbed OS provides `__user_setup_stackheap`
  for the ARM library. The ARM library calls this during startup, and
  it calls `__mbed_user_setup_stackheap`.
* The default weak definition of `__mbed_user_setup_stackheap` does not
  modify SP, so we remain on the boot stack, and the heap is set to
  the region described by `ARM_LIB_HEAP`. If `ARM_LIB_HEAP` doesn't
  exist, then the heap is the space from the end of the used data in
  `RW_IRAM1` to the start of `ARM_LIB_STACK`.
* Targets can override `__mbed_user_setup_stackheap` if they want.
  Currently only Renesas (ARMv7-A class) devices do.
* If microlib is in use, then it doesn't call `__user_setup_stackheap`.
  Instead it just finds and uses `ARM_LIB_STACK` and `ARM_LIB_HEAP`
  itself.
2019-10-23 14:53:49 +03:00
Filip Jagodzinski fe685068ff Silicon Labs: Fix watchdog features build errors 2019-10-15 15:40:10 +02:00
Matthew Macovsky baf375f8cb Allow for arbitrary QSPI alt sizes
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-09-30 14:45:08 -07:00
int_szyk e2955eb968 Add watchdog clock accuracy to SiliconLabs targets 2019-09-30 08:10:25 +02:00
Arto Kinnunen 01484a2226
Merge pull request #11007 from SiliconLabs/fix/fpga_tests/pwm
Fix PWM output on Silicon Labs targets for large pulsewidths
2019-07-15 15:43:46 +03:00
Arto Kinnunen b5d8c3860e
Merge pull request #11008 from SiliconLabs/fix/fpga_tests/spi
Enable FPGA-based SPI testing on Silicon Labs targets
2019-07-15 15:42:55 +03:00
Arto Kinnunen 6ef5e228b5
Merge pull request #11015 from SiliconLabs/fix/fpga_tests/adc
Fix wrongly declared ADC pinout for EFM32GG11 STK3701A
2019-07-15 15:38:47 +03:00
Steven Cooreman 35851005ef Fix wrongly declared ADC pinout for EFM32GG11 STK3701A 2019-07-10 11:27:29 +01:00
Steven Cooreman fb4d898f2e Allow re-initializing an I2C peripheral
Allows the FPGA based test to pass, but requires #11004 before it will
2019-07-09 23:37:11 +01:00
Steven Cooreman 6094542bb1 Avoid the FPGA tester using hardware CS which is not supported
Also implement rudimentary spi_free...
2019-07-09 22:48:37 +01:00
Steven Cooreman 476dc6e46a Fix for PWM output found by testing against FPGA shield
Two issues:
* Downcasting too early
* Potential for a uint32_t overflow in an intermediate calculation

Passing test requires #11005 to be merged.
2019-07-09 22:38:53 +01:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Martin Kojtal dbe274ccf0
Merge pull request #10757 from petroborys/master
Add support I2C 3 for target EFM32G11
2019-06-09 18:19:42 +01:00
petroborys 54fe348078 Add support I2C 3 (#ifdef I2C2) for target EFM32G11 2019-06-04 14:31:33 +00:00
Steven Cooreman c7bc7e5122 Add implementation of reset reason on Silicon Labs parts 2019-05-24 11:35:38 +02:00
Steven Cooreman 295c79ab0a Add support for watchdog on Silicon Labs devices 2019-05-24 11:35:37 +02:00
Martin Kojtal 4cf96b8d80
Merge pull request #10482 from SiliconLabs/fix/allow_nc_pins
Allow NC pins to be instantiated on Silicon Labs platforms
2019-05-22 08:36:06 +01:00
Steven Cooreman 365f3643bb Allow NC pins to be instantiated
Keep asserting on trying to use an NC-instantiated object for anything else, though.
2019-05-20 15:23:34 +02:00
Anna Bridge bab78c6cc5
Merge pull request #10468 from petroborys/master
Add support for CAN to SiLabs targets
2019-05-07 15:57:58 +01:00
petroborys b635c024a4 Add can_api.c for efm32:review build-IAR 2019-05-01 00:12:38 +00:00
petroborys f29dffa7d7 Add can_api.c for efm32: wrap in presence of the base peripheral 2019-05-01 00:12:37 +00:00
petroborys 0a82591470 Add can_api.c for efm32 2019-05-01 00:12:14 +00:00
Steven Cooreman b16adea258 Remove sleep lock/unlock from HAL
The sleep locking/unlocking is taken care of by the layer above (driver).
2019-04-26 09:54:24 +02:00
deepikabhavnani 0ff2d42143 Heap and stack size picked from linker files,export symbols not needed 2019-02-28 19:54:38 -06:00
deepikabhavnani 0dc5561991 Guard RAM start and size defines 2019-02-28 19:54:38 -06:00
deepikabhavnani e731a1589f Target_GigaDevice: Add ARM_LIB_STACK and ARM_LIB_HEAP section
Instead of user defined symbols in assembly files or C files,
use linker scripts to add heap and stack - this is inconsistent
with ARM std linker scripts
2019-02-28 19:54:38 -06:00
deepikabhavnani 6b98bc2771 Target_SiLabs: Add ARM_LIB_STACK and ARM_LIB_HEAP section
Instead of user defined symbols in assembly files or C files,
use linker scripts to add heap and stack - this is inconsistent
with ARM std linker scripts
2019-02-28 19:54:38 -06:00
Deepika 1f57568015 TARGET_Silicon_Labs Setup heap limit and size 2019-02-19 15:49:49 -06:00
Russ Butler 8669417e7b Add HAL API for spi pinmap
Add the functions to get spi pinmaps to all targets.
2019-02-08 09:10:37 -06:00
Russ Butler 34c176654d Add HAL API for serial pinmap
Add the functions serial_tx_pinmap, serial_rx_pinmap, serial_cts_pinmap
and serial_rts_pinmap to all targets.
2019-02-08 09:10:28 -06:00
Russ Butler 2ed1dc2bfa Add HAL API for qspi pinmap
Add the functions qspi_master_sclk_pinmap, qspi_master_ssel_pinmap and
qspi_master_data0_pinmap-qspi_master_data3_pinmap to all targets with
qspi support.
2019-02-08 09:10:25 -06:00
Russ Butler be492fe07a Add HAL API for pwmout pinmap
Add the function pwm_pinmap to all targets.
2019-02-08 09:10:19 -06:00
Russ Butler 22a89773fa Add HAL API for i2c pinmap
Add the functions i2c_master_sda_pinmap, i2c_master_scl_pinmap,
i2c_slave_sda_pinmap and i2c_slave_scl_pinmap to all targets.
2019-02-08 09:10:12 -06:00
Russ Butler 3bd3aca6db Add HAL API for analog out pinmap
Add the function analogout_pinmap to all targets.
2019-02-08 09:10:05 -06:00
Russ Butler 4818f88d73 Add HAL API for analog in pinmap
Add the function analogin_pinmap to all targets.
2019-02-08 09:09:51 -06:00
Przemyslaw Stekiel d30a14e64f [Silicon_Labs] Support boot stack size configuration option 2019-01-08 15:32:06 +01:00
Alastair D'Silva aa80b7c70a Don't use define checks on DEVICE_FOO macros (partner code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 20:02:29 +11:00
David Saada 542744d03c Support erase value in Flash HAL drivers, FlashIAP and block devices 2018-11-07 14:23:07 +02:00
Deepika 08051f5c23 SiLabs: Fix alignment of execute region to 8-byte boundary
--legacyalign, --no_legacyalign are deprecated from ARMC6 compiler, in order to
remove deprecated flags all linker files (GCC and IAR as well to have uniformity)
should strictly align to 8-byte boundary
2018-10-09 10:15:07 -05:00
Martin Kojtal b5ee0c0e27
Merge pull request #8026 from SiliconLabs/bugfix/gpcrc
Fix for HW CRC calculations on Silicon Labs targets
2018-09-24 10:22:13 +02:00
Steven 0f879adccd Apply @kjbracey-arm's comments 2018-09-22 20:40:32 +02:00
Cruz Monrreal 7d54df66b1
Merge pull request #7993 from evva-sfw/hotfix/efm32_hal_pwmout_set_period_fix
Fix EFM32 pwmout hal function pwmout_period
2018-09-20 13:42:04 -05:00
Steven 7711d4c93b Word-sized input to GPCRC is only valid for 32-bit polynomial 2018-09-07 00:19:32 +02:00
Yossi Levy acfda5895e Changes in PR #7774 of PinNames.h should be reverted. This commit reverts those files excpet for K82F and K64F which are left as an example 2018-09-05 14:13:05 +03:00
Michael Kaplan dd2e93fbd3 Fix EFM32 pwmout hal function pwmout_period
In pwmout_period() is a check for changed values, which is not working because of a wrongly used bitmask. This is fixed now.
2018-09-05 11:17:28 +02:00
Cruz Monrreal 993c897b55
Merge pull request #7774 from yossi2le/sd-spif-to-mbed-os
Add default block device support (SD, SPIF and FLASHIAP)
2018-09-01 11:15:13 -05:00
Cruz Monrreal 00b7700be2
Merge pull request #7875 from c1728p9/feature_CMSIS_5_0b521765
Update CMSIS to 5.4.0
2018-08-31 11:31:37 -05:00