Commit Graph

359 Commits (6f2da539c994e3d4f603d495342b1cead11a740d)

Author SHA1 Message Date
Martin Kojtal aba8f42600
Merge pull request #11776 from mprse/issue_11769_cypress_pwm_fix
Fix for issue #11769 (Cypress: PWM FPGA test wrong assert)
2019-10-31 17:08:06 +01:00
Martin Kojtal 724dfd554a
Merge pull request #11770 from morser499/pr/cm0-images
Update CM0P pre-built images to build 1.0.0.35
2019-10-31 14:40:40 +01: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
Martin Kojtal 50abaa6eb7
Merge pull request #11697 from hugueskamba/hk-fix-lock-deep-sleep-usb-cypress
USB-Cypress: Lock sleep when USB is initialized
2019-10-31 14:15:35 +01:00
Ryan Morse b5d2eec1b9 Update CM0P pre-built images to release 1.0.0.35 2019-10-30 09:32:37 -07:00
Przemyslaw Stekiel b35a6797d0 Fix for issue #11769 (Cypress: PWM FPGA test wrong assert)
Implementation of pwmout_read() is not consistent with the requirements.
This function should return the current float-point output duty-cycle in range <0.0f, 1.0f>.
Currently it returns decimal percentage value.
2019-10-30 15:26:56 +01:00
yarb 50b0847003 Cypress: fix gpio mode none 2019-10-30 12:03:53 +02:00
Martin Kojtal 87b150a1fe
Merge pull request #11715 from miteshdedhia7/pr/target-cyw9p62s1-43012
Add CYW9P62S1_43012EVB_01 board
2019-10-29 10:29:10 +01:00
Martin Kojtal 8637069b36
Merge pull request #11698 from kjbracey-arm/armstack
Clean up ARM toolchain heap+stack setup in targets
2019-10-24 11:37:11 +02: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
Martin Kojtal 83207aef73
Merge pull request #11690 from shuopeng-deng/pr/port-api-changed-to-match-pin-api
Changed mbed gpio-port api to match gpio api
2019-10-22 09:44:35 +02:00
Ryan Morse ecdbdc03dd Added CYW9P62S1_43012EVB_01 board
Notes:
- CRC and TRNG are disabled on this board since the MCU on this board does not have the required hardware.
- QSPI and QSPIF are temporarily removed due to issues related to supporting the new S25FS512S flash chip we have on this board. These will be enabled as soon as we can get the issues resolved.
https://github.com/ARMmbed/mbed-os/issues/11722
2019-10-21 15:36:44 -07:00
Martin Kojtal 278f05bfb9
cy port api: fix styling 2019-10-21 14:58:04 +01:00
Martin Kojtal 9c82706e6f
Merge pull request #11434 from romanjoe/pr/cy8ckit_064s2_4343w
Initial addition of files to support CY8CKIT_064S2_4343W target
2019-10-18 14:51:59 +02:00
Hugues Kamba 7e0b56fa0c USB-Cypress: Lock sleep when USB is initialized
None of the USB drivers currently support entering deep sleep mode
while USB is active. To protect USB from malfunctioning lock deep
sleep in USBPhyHw::init.This is done for similar

