Commit Graph

838 Commits (e55553e74983ad2c6979ace37f05d9f4bbff3965)

Author SHA1 Message Date
Martin Kojtal 1be7418883 Merge pull request #3836 from cuvva/master
Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os
2017-03-06 16:53:31 +00:00
Martin Kojtal c975c2ba71 Merge pull request #3831 from pradeep-gr/feature-spi-slave
NCS36510: SPISLAVE enabled (Conflict resolved)
2017-03-06 16:51:37 +00:00
Martin Kojtal 8fb95a6507 Merge pull request #3780 from pmancele/master
STM32L4 : Fix GPIO G port compatibility
2017-03-06 16:51:03 +00:00
Martin Kojtal 750ac5152f Merge pull request #3741 from jeromecoutant/PR_TICK32
STM32 remove warning in hal_tick_32b.c file
2017-03-06 16:49:52 +00:00
Martin Kojtal f168f6233a Merge pull request #3716 from adustm/disco_f429zi_debug
fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files
2017-03-06 16:49:19 +00:00
jeromecoutant b77533dd51 STM32Cube_FW_F7_V1.6.0
CMSIS v1.1.2 => v1.2.0
    STM32F7 HAL v1.1.2 => v1.2.0
2017-03-06 16:48:23 +01:00
bcostm ae6899b448 STM32L4xx: set APB2 clock to 80MHz (instead of 40MHz) 2017-03-06 13:34:01 +01:00
jeromecoutant 67a75d96c6 STM32 CAN API: correct format and type
astyle done
2017-03-06 11:34:20 +01:00
adustm 18c1618637 DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated 2017-03-03 17:05:28 +01:00
bcostm e70d985fa3 Add AnalogIn pins on PF3, PF5 and PF10.
Don't know why it was missing ?
2017-03-03 16:57:16 +01:00
Mohammad Azim Khan 1f0d73162c Increase HEAP size for UBLOX_EVK_ODIN_W2 and NUCLEO_F429ZI 2017-03-02 14:11:21 +00:00
Głąbek, Andrzej 4213c61073 TARGET_NRF: added a description of the recent change in spi_init(). 2017-03-02 13:47:37 +01:00
Mike Fiore 2613380854 [XDOT_L151CC] Define GPIO_IP_WITHOUT_BRR for xDot platform. Resolves #3823. 2017-03-01 12:53:31 -06:00
adustm d69c5edbd4 fix for issue #3715: correction in startup files for ARM and IAR, alignment of system_stm32f429xx.c files 2017-02-28 18:15:06 +01:00
Laurent MEUNIER 00bfa3bf4a STM32: change spi error to debug warning
In case the selected frequency is higher than the requested one, it is
better to send a debug warning rather than an blocking error.