This was done for all other implementations as part of
https://github.com/ARMmbed/mbed-os/commit/8ffbe5c6033
2019-10-17 13:12:58 +01:00
Martin Kojtal 8c860524fb
Merge pull request #11646 from kyle-cypress/pr/bt-wake-swap
Fix swapped BT pins on CYW943012P6EVB-01
2019-10-16 19:13:18 +08:00
Shuopeng Deng 24991a4577 Changed mbed gpio-port api to match gpio api
The port configuration api was not correctly setting the port-pins'
direction. Changed the port driver to call the gpio driver for
configuration (read and write still are optimized for port-level
operations) so that the behavior is consistent.
2019-10-15 11:43:00 -07:00
Roman Okhrimenko 27f9cf85de Added specific policy file for 2M device to expand slot sizes 2019-10-15 16:07:56 +03:00
Martin Kojtal e8804cd574
Merge pull request #11668 from morser499/pr/whd_1.40
Update Cypress WiFi driver code to version 1.40
2019-10-15 13:13:17 +08:00
Martin Kojtal 89c08f5865
Merge pull request #11669 from morser499/pr/rtos-abstraction
Fixed issue with integer overflow when converting time units
2019-10-15 13:09:37 +08:00
Martin Kojtal a806237226
Merge pull request #11660 from shuopeng-deng/pr/spi-transfer-fix
Fix dropped bytes on spi write
2019-10-15 13:08:32 +08:00
Shuopeng Deng 9f03a1ce24 fixed spi_master_write to support transfer of 8+ bits
remove an unnecessary cast
2019-10-14 14:04:37 -07:00
Roman Okhrimenko 9b86b391b2 Initial addition of files to support CY8CKIT_064S2_4343W target 2019-10-11 19:28:17 +03:00
Anna Bridge c094ad8095
Merge pull request #11561 from kyle-cypress/pr/target-063-ble
Add TARGET_CY8CPROTO_063_BLE
2019-10-11 14:39:29 +01:00
Anna Bridge 489c30f569
Merge pull request #11297 from kyle-cypress/pr/qspi-dummy-cycles
Differentiate alt and dummy cycles in QSPIF
2019-10-11 14:34:17 +01:00
Ryan Morse f35328cfa0 Update WHD to v1.40 2019-10-10 12:08:50 -07:00
Ryan Morse 373580d4bd Fixed issue with integer overflow when converting time units 2019-10-10 10:28:34 -07:00
Kyle Kearney 4619f92326 Fix swapped pins for CYW943012P6EVB-01 in cybsp_types
Fix the issue as 09f715c96e in
cybsp_types.h as well.
2019-10-09 14:44:39 -07:00
Shuopeng Deng 1b141209eb Fix dropped bytes on spi write
The cyhal_spi_send api was changed to read and discard a byte on every
send operation (at the protocol level all SPI transfers are bidirectional).
This means that to achieve a truly bidirectional transfer, the
cyhal_spi_transfer API must be called (as opposed to a write followed
by a read).
2019-10-08 16:37:31 -07:00
Kyle Kearney 09f715c96e Fix swapped BT pins on CYW943012P6EVB-01
The BT_DEVICE_WAKE and BT_HOST_WAKE pins were swapped relative to
how the chips are wired up on the board.
2019-10-07 20:46:03 -07:00
Anna Bridge f987fe0b32
Merge pull request #11542 from morser499/pr/target-update
Update Cypress targets
2019-10-07 16:44:59 +01: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 cb5311654c Add watchdog clock accuracy to Cypress targets. 2019-09-30 08:10:24 +02:00
Ryan Morse 54d962a240 Moved TriggerMux initialization out of the HAL and into the BSP since that is what dictates what trigger muxes actually need to be used 2019-09-27 13:01:38 -07:00
Martin Kojtal 698e75f336
Merge pull request #11529 from vmedcy/pr/psoc6pdl-1.3.1
PSOC6: update to PDL 1.3.1
2019-09-26 12:24:06 +02:00
Kyle Kearney 1b21612afd Add target for CY8CPROTO-063-BLE 2019-09-24 11:25:12 -07:00
Volodymyr Medvid d199fa6bb4 PSOC6: update to PDL 1.3.1.1499 2019-09-24 17:43:23 +03:00
Kyle Kearney f0fdee4a1c Clean up BSP hardware configuration
- Improve block naming
- Remove unneeded items
2019-09-19 12:05:25 -07:00
Kyle Kearney 2831dfde1c Update CY8CPROTO-064-SB linker scripts
Update linker scripts for the latest PDL to be consistent with other Cypress targets
2019-09-19 12:03:32 -07:00
Kyle Kearney 09182d1ed0 Refactor serial flash support 2019-09-19 12:01:29 -07:00
Kyle Kearney 70590006cb Simplify BSP contents
Remove some (Cypress-proprietary) BSP interfaces and hardware initialization
from the BSPs which is better implemented by a library or application firmware.
Move some remaining functionality from common to the individual targets.
2019-09-19 12:00:13 -07:00
Kyle Kearney 4ec3ad1850 Consolidate/clean up wifi initialization 2019-09-19 11:51:15 -07:00
Kyle Kearney d067952b6f Avoid doubly allocating whd thread stack
Don't malloc during wifi initialization, as that could cause double allocation in some cases.
The thread stack will be allocated by cy_rtos_thread_start if necessary.
2019-09-19 11:05:05 -07:00
Volodymyr Medvid 2af2105aeb PSOC6: update to PDL 1.3.1.1474 2019-09-19 10:40:44 +01:00
Kyle Kearney 8aa449c662 Improve psoc6csp doxygen comments 2019-09-18 12:13:34 -07:00
Kyle Kearney a0b657295f Reorganize resource and rtos abstraction files
- Move resource and rtos abstractions into their own folders
- Remove files for abstractions that are not implemented
2019-09-18 12:10:07 -07:00
Kyle Kearney e8dc5f111c Update to latest HAL
- Add const and static qualifiers in places where they are
  applicable but missing
- Remove headers for drivers that aren't implemented yet
- Misc minor bugfixes
2019-09-18 12:07:08 -07:00
Kyle Kearney 1713e79ccf Fix incorrect integer division in analogout_read
Replace with multiplication by the floating point reciprocal, to
 produce a floating point result while being more efficient than
 floating point division.