In case of such warning, user may need to redefine the clock tree setting
at higher level (reducing peripheral's input clocks during init phase).
2017-02-28 17:00:29 +01:00
adustm fe1e7aac98 Better use of MBEDTLS_AES_ALT
removed from targets.json, added in mbedtls_device.h
  remove function alternate defines (not used as we replace the full
  module)
2017-02-28 16:42:03 +01:00
adustm 35bf8e17e6 AES ECB for NUCLEO_F439ZI
+---------------------------+--------+--------+--------+
| test case                 | passed | failed | result |
+---------------------------+--------+--------+--------+
| mbedtls_aes_self_test     | 1      | 0      | OK     |
| mbedtls_entropy_self_test | 1      | 0      | OK     |
| mbedtls_sha256_self_test  | 1      | 0      | OK     |
| mbedtls_sha512_self_test  | 1      | 0      | OK     |
+---------------------------+--------+--------+--------+
2017-02-28 16:41:16 +01:00
Laurent MEUNIER 3842f6ea0a STM32: fix formatting
Use the recommended style
if (condition) {
  do();
} else {
  do_else();
}
2017-02-27 17:07:05 +01:00
Laurent MEUNIER 747e8e1ea1 STM32: move pwmout device tables to C file
In order to avoid possible multiple definitions errors, move the table
initialization to the C file instead of header file
2017-02-27 17:07:01 +01:00
bcostm d03f96741e Typo: update comment (GPIO_IP_WITHOUT_BRR) 2017-02-27 16:32:44 +01:00
Głąbek, Andrzej 678f3f9966 TARGET_NRF: corrected spi_init() to properly handle re-initialization on the same pins + minor editorial corrections. 2017-02-27 13:48:55 +01:00
Laurent MEUNIER 8e5d2eb1dc STM32: pwm period and prescaler calculation
Correct the while loop limit and add a safe guard to avoid infinite loop.
2017-02-27 13:47:34 +01:00
Laurent MEUNIER 453b248bf4 STM32: gpio SPEED - always set High Speed by default
Up to now, speed was set for outputs and alternate, but this is
also valid for input configuration.

By default, let's configure high speed.

This is done firts, because speed for some families like F1 is mixed
with Input/Output mode settings, so can be later over-ridden if needed.
2017-02-27 11:11:02 +01:00
Hovik Melikyan c4a979ef72 Allow to redefine nRF's PSTORAGE_NUM_OF_PAGES outside of the mbed-os source
By default the number of pstorage pages is set 1 and all addresses are
calculated in the pstorage module accordingly. Nordic recommends
changing this macro to whatever number is suitable for the app (see
https://devzone.nordicsemi.com/question/53066/what-will-be-the-starting-
address-of-pstorage-page-how-we-can-change-it/?answer=53085#post-id-5308
5) which is not quite elegant given that pstorage_platform.h is part of
the mbed-os repo. With this modification you can e.g. define
PSTORAGE_NUM_OF_PAGES on the command line, however note that you should
rebuild mbed-os with this setting as it affects pstorage_platform.c.
2017-02-24 11:24:24 +00:00
Sam Grove b6fe5abb10 Merge pull request #3743 from jeromecoutant/PR_RTC_UPDATE
STM32 RTC api minor update
2017-02-23 10:19:11 -06:00
Sam Grove ba2176323c Merge pull request #3733 from theotherjimmy/feature-bootloader
Enable boot-loader builds
2017-02-23 10:18:31 -06:00
U-ONSEMI\fg64rh 4678a31efa Conflict resolved 2017-02-23 18:47:15 +05:30
Pierre-Marie Ancele 48c63cacdb Use #if defined TARGET_STM32L4 2017-02-23 09:32:12 +01:00
Jimmy Brisson d62f046e57 Fail bootloader builds on targets that don't support it
This patch will prevent building bootloader builds on targets that have
not yet had their linker scripts/scatter files changed to allow for the
ROM space shrinking expected by bootloader builds. At the point of this
patch, bootloader linker script modifications are only supported by the
NUCLEO_F429ZI, K64F, KL46Z, and Odin.
2017-02-22 18:27:23 -06: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
Sam Grove a8a31da2e8 Merge pull request #3737 from bcostm/dev_can_factorization
STM32: can_api.c files factorization
2017-02-22 13:36:59 -06:00
Sam Grove 5c28715fbd Merge pull request #3742 from jeromecoutant/PR_SLEEP
STM32 : minor update in sleep HAL file
2017-02-22 13:35:01 -06:00
Sam Grove 355f69a11d Merge pull request #3802 from ARMmbed/feature-flash-api
Merge the feature-flash-api branch into master
2017-02-22 13:31:41 -06:00
Sam Grove 5491ccc0a6 Merge pull request #3803 from TomoYamanaka/master
Bug fix of initial value of interrupt edge in "gpio_irq_init" again
2017-02-22 13:21:13 -06:00
Sam Grove 0733fe0778 Merge pull request #3814 from 0xc0170/fix_i2c_delay_onsemi
NCS36510: I2C idle delay of 1us
2017-02-22 13:20:17 -06:00
Pierre-Marie Ancele 248dbaabe2 Fix GPIOG usage of STM32L4 by activating VDDIO2 power supply 2017-02-22 16:44:28 +01:00
jeromecoutant 3a83fc8a21 STM32 RTC api minor update
Add more detailed information in comments
Issue with sunday corrected
Issue with wrong rtc_isenabled status corrected
2017-02-22 08:50:58 +01:00
Russ Butler 071235415e Add K64F, KL46Z, F429, F439 and odin flash algos
Check in flash algos for the K64F, KL46Z, F429, F439  and Odin board
and enable these features accordingly in targets.json. This
implementation uses flash algo blob that are generated via scripts.
The K64F and KL46Z were generated directly from packs, while the
KL46Z, F429, F439 and odin were generated from code checked into
the FlashAlgo repo.
2017-02-21 14:09:06 -06:00
Martin Kojtal ff41cc97ae Merge pull request #3806 from 0xc0170/fix_issue#2989
NXP KL43Z/KL27Z: fix spi format bits check
2017-02-21 17:13:07 +00:00
Sam Grove 14bc2338eb Merge pull request #3812 from anangl/rework_i2c
TARGET_NRF5: reworked i2c_api.c
2017-02-21 11:03:27 -06:00
Sam Grove d14aa74b8c Merge pull request #3798 from c1728p9/fix_st_vtor
Fix vector table bug when using bootloader on ST
2017-02-21 11:02:17 -06:00
Sam Grove 09a0ff3b3f Merge pull request #3779 from geky/ncs36510-timing
NCS36510: Fix the sporadic semaphore timing issue
2017-02-21 10:50:14 -06:00
Sam Grove 1ee18b4ecb Merge pull request #3767 from OpenNuvoton/nuvoton
[NUC472] Support no-XRAM configuration
2017-02-21 10:49:13 -06:00
Sam Grove 4b850e268a Merge pull request #3759 from LMESTM/fix_spi_freq
STM32: spi_frequency table index fix
2017-02-21 10:47:17 -06:00
Sam Grove 3c3e04f6d2 Merge pull request #3739 from jeromecoutant/PR_F7_HSE
STM32F7 : remove multiple HSE_VALUE define value
2017-02-21 10:47:00 -06:00
jeromecoutant 053072c2dc STM32 : set back US counter after deepsleep 2017-02-21 17:46:15 +01:00
jeromecoutant e8519416c1 STM32 sleep.c remove compilation warning 2017-02-21 17:46:11 +01:00
Sam Grove b7dce71510 Merge pull request #3665 from LMESTM/dev_stm32_gpio_pins_rework
Dev stm32 gpio pins rework
2017-02-21 10:41:16 -06:00
jeromecoutant 0259c1a2a7 STM32 remove warning in hal_tick_32b.c file 2017-02-21 16:43:20 +01:00
Głąbek, Andrzej da73716092 TARGET_NRF5: corrected code style in i2c_api.c. 2017-02-21 11:47:51 +01:00
pradeep-gr c71bfdbc44 NCS36510: I2C idle delay of 1us
It is added between I2C commands as I2C_COMMAND_FIFO is too fast to push commands out.
2017-02-21 09:16:21 +00:00
Głąbek, Andrzej de2114f92b TARGET_NRF5: removed TWI master driver, as it is no longer used by i2c_api.c. 2017-02-21 07:49:11 +01:00
Głąbek, Andrzej 4bc09b3a8f TARGET_NRF5: reworked i2c_api.c. 2017-02-21 07:48:54 +01:00
0xc0170 bf77857641 NXP KL43Z/KL27Z: fix spi format bits check
Fixes #2989. It was always true for valid values (if its not 8 neither 16 bits, fail).
2017-02-20 10:42:18 +00:00
bcostm 30565cbe5e Revert "Coding style"
This reverts commit 32b801b40c.
2017-02-20 11:29:30 +01:00
bcostm 02653add15 Remove can_api.c file present in TARGET_STM32F2 folder (no more needed now) 2017-02-20 11:19:53 +01:00
bcostm 32b801b40c Coding style 2017-02-20 11:19:53 +01:00
bcostm eec6e10138 Add a #else to cover default STM32 devices for the IRQHandler functions.
Change also the coding style for the "{".
2017-02-20 11:19:53 +01:00
bcostm 8568b40887 F103 devices: Set CAN_RD pins in Input mode instead of A/F Push-Pull
Now MBED_A27/A28 tests are OK again.
Problem seen also by @mgiaco and discussed in PR 2988.
2017-02-20 11:19:53 +01:00
bcostm f527ff95ab Add support to L4 targets. 2017-02-20 11:19:53 +01:00
bcostm caef97c5e6 Add support to F7 targets. 2017-02-20 11:19:53 +01:00
bcostm 0c4688e7e8 Add support to F4 targets. 2017-02-20 11:19:53 +01:00
bcostm b6b21672e8 Add F3 differences. 2017-02-20 11:19:53 +01:00
bcostm 0fd596e0ab Add can_device.h for F2 targets 2017-02-20 11:19:53 +01:00
bcostm 1f47619e82 Add F2 differences. Mainly add support for CAN2 instance. 2017-02-20 11:19:53 +01:00
bcostm 5fa0c4e172 Remove can_api.c file for F1 targets 2017-02-20 11:19:53 +01:00
bcostm 311648ab6c Add F1 differences.
Create can_device.h files to define specific code for the STM32 family
2017-02-20 11:19:53 +01:00
bcostm 45c7e0dca9 Initial commit: copy can_api.c from F0 target 2017-02-20 11:19:53 +01:00
TomoYamanaka d1866f2a49 Bug fix of initial value of interrupt edge in "gpio_irq_init" again
I modified the bug in PR #3289. But It seems not enough the changes.
For the reason, It occured the following issue.
https://github.com/ARMmbed/mbed-os/issues/3694
So I reviewed and re-modified about the setting of initial value of interrupt edge in "gpio_irq_init".
2017-02-20 16:41:59 +09:00
Russ Butler 242909cf9a Fix vector table bug when using bootloader on ST
The address of the vector table is hardcoded to the start of flash in
many, if not all, ST targets. This causes a crash in applications that
are using a bootloader.  This patch updates the boards STM32F429xI,
STM32F439xI and Odin so they properly handle updating the VTOR with
a bootloader.
2017-02-17 22:53:04 -06:00
Sam Grove cfa27dfcb0 Merge pull request #3757 from 0xc0170/fix_ncs36510_lpticker
ncs36510: lp ticker - remove unused header file inclusion (sleep)
2017-02-17 09:17:35 -06:00
Sam Grove 825f9a4bc9 Merge pull request #3749 from c1728p9/linker_script_updates
Linker script updates
2017-02-17 09:13:16 -06:00
Sam Grove 99dda9a60b Merge pull request #3740 from jeromecoutant/PR_L4_RTC
STM32L4 HAL update for RTC Wake Up Timer
2017-02-17 09:12:01 -06:00
Laurent MEUNIER 1cbb3e18ac STM32: make PWM driver into a common file
The pwmout driver is very similar for each STM32 family.

The only family specific part is defined in pwmout_device.h file.
It mainly contains few specific information:
- The mapping of PWM/TIMERS to APB1 or APB2 so that we can get the clock
- The clock calculation uses the right APB clock, which was sometimes
not the case before and could have lead to errors in case dividers were
enabled on APB clock settings. This case is now covered.
- Inactivation of inverted support on feaw families
2017-02-17 14:11:56 +01:00
Laurent MEUNIER 293b9fc297 STM32 L1: Define PWM Channels in PeripheralsPins.c
As done for other families, let's define the PWM channel in the PWM
pins table definition rather than driver.
2017-02-17 14:11:41 +01:00
Laurent MEUNIER d7902e53c2 Style consistency
Correcting the style format errors.
Also updating the copyright year.
2017-02-16 19:34:13 +01:00
Laurent MEUNIER 32ecd00c3a STM32: move pin_lines_desc to c file
Move the const table initialization from the header file
to a new C file to avoid any multiple defined errors.
2017-02-16 19:34:11 +01:00
Laurent MEUNIER 18abfdb604 STM32: gpio: style consistency 2017-02-16 19:34:08 +01:00
Laurent MEUNIER 73955b678e STM32: pins: move pin_lines_desc table to const 2017-02-16 19:34:05 +01:00
Laurent MEUNIER 273ac81680 stm32: use default in switch case
As commented during PR review, better use default case.
2017-02-16 19:34:01 +01:00
Laurent MEUNIER 5317ea5bb6 STM32: I2C - pin mode
The default pin mode shall be set as part of the pinamp_pinout, and
as defined in tables of PeripheralPins.c, but this is currently
over-written by a call to pin_mode(pin, PullNone); from
mbed_pinmap_common.c, so we need a set the mode again here, including
OpenDrain config as needed for I2C.
2017-02-16 18:57:34 +01:00
Laurent MEUNIER 21bc5af3c2 STM32: common pinmap using LL layer to access registers
this first makes pinmap.c a common file

then rework it with several goals:
- avoid gpio / irq / pin management extra dependencies
- improve performances when switching between pin modes

This change is based on LL layer to access to registers level
instead of using HAL higher level API.

The family specific functions are implemented in pin_device.h
of each family. Mostly this is F1 family that is differnt
from other ones.
2017-02-16 18:57:18 +01:00
Laurent MEUNIER dce2ca75d8 STM32: gpio few performance improvements
Those are minor changes to increase performance of widely used
GPIO functions.
2017-02-16 18:55:56 +01:00
Laurent MEUNIER 3517eb108e STM32: Change Set_GPIO_Clock return type
Directly return a GPIO_TypeDef pointer to avoid extra casts.
Also move it to GPIO file.
2017-02-16 18:55:44 +01:00
Laurent MEUNIER 6bd488db4d STM32: gpio irq: Use LL registers access
Instead of using HAL_GPIO_Init / Deinit which makes a lot of registers
being written and re-written, and which creates extra gpio / pin / irq
dependencies, we directly set the IRQ related registers thanks for the
STM32 LL layers which provides APIs to modify registers.
2017-02-16 18:55:36 +01:00
Laurent MEUNIER 74774f9424 STM32 Make gpio_irq_api.c a common files
This requires the creation of gpio_irq_device.h file, where
family specific EXTI IRQ mapping is defined
2017-02-16 18:55:28 +01:00
Laurent MEUNIER 0e2cc3824b STM32 : Make port_api.c a common file 2017-02-16 18:55:20 +01:00
Christopher Haster c0951c9035 NCS36510: Fixed drift in ticker interrupt
The NCS36510 is limited to 16bit timers. Construction of larger
intervals is performed in software by counting the number of 16bit
intervals that pass.

Either this counting takes a bit of time, or there is a math error
somewhere (maybe a long critical section?), because there is a
roughly ~1us delay between when the interrupt occurs and the ticker
progresses onto the next 16bit interval. This is normally a completely
reasonable error, except that the error accumulates. After a while,
the equeue tests find themselves with tens of milliseconds of error.
To make matters worse, this error is random because of other interrupts
occuring in the system, making the exact issue quite a bit difficult
to track down.

This fix drops the software counter in favor of just recalculating
the next delay interval from the target time and value of the running
timer. The running timer used to calculate the current tick is left to
overflow in hardware and doesn't have this drift.
2017-02-15 10:59:52 -06:00
Liviu Ionescu 14ffc2511e Merge remote-tracking branch 'ARMmbed/master' 2017-02-14 14:05:37 +02:00
ccli8 0bd8fb22c4 [NUC472] Support no-XRAM configuration 2017-02-14 09:12:02 +08:00
Sam Grove e22f26ffa4 Merge pull request #3663 from helmut64/STM32L4_deepsleep_fix
Fixed a problem that the STOP2 was falling back to STOP1
2017-02-13 10:12:30 -06:00
Sam Grove d8151d7991 Merge pull request #3590 from OpenNuvoton/nuvoton
[NUC472/M453] Export IAR project and other bugfixes
2017-02-13 10:12:02 -06:00
Laurent MEUNIER a8f6970a9d STM32: spi_frequency table index fix
In case of prescaler_rank was 0, a -1 index was being used,
which resulted in initialization of the Init.BaudRatePrescaler with
random values.

Now let's better check index and avoid -1 operation, so that prescaler_rank
can be only from 0 to "last_index".
2017-02-13 16:17:33 +01:00
0xc0170 2898199ccd ncs36510: lp ticker - remove unused header file inclusion (sleep) 2017-02-13 13:17:05 +00:00
Russ Butler bcab66c26d Update Odin linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the Odin's linker script
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-02-10 18:29:01 -06:00
Russ Butler ca8873b160 Update stm32f429 linker scripts for bootloader
Add MBED_APP_START and MBED_APP_SIZE to the stm32f429's linker script
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-02-10 18:28:59 -06:00
Russ Butler 579b2fbe40 Update K64F linker scripts for bootloader support
Add MBED_APP_START and MBED_APP_SIZE to the K64F's linker script
so the start and size of an image can be specified. This allows the
ROM to be split into a bootloader region and an application region.
2017-02-10 18:28:58 -06:00
jeromecoutant 2433b1ad95 STM32L4 HAL update for RTC Wake Up Timer 2017-02-10 16:26:10 +01:00
jeromecoutant 565ad777b0 STM32F7 : remove multiple HSE_VALUE define value 2017-02-10 13:06:41 +01:00
Sam Grove ec329be6f2 Revert "Target stm usb config" 2017-02-09 15:37:19 -06:00