Addresses the issue raised by kjbracey-arm in
https://github.com/ARMmbed/mbed-os/pull/11324#pullrequestreview-282433989
2019-09-18 12:06:33 -07:00
Martin Kojtal 458523219a
Merge pull request #11006 from linlingao/pr10692
Introduce an Mbed config to enable XIP
2019-09-09 11:09:21 +02:00
Martin Kojtal f06145db13
Merge pull request #11376 from kyle-cypress/pr/pdl-1.3-doc
Update PDL documentation and metadata
2019-09-05 13:30:28 +02:00
Lin Gao 67c6bdbf2d removed xip unrelated changes 2019-09-03 16:14:38 -05:00
Lin Gao f1813e5bcc Remove keep keyword for .heap section 2019-09-03 13:22:47 -05:00
Lin Gao b9f8e2ac53 Remove QSPI for Future targets 2019-09-03 13:22:43 -05:00
Lin Gao 2a78a9ba13 Refactored code to not use macro. Created config xip-enable 2019-09-03 11:54:14 -05:00
Lin Gao ea032bebc4 Add XIP capability, enable QSPI. XIP can be enable by adding macro XIP_ENABLE in mbed_app.json. It's disabled by default. 2019-09-03 11:54:11 -05:00
Ryan Morse b140b7011a Update PDL to latest 1.3 build
Updates to documentation and personalities. No functional code changes.
2019-08-30 08:35:39 -07:00
Roman Okhrimenko 9780c9018e Disabled QSPI for now 2019-08-30 16:00:09 +03:00
Roman Okhrimenko c249bf97c2 Updated target files structure to align with the following BSP PR. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 515555e7ba Removed scripts for provisiongs from repository, made fixes per PR comments, adjusted Readme.md 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 74e873a045 Updated README.md 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 74c5ea6517 Updated BSD license file content. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 7e8d569261 Added example x.509 certificate for provisioning. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko b8639a00ec Updated CyBootloader hexes. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 9d4a697207 Updated linker scripts and startup file for ARM - fixes tests-mbedmicro-rtos-mbed-heap_and_stack failure on ARM compiler. 2019-08-30 15:10:19 +03:00
Roman Okhrimenko 4db392c2f6 Updated licenses in files, mentioned in commnets to https://github.com/ARMmbed/mbed-os/pull/11046 2019-08-30 15:10:18 +03:00
Roman Okhrimenko b15d54f5bf Fixed IAR linker script. 2019-08-30 15:10:18 +03:00
Roman Okhrimenko ed9995e06c PSOC6_SB: Initial commit to add CY8CPROTO_064_SB to mbed-os sources. 2019-08-30 15:10:18 +03:00
Martin Kojtal 1c32e3ca5a
Merge pull request #11353 from kyle-cypress/pr/psoc-reserved-resources
Add reserved resources metadata to Cypress BSPs
2019-08-30 12:47:42 +02:00
Martin Kojtal 335f3ad7ea
Merge pull request #11355 from kyle-cypress/pr/psoc-serial-flash
Initial support for Serial Flash on PSoC Devices
2019-08-30 12:42:59 +02:00
Ryan Morse d373cab5ab Initialize serial flash on device startup 2019-08-29 14:09:21 -07:00
Ryan Morse ee944cf850 Add serial flash implementation for PSoC 6 2019-08-29 14:08:56 -07:00
Ryan Morse aaf641062c Update linker scripts based on latest PDL 1.3 2019-08-29 07:15:56 -07:00
Ryan Morse 13f216d23d Fix LPA pin configuration for two Cypress Targets
Fixes are for CY8CKIT_062S2_43012 and CY8CPROTO_062_4343W
2019-08-28 10:56:15 -07:00
Kyle Kearney e8f325fe33 Update device startup code and linker scripts
Only include the CM4 startup code and linker scripts with the target for each board.
2019-08-28 10:56:15 -07:00
Kyle Kearney 8c2dec1233 Update board hardware configuration
Include all configurator design files with each BSP
2019-08-28 10:56:15 -07:00
Kyle Kearney 166325ac37 Move nested targets up one level
For kit targets that inherit from a module, move the kit a top-level
target folder rather than nesting underneath the module folder, to
avoid too-long-path issues on Windows.
Note this only changes the folder layout, not the inheritance.
2019-08-28 10:56:14 -07:00
Kyle Kearney 317f720b11 Move BSP design.modus/GenSrc into its own component
Enables code examples/end user applications to override if necessary
Add BSP_DESIGN_MODUS component by default to all PSOC6 boards. Applications can remove this if necessary.
2019-08-28 10:56:14 -07:00
Kyle Kearney 236bf2c0c3 Initialize timer for us_ticker at startup
This avoids a stack overflow if sleep is called for the first time from
the idle thread (which by default has a fairly small stack, and which is
already fairly deep by the time it calls into the usticker adapter)
2019-08-28 10:56:14 -07:00
Kyle Kearney ad6e833450 Enable SDIO DeepSleep Callback 2019-08-28 10:56:14 -07:00
Ryan Morse 0164ddcc80 Minor updates to BSP init for clarity 2019-08-28 10:56:14 -07:00
Kyle Kearney 85dd8d704b Clean up unnecessary doxygen comments
Fix incorrect file names in a few headers
2019-08-28 10:56:14 -07:00
Kyle Kearney d50145fd1d Comment about resource reservations in BSP Init 2019-08-28 10:56:14 -07:00
Kyle Kearney 0a1e64dd00 Register Sysclk PM callback in BSP Init 2019-08-28 10:56:14 -07:00
Kyle Kearney ced234607e Clean up common BSP implementation 2019-08-28 10:56:14 -07:00
Kyle Kearney e64fdba7fc Update BSP and WifiInterface for WHD Changes 2019-08-28 10:56:14 -07:00
Kyle Kearney 5d819ebc81 Initialize wifi SDIO during BSP init 2019-08-28 10:56:14 -07:00
Kyle Kearney d98fa7a569 Rename BSP header for easier moves between targets 2019-08-28 10:56:14 -07:00
Martin Kojtal 67d1bb180b
Merge pull request #11319 from kyle-cypress/pr/whd-1.30-update
Update WHD to 1.30.0
2019-08-28 16:11:24 +02:00
Martin Kojtal ae247b5645
Merge pull request #11326 from kyle-cypress/pr/psoc6-pdl
Update PDL for Cypress Targets
2019-08-28 12:30:37 +02:00
Ryan Morse c611e76297 Update WHD to latest 1.30 build 2019-08-27 17:16:44 -07:00
Ryan Morse ac3951097f Update PDL to 1.3.0 final 2019-08-27 16:13:07 -07:00
Ryan Morse 5c899a3350 Bug fixes to interrupt/event handling in SDHC HAL 2019-08-27 15:29:32 -07:00
Shuopeng Deng 8ad377add3 Fix I2C handling of 1 byte external memory address 2019-08-27 15:10:34 -07:00
Ryan Morse 459666f8f2 Fixed issue in QSPI when there aren't 8 pins 2019-08-27 15:10:34 -07:00
Kyle Kearney 375221097c Update CSP to latest
Update HAL adapter for interface changes
Misc minor fixes to HAL adapter
2019-08-27 15:10:34 -07:00
Ryan Morse 5e2234f3e3 Add reserved resources lists to Cypress BSPs
These provide information to allow Cypress graphical configuration tools
to avoid conflicting usage of hardware resources which are managed by
firware included with the BSP.
2019-08-27 11:35:23 -07:00
Kyle Kearney 33493b12d9 Update WHD clients for interface changes 2019-08-26 16:05:47 -07:00
Ryan Morse 66cf10f030 Update WHD to 1.30.0 2019-08-26 16:05:46 -07:00
Kyle Kearney 04aa0a6e9d Update PDL 2019-08-23 17:58:41 -07:00
Martin Kojtal c37b5628ec
Merge pull request #11255 from cy-vaira/nvram-cy8cmod-062s2-43012
Update NVRAM image for target CY8CMOD-062S2-43012
2019-08-20 10:27:30 +02:00
Vairamuthu Ramasamy e7f190f2d7 Updated nvram image for target CY8CMOD-062S2-43012 2019-08-19 14:07:33 +05:30
Hugues Kamba 3d6fb15b48 Use consistant naming for Cypress USB target files. 2019-08-16 15:42:43 +01:00
Hugues Kamba 5cbc3e0497 Relocate USB target specific code to root `targets` directory
All target specific source and header files should be in the `targets`
directory located at the root of the Mbed OS repository.
2019-08-16 15:42:43 +01:00
Kyle Kearney 33b06d4109 Fix inout pins not functioning correctly
Update the drive mode when setting the GPIO direction.
2019-07-31 11:51:04 -07:00
Kyle Kearney b65be5fa29 Bug fixes to I2C and SPI drivers
- Fix assert when spi_master_block_write called with 0 size
- Fix assert when spi_format called before spi_frequency
- Simplify implementation of spi_master_write
- Simplify pointer arithmetic expressions in cyhal_spi_transfer and
  cyhal_spi_transfer_async
- Fix I2C driver not honoring the frequency specified during init.
2019-07-23 15:40:45 -07:00
Kyle Kearney 40557cefeb Add target for CY8CKIT_062S2_43012 2019-07-19 15:44:27 -07:00
Volodymyr Medvid bab34cb467 PSOC6: cleanup DEVICE_QSPI mappings
Note: device_has: "QSPI" is still disabled for TARGET_PSOC6
(QSPI HAL implementation is incomplete).
2019-07-11 12:50:56 +03:00
Volodymyr Medvid d77fb26e9f PSOC6: fix license headers per review feedback 2019-07-08 18:25:03 +03:00
Volodymyr Medvid 5cc66282dd PSOC6: remove PSA targets 2019-07-08 14:49:26 +03:00
Volodymyr Medvid 8ede226c16 PSOC6: add WHD sources 2019-07-08 14:24:23 +03:00
Volodymyr Medvid 4f22853c1e PSOC6: update BSP sources 2019-07-08 14:24:23 +03:00
Volodymyr Medvid c647531767 PSOC6: update BSP GeneratedSource, add design.modus 2019-07-08 14:24:22 +03:00
Volodymyr Medvid 4bd47e9bca PSOC6: update to latest psoc6pdl 2019-07-08 14:24:21 +03:00
Volodymyr Medvid b562dd7895 PSOC6: update Cypress targets to use psoc6csp 2019-07-08 14:24:20 +03:00
Volodymyr Medvid a9cd9482c0 PSOC6: add psoc6csp asset with Cypress HAL implementation
PSoC 6 Chip Support Package provides hardware abstraction layer
for Cypress PSoC 6 device peripherals.
2019-07-08 13:26:46 +03:00
Volodymyr Medvid c9105eb068 PSOC6: use prebuilt CM0+ C arrays instead of HEX images
Replace the prebuilt CM0+ HEX images with C files that provide the
variable cy_m0p_image placed to the combined ELF image with linker
script. This simplifies build flow of PSoC 6 application and improves
compatibility with IDE export targets. It is still possible to use
the custom prebuilt HEX images for PSA targets that remove CM0P_SLEEP
label and specify the `hex_filename` in targets.json.
Linker scripts are compatible with both scenarios.
2019-07-08 10:41:02 +01:00
Volodymyr Medvid 9d983478d7 PSOC6: add psoc6cm0p asset with prebuilt CM0+ C arrays 2019-07-08 10:33:48 +01:00
Maciej Bocianski fcde82ba4f HAL I2C: adds missing DEVICE_I2C guards 2019-06-19 23:08:55 +02:00
Hennadiy Kytsun 7447cac66c Cypress: Fix issue #10613 2019-06-03 16:26:52 +03:00
Volodymyr Medvid c870d6f1ba PSOC6: move cmsis.h and device.h out from psoc6pdl directory
This simplifies updating of psoc6pdl directory to the latest Cypress
PSoC 6 PDL releases. cmsis.h and device.h are not part of psoc6pdl.
2019-05-24 15:16:37 +03:00
Anna Bridge d99756324a
Merge pull request #10483 from vmedcy/pr/cy-system-psoc6
PSOC6: move mbed_sdk_init to mbed_overrides.c
2019-05-16 11:00:29 +01:00
Volodymyr Medvid 737c98ff8f PSOC6: simplify the mbed_sdk_init sequence 2019-05-03 16:54:23 +03:00
Ryan Morse a8570ffe6c Added support for QSPI to Cypress Boards 2019-05-01 07:09:58 -07:00
Volodymyr Medvid c98f91e375 PSOC6: move mbed_sdk_init to mbed_overrides.c
Purposes:
* Remove MbedOS-specific code from system_psoc6_{cm4,cm0plus}.c
  to simplify updates to new PDL version (startup code is part of PDL).
* Unify mbed_sdk_init initialization sequence for both CPU cores.
  This change is non-functional, sequence itself is not changed for any
  of the PSoC 6 M4/M0 PSA/non-PSA targets.
2019-04-23 14:44:56 +03:00
Hennadiy Kytsun 2417392419 CY8CKIT_062_WIFI_BT_PSA: mention tools/psa/release.py in README 2019-04-16 11:50:48 +03:00
Hennadiy Kytsun 20a302db2e PSOC6: remove __attribute__((constructor)) from SystemInit 2019-04-16 11:50:47 +03:00
Hennadiy Kytsun 28113a23cc PSOC6: rebuild CY8CKIT_062_WIFI_BT_PSA prebuilt HEX files 2019-04-16 11:50:47 +03:00
Hennadiy Kytsun ef19fb6ebb PSOC6: add ARMC6 support (fix issue #9830)
Update PDL syslib driver to 2.30.
Update startup assembly and linker scripts.
2019-04-16 11:50:47 +03:00
Hennadiy Kytsun 248013aca8 PSOC6: remove custom IPC configuration for PSA
* Update PDL startup driver to version 2.40
* Update linker scripts and startup assembly
* Remove custom IPC configuration from PSA initialization:
  use default IPC configuration provided by low-level startup code.
2019-04-16 11:50:46 +03:00
Hennadiy Kytsun ae716e2ab7 PSOC6: update version of PDL flash driver
Flash driver 3.30:
Moved ipcWaitMessageStc structure to the RAM section called ".cy_sharedmem"
Added support Secure Boot devices
Moved CY_FLASH_EFFECTIVE_PAGE_SIZE to flash_api.c (the macro is Mbed specific).
2019-04-16 11:50:46 +03:00
Hennadiy Kytsun e8300553af PSOC6: update version of PDL IPC driver 2019-04-16 11:50:46 +03:00
Hennadiy Kytsun f45d701317 PSoC6: Remove TARGET_CY8C62XX CSP directory
GeneratedSource folders are BSP specific. No parts of the kit BSP can be reused
as generic chip support package. Remove TARGET_CY8C62XX directory,
and use flat BSP inheritance model:

MCU_PSOC6 -> MCU_PSOC6_M4 -> CY8CKIT_062_WIFI_BT
MCU_PSOC6 -> MCU_PSOC6_M0 -> CY8CKIT_062_WIFI_BT_M0
2019-04-16 11:50:46 +03:00
Martin Kojtal ffe9ddfb2d
Merge pull request #10268 from cy-vivekp/pr/serial_rts
PSoC6 serial driver: Setup RTS and TX lines on deepsleep entry/exit
2019-04-10 12:23:11 +02:00
Vivek Pallantla 96b6f99bee PSoC uart: Setup RTS and TX lines in deepsleep
When PSoC enters deepsleep, in uart driver
  - deassert RTS, set RTS to output high
  - set TX to output high
2019-03-28 18:01:00 -07:00
Vivek Pallantla 7799be6dad PSOC: Modify lp_ticker to 32 bit
Needed for PSoC to deep-sleep for more than 2 seconds
Max sleep with 16 bit lp_ticker (before this change) : 2sec
Max sleep with 32 bit lp_ticker (after this change)  : 36hours
2019-03-28 16:21:59 -07:00
Cruz Monrreal 0395150bfb
Merge pull request #10074 from morser499/cy-mbed-os-5.12.0-pwm-free
Fixed issue with PWM not being freed when the object is destroyed
2019-03-27 00:21:54 -05:00
Ryan Morse 51a47139f3 Fixed issue with PWM not being freed when the object is destroyed 2019-03-21 07:48:42 -07:00
Martin Kojtal 0e37fc206c
Merge pull request #10097 from 0xc0170/rollup
Rollup PRs: simple fixes
2019-03-15 08:04:29 +01:00
Yossi Levy 0a5b355d9c Adding documentation for MBED_APP_START and MBED_APP_SIZE in TARGET_CY8C62XX and TARGET_CY8CKIT_062_BLE linker scripts 2019-03-14 14:26:23 +02:00
Yossi Levy dd27a3400b mbed-os to support bootlader for Cypress CY8CKIT_062_WIFI_BT_PSA and CY8CKIT_062_BLE 2019-03-14 14:26:23 +02:00
Oren Cohen 5d1dae40cd "Update secure binaries for CY8CKIT_062_WIFI_BT_M0_PSA" 2019-03-14 11:53:08 +02:00
Oren Cohen 4c9fe7def4
Finish memory protection and add static assert 2019-03-13 21:08:12 +02:00
Oleg Kapshii 2af3a82cd8 Removed PSoC6 SystemInit Workaround for ARM compiler 2019-03-12 17:00:13 -07:00
Evgeni c87d5d48c4 "Update secure binaries for CY8CKIT_062_WIFI_BT_M0_PSA" 2019-03-12 11:13:45 +02:00
Evgeni Bolotin 04c5803131 make protected secure flash region configurable and change secure and non secure default region sizes 2019-03-12 11:13:18 +02:00
Oren Cohen d6863d89e7 PSoC 6 Correct TRNG behaviour
* Remove NVSEED from M0_PSA
* Disable TRNG support for PSA M4
2019-03-10 16:16:53 +02:00
Kyle Kearney 4c1ff13e30 Rebuild PSoC6 secure binaries 2019-03-07 09:21:54 -08:00
Neil Tuttle 084a83717f Rename PSoC 6 assembler files from .s to .S 2019-03-07 08:40:20 -08:00
Neil Tuttle ac6a6b8d00 TARGET_PSOC6: Fix incorrect serial clock divider
If the board-specific initialization code configures the serial port to
use an 8-bit divider, the serial_init_clock function would configure the
16-bit divider with the same index instead of the intended 8-bit
divider.
2019-03-07 08:40:20 -08:00
Vivek Pallantla 0cce5d53b8 PSOC6 deep-sleep changes
- Enable add MBED_TICKLESS in targets/targets.json
 - BLE : deep-sleep aware HCI transport driver
 - WIFI: deep-sleep aware driver
 - Rebuild WICED libraries with Low Power changes
2019-03-07 08:40:20 -08:00
Sergii Vozniak 69c5404662 Fixed type of STDIO UART initialization variable. 2019-03-07 08:40:20 -08:00
Oleg Kapshii aedec74b9a Added support for PSA target to WIFI_BT board
Added WiFi_Bt CM4 PSA target in mbedos json
Added SPE-NSPE mailbox initialization for CM4 SystemInit
Made similar to FUTURE_SEQUANA configurations
Copied FUTURE_SEQUANA CM0 SPM part for WiFi_Bt smoke test
Added CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Sorted files for new CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Copied files for CY8CKIT_062_WIFI_BT_M0_PSA from FUTURE_SEQUANA
Copied and updated cm0p start files
Corrected according to FUTURE_SEQUANA
Changes to M0 startup files to have SPM started
Fixed implicit declaration warning
Commented interrupts enabling according to FUTURE_SEQUANA flow
Updated prebuild spm_smore CM0 hex for CM4 target
Turned on greentea environment
Used special memory region for common CM0/CM4 data
Updated prebuild CM0 SPM hex
Placed shared memory region for flash operations into SPM shared memory region
Updated cyprotection code and configuration
Start address of protected regions is set by a defined number from target.json
Added masters pcMask configuration
Added support for PSA target to WIFI_BT board
Enabled resources protection for SPM
Aligned RAM usage according to Cypress FlashBoot and CyBootloader
alligned protection config
Added CYW943012P6EVB_01_M0 target
Enlarged heap size, remobed nv_seed
Added heap reservation in linker script from mbed-os
Removed heap size definition
turned on nv_seed config
Removed nv_seed macros
Enabled protection for PSoC6 CM0
Added PSoC6 CM0 PSA readme
Enabled mbed_hal-spm test
Enabled nv_seed and removed unneeded ipc config define
Added SPDX string to feature_ble cypress target files
Removed unneeded supported_toolchains lines for Cypress targets
Disabled protection settings
Corrected flash initialization for PSoC6 CM0 PSA
Changed PSoC6 IPC6 protection for flash
Enabled special flash initialization and enabled protection settings
Updated and added new prebuild PSoC6 CM0 PSA hex files
Disabled HW TRNG and CRC for PSoC6 CM4 PSA target
Added missing const to allow types to match
Updated PSoC6 WIFI_BT_PSA prebuilt directory
Moved PSoC6 shared section usage area definition to begin of ld
Added initial ARM_STD linker and startup files for PSoC6 CM0
Added initial IAR linker and startup files for PSoC6 CM0
Added defines to disable some SPM protection settings for PSoC64
Moved Flash function variables into separate memory region
Added defines for new Public area definition
Updated PSoC6 CM0_PSA hex-files
2019-03-07 08:40:20 -08:00
David Saada 9cacd029ef Reduce flash page size from 512 to 32 bytes in PSOC6 based boards
Page size in all PSOC6 boards is 512 bytes. This is very problematic in
all storage applications. This change reduces the page size (in flash_api's
flash_program_page API) to 32 by reading the original page, modifying it
with programmed data and programming it back. The number 32 for page size
conforms to the number of times (16) this action can be done.
2019-03-06 13:45:27 +02:00
Cruz Monrreal e1736cd06f
Merge pull request #9571 from mprse/fix_9523_rtos_less_issue
Update to 2-region model for HEAP and Stack Memory
2019-02-26 22:50:19 -06:00
Cruz Monrreal fded3631e3
Merge pull request #9775 from vmedcy/psoc6-port-api
PSOC6: fix port_write API
2019-02-20 12:02:26 -06:00
Volodymyr Medvid d49e2ab232 PSOC6: fix port_write API
Fix port_write API to correctly shift the passed value.
This allows the reference application provided in PortOut docs
to work corectly with arbitrary LED_MASK.
https://os.mbed.com/docs/mbed-os/v5.11/apis/portout.html

The fix applies to both PSOC6 and PSOC6_FUTURE HAL implementations.
2019-02-20 12:32:10 +02:00
deepikabhavnani d0cc7aceb5 Target_Cypress: Update linker files to add heap limit 2019-02-19 15:49:49 -06:00
Volodymyr Medvid 06354bf48e PSOC6: update BSP generated sources with latest configurator
Use ModusToolbox Device Configurator 1.1.0.284 to generate the
BSP low-level initialization code. Compatible version of Device
Configurator to be released with ModusToolbox 1.1.

Notable changes:
* rename cycfg_connectivity -> cycfg_routing
* switch LF_CLK clock source from ILO to WCO on
  CY8CPROTO-062-4343W and CYW943012P6EVB-01
2019-02-19 17:59:05 +02:00
Volodymyr Medvid c97f742bd7 PSOC6: minor updates to Cypress HAL 2019-02-19 17:59:01 +02:00
Volodymyr Medvid edb944abf0 PSOC6: update PDL to the latest version 2019-02-19 17:04:10 +02: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 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
Volodymyr Medvid 5c47eb4b20 PSOC6: add BSP generated sources for Cypress kits
Code generated for pioneer kits:
* CY8CKIT-062-4343W
* CY8CKIT-062-BLE
* CY8CKIT-WIFI-BT
Prototyping boards:
* CY8CPROTO-062-4343W

The source is generated with ModusToolbox Device Configurator.
The origin design.modus files used to produce the GeneratedSource
will be submitted in the consequent pull requests.
2019-02-06 19:39:42 +02:00
Volodymyr Medvid 7aeb2ff361 Add prebuilt CM0+ images for Cypress kits 2019-02-06 19:39:42 +02:00
Volodymyr Medvid 769b725601 PSOC6: add BSPs for Cypress kits 2019-02-06 19:39:42 +02:00
Volodymyr Medvid 432c29d806 PSOC6: add CRC and TRNG APIs
Exclude the labels from inherited FUTURE_SEQUANA targets.
2019-02-06 19:39:42 +02:00
Volodymyr Medvid 6d932c69e6 PSOC6: update the HAL implementation to latest PDL
Integrate the latest fixes to the PSoC 6 HAL.
2019-02-06 19:39:41 +02:00
Volodymyr Medvid 4713de29db PSOC6: add the latest Cypress PDL sources 2019-02-06 19:39:38 +02:00
Volodymyr Medvid cd98eb619a PSOC6: reuse FUTURE_SEQUANA porting layer
Copy the porting layer from TARGET_PSOC6_FUTURE to TARGET_PSOC6.
This commit is intended to make the history and changes applied easier
to follow.
ipcpipe_transport.c, ipcpipe_transport.h, rpc_api.h, rpc_defs.h
are excluded (not used by Cypress port).
PeripheralNames.h is moved to BSP layer introduced in subsequent
commits (the peripheral names and count are board-specific).
2019-02-06 18:56:19 +02:00
Volodymyr Medvid 6b0658dd30 Move FUTURE_SEQUANA port to TARGET_PSOC6_FUTURE
The targets/TARGET_Cypress/TARGET_PSOC6 is dedicated to the mbed-os HAL
and PSoC 6 MCU targets developed by Cypress Semiconductor. Move the
existing port developed by Future Electronics to TARGET_PSOC_FUTURE
and update the labels in targets.json appropriately.
2019-02-06 18:56:19 +02:00
Leszek Rusinowicz caaaaff3e6 FUTURE_SEQUANA: Removed special "tags" from M0 hex images for better tools compatibility
This fixes issue #9611
2019-02-05 13:43:30 +01:00
Martin Kojtal dcba5ffa3c
Merge pull request #9529 from kfnta/its_crypto
RollUp PR Crypto with ITS
2019-02-04 17:14:05 +01:00
Martin Kojtal 2526ac8420
Merge pull request #9585 from lrusinowicz/ble_controller_core
PSOC6: M0 core binary image for BLE controller updated to version 1.05
2019-02-04 10:48:10 +01:00
Leszek Rusinowicz 83b4e4a9a6 PSOC6: M0 core image for BLE controller updated to version 1.05
- fixed issues with timeouts withing BLE stack causing disconnections
- fixed issues with i/o reservation conflicts
2019-02-01 17:01:43 +01:00
Oren Cohen 3f92beb08b Update FUTURE_SEQUANA_PSA secure binaries 2019-01-31 19:31:53 +02:00
Oren Cohen f5e4f69c02 Update FUTURE_SEQUANA_PSA secure_binaries 2019-01-31 17:17:56 +02:00
Oren Cohen 0de098e149 Add FUTURE_SEQUANA prebuilt binaries 2019-01-31 17:17:55 +02:00
Cruz Monrreal eb26d82ca9
Merge pull request #9223 from kfnta/future_sequana_psa_binnaries_importer
Update PSA binaries importer for FUTURE_SEQUANA_PSA
2019-01-24 17:02:44 -06:00
Oren Cohen e1af45b3b3 Skip redundant binaries 2019-01-24 19:43:05 +02:00
Cruz Monrreal 0c6f0e4f49
Merge pull request #9368 from lrusinowicz/psoc6_serial_fixes
PSOC6: Fixes for serial hal driver, asynchronous mode.
2019-01-23 22:47:32 -06:00
Leszek Rusinowicz f09805c5a2 Any RX event should end read operation. 2019-01-21 13:05:54 +01:00
Oren Cohen 3abe696121 Typo 2019-01-14 19:09:53 +02:00
Oren Cohen 249a06675b Add license 2019-01-14 19:05:34 +02:00
Oren Cohen 1b23d3f112 Update PSA binaries importer for FUTURE_SEQUANA_PSA 2019-01-14 19:05:34 +02:00
Leszek Rusinowicz 75131069d0 Fixes for PSoC6 serial interface, asynchronous mode. 2019-01-14 12:32:05 +01:00
Przemyslaw Stekiel 8f230b6e70 [Cypress] Support boot stack size configuration option 2019-01-08 15:32:02 +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
Cruz Monrreal e17b14adaf
Merge pull request #9157 from lrusinowicz/sequana_m0_firmware_update
PSOC6: Updated default M0 image to not modify UDB configuration when…
2018-12-19 13:35:56 -06:00
Leszek Rusinowicz e448b2b1c2 [PSOC6] Updated default M0 image to not modify UDB configuration when comming out of a deep sleep state.
On Mbed this is performed only on M4 core.
2018-12-19 14:07:11 +01:00
Leszek Rusinowicz 0f6a35ba73 Fixing merge issue for merge into master. 2018-12-19 13:35:07 +01:00
Cruz Monrreal f50403a9dc
Merge pull request #8905 from lrusinowicz/spi_fixes
SPI and deep sleep fixes for FUTURE_SEQUANA target.
2018-12-10 11:35:23 -06:00
Leszek Rusinowicz ea5dccaa92 FUTURE_SEQUANA deep sleep fixes:
- fixed feature rename (from DEVICE_LOWPOWERTIMER to DEVICE_LPTICKER) in all missed places
- disabled power manager callback for serial driver
2018-12-10 12:56:58 +01:00
Cruz Monrreal 1f329d0fc4
Merge pull request #9009 from lrusinowicz/srm_fixes
[PSOC6]: Fix for static resource manager.
2018-12-08 18:36:42 -06:00
Leszek Rusinowicz 30f0bc65ce [PSOC6]: Fix for static resource manager. 2018-12-07 13:36:30 +01:00
Oren Cohen cb58b34581 Prebuilt images 2018-12-06 11:33:35 +02:00
Oren Cohen 251a270942 fix for flash iap test 2018-12-05 20:01:07 +02:00