Commit Graph

54 Commits (34ef11630c2660bdb8643ebe7e87713944ab20c4)

Author SHA1 Message Date
TomoYamanaka f6c6e79145 Fix NVIC Wrapper include
Renesas mbed boards incorporate NVIC Wrapper because Cortex-A9 use GIC. For example, NVIC_SystemReset() is defined in nvic_wrapper.c and declared in nvic_wrapper.h.
Because I removed one of include processing accidentally, I fixed the lack.
This supplements PR #5890.
2018-02-09 11:53:43 +09:00
TomoYamanaka 412a79d444 [RZ_A1LU] Fix TRNG function
Related to the review of #5857, I fixed the TRNG function for GR-LYCHEE.
- I modified to zeroize "recv_data" before the function return.
- I added the processing that check the return value of I2C.read function. If return value is error, "output" is zeroized before function return.
- In trng_get_bytes_esp32 function, there is a time lag in the period from ESP32 reset to start working, error may occur when "Write" is called. Thus, I added a retry counter due to address this concern. There is not this counter for "Read" since it is called after "Write".
2018-02-06 15:44:33 +09:00
Cruz Monrreal da6532e57a
Merge pull request #5857 from TomoYamanaka/master
Registration GR-LYCHEE board as a new mbed board
2018-01-26 10:50:44 -06:00
TomoYamanaka 1469fcde41 RZ_A1LU: cmsis nvic include fix
To get cmsis nvic definitions, I added the process that include "cmsis_nvic.h" in cmsis.h.
Relation PR is #5890.
2018-01-20 00:29:09 +09:00
Martin Kojtal 5554ab28b3 RZ_A1H: cmsis nvic include fix
To get cmsis nvic definitions, this header file should be included
in cmsis.h file.

Fixes #5886
2018-01-19 13:49:25 +00:00
TomoYamanaka e8378effc8 Modify the arrangement of "{" that shows the function start
Regarding "{" that show the function start, I modified the the arrangement from right of function to new line.
2018-01-19 18:46:20 +09:00
TomoYamanaka 4bc79b0ecf Add license header on top in reserved_pins.h
I modified the lack of license header in the below header files.
- targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/TARGET_MBED_MBRZA1H/reserved_pins.h
- targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_GR_LYCHEE/TARGET_MBED_MBRZA1LU/reserved_pins.h
2018-01-19 18:39:37 +09:00
TomoYamanaka ae1eaa985f Support TRNG function for GR-LYCHEE
I supported the TRNG function when target is GR-LYCHEE.
GR-LYCHEE generates TRNG by acquiring the random number of Wifi module(ESP32) incorporated in it using I2C.
2018-01-16 13:45:15 +09:00
TomoYamanaka aa5da2cd2e Add the definition for GR-LYCHEE in mbed_rtx.h
In mbed_rtx.h file, I added the definition for GR-LYCHEE to use the "Dynamic Heap" processing when the target is GR_LYCHEE.
2018-01-16 13:39:44 +09:00
TomoYamanaka 776b27cefb Add startup processing having CMSIS5/RTX5 been available on GR-LYCHEE
For supporting to CMSIS5/RTX5, I added the start-up processing of 3 toolchains (ARMCC, GCC_ARM, IAR) and the register definition of RZ/A1LU specific.
In addition, I added the linker script files to implement the dynamic HEAP the same as GR-PEACH(RZ/A1H).
2018-01-16 13:34:35 +09:00
TomoYamanaka b92f75ad3c Modify the lack of copyright to header files
I modified the lack of copyright in the below header files that I added for commonizing the RZ_A1 related files.
- targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_RZ_A1H/mbed_drv_cfg.h
- targets/TARGET_RENESAS/TARGET_RZ_A1XX/TARGET_VK_RZ_A1H/mbed_drv_cfg.h
2018-01-12 14:18:54 +09:00
TomoYamanaka 8b7e2abdb7 Commonalize the files in "targets/TARGET_RENESAS/TARGET_RZ_A1XX" directory
I made be available in common whatever the board related to RZ_A1 in the below files.
- Since there are the table code of Pinmap differs for each board, I moved the code to "PeripheralPins" file for each board, and changed to include PeripheralPins.h.
  analogin_api.c, can_api.c, gpio_irq_api.c, i2c_api.c, pinmap.c, port_api.c, pwmout_api.c, serial_api.c, spi_api.c and us_ticker.c

- Since there are some board-specific processes, I enclosed the processes with "#ifdef" and rearranged the functions to make be easier to enclose.
  can_api.c, ethernet_api.c and serial_api.c

- Since there are the driver configuration values differs for each board, I added "mbed_drv_cfg.h" file for each board and defined macros for the values, and changed to refer to the macros.
  can_api.c, gpio_api.c, pwmout_api.c and rtc_api.c
2018-01-09 18:20:50 +09:00
TomoYamanaka 6f851a820c Revise the folder structure in "targets/TARGET_RENESAS" directory
In "targets/TARGET_RENESAS" folders, same as Cortex-M targets, I changed the folder structure to combine files that can be shared as RZ/A1 related.
 And I renamed the folder name to "TARGET_RZ_A1XX" in order to make commonality explicit.
- "targets/TARGET_RENESAS" folder
  <before>
  \targets\TARGET_RENESAS\TARGET_RZ_A1H
  \targets\TARGET_RENESAS\TARGET_VK_RZ_A1H
  <after>
  \targets\TARGET_RENESAS\TARGET_RZ_A1XX
2018-01-09 17:39:22 +09:00
Martin Kojtal fed5dd1170 VK RZ A1H: fix errors from the latest cmsis updates
Use mbed critical section
2018-01-02 11:48:56 +00:00
Martin Kojtal 3247a96588 renesas: os tick only for rtos
As this is os tick implementation for rtos, it should not be compilied if rtos
not present (mbed 2)
2017-12-31 17:21:02 +01:00
TomoYamanaka 1bb2ca68ea Supplement the lack of "extended RTC" in RZ_A1H/rtc_api.c
Although the extened RTC is supported by #5363 commit ("Add support and tests for extended RTC"), it seems that the changes was overlooked in RZ_A1H_api.c.
So I added the changes with reference to other rtc_api.c.
2017-12-21 14:09:24 +09:00
TomoYamanaka f526f19661 Change the way of enter/exit of critical section of code
I changed disable_irq() / enable_irq() to core_util_critical_section_enter() / core_util_critical_section_exit() by utilizing "mbed_critical" function in the below drivers.
- serial_api.c
- us_ticker.c
2017-12-21 14:09:24 +09:00
TomoYamanaka 904fdaea7a Add the lacked definitions to mbed_rtx.h
I added the below definitions for working "Dynamic Stack" and "Dynamic heap" on Mbed OS by referencing with the codes of Cortex-M target board.
"ISR_STACK_START", "ISR_STACK_SIZE", "INITIAL_SP", "HEAP_START" and "HEAP_SIZE"
2017-12-21 14:09:24 +09:00
TomoYamanaka 2d11d6ef77 Add GIC_SetConfigration function to satisfy Cortex-A interrupt spec
By updating to the codes of CMSIS5/RTX5, GIC_SetConfigration() function was added for Cortex-A, this function is set the interrupt configuration using GIC's ICFGR register. Therefore, I added this function to satisfy Cortex-A interrupt spec in the below files.
"can_api.c", "ethernet_api.c", "gpio_irq_api.c", "i2c_api.c", "spi_api.c" and "us_ticker.c"
2017-12-21 14:09:24 +09:00
TomoYamanaka 15e91c1579 Revise startup processing having CMSIS5/RTX5 been available on GR-PEACH
For supporting tp CMSIS5/RTX5, I changed the start-up processing of 3 toolchains(ARMCC, GCC_ARM, IAR) and updated the register definition of PEACH specific.
In addition,
I changed the linker script files to implement the dynamic HEAP the same as Cortex-M targets.Since GR-PEACH's HEAP was a fixed area, I changed the label name(ZI_DATA to RW_IRAM1) and replaced the allocation of STACK/HEAP.
2017-12-21 14:09:24 +09:00
Martin Kojtal be52ba2156
Merge pull request #5363 from mprse/extended_rtc
Add support and tests for extended RTC
2017-12-12 17:36:44 +00:00
Przemyslaw Stekiel 106561669f Update RTC drivers for extended RTC. 2017-12-05 07:54:02 +01:00
Bartosz Szatkowski 717087c772 Renesas: Add empty mbed_rtx.h 2017-11-10 09:53:41 +00:00
Bartek Szatkowski c10dd0a725 RZ_A1H: Fix cmsis header name 2017-11-10 09:53:41 +00:00
mbedNoobNinja 610c8c85fc CAN Extended mode fix 2017-09-19 15:26:10 +03: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
Sam Grove 547320e99c Rename function st_rtc_localtime with _rtc_localtime 2017-06-07 23:24:48 -05:00
Vincent Coubard f880e44145 remove usage of mktime/localtime in favor of dedicated functions.
The use of mktime was causing a fault when called in interrupt handler because on GCC it lock the mutex protecting the environment, To overcome this issue, this patch add dedicated routine to convert a time_t into a tm and vice versa.
In the process mktime has been optimized and is now an order of magnitude faster than the routines present in the C library.
2017-06-07 22:06:22 -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
Martin Kojtal e229a49182 Merge pull request #4207 from geky/spi-remove-byte-locking
spi: Add SPI block-write to C++ and HAL for performance
2017-06-01 14:03:36 +02:00
Bartek Szatkowski 85cc9c8381 Remove deprecated RTX4 config options 2017-05-30 18:55:55 +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
adustm 6c1fc983b7 RENESAS: add call to can_frequency and use hz parameter of can_init_freq 2017-05-15 14:27:22 +02:00
adustm a912d05f3b Add can_init_frequency to RENESAS targets
hz is not used in can_init functions
2017-05-15 14:14:26 +02:00
Kevin Gilbert 28d1ac5a44 Added mapping to USER_BUTTON-labelled switches
Revert HRM1017 file source deletion

Added in small comment next to additions

Added mapping to BTN-labelled switches

Added mapping to USER_BUTTON-labelled switches

Undo incorrect mapping to SWIO pin in NORDIC target
2017-04-28 11:37:23 -05:00
TomoYamanaka 34d033a4c1 Fix mistake register setting in serial_format()
Currently, there is the issue in register setting into serial_format().
The issue is that parameter for baudrate setting is initialed zero in this function.
In baudrate  is less 9600bps, the issue occurs. In baudrate  is over 9600, not occurs. When call serial_baud() before serial_format(), baudrate override and set with an incorrect value.

Therefore, I fixed register setting not to set the parameter of baudrate setting in serial_format().
2017-03-10 12:20:21 +09: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
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
mbedNoobNinja be52c64cd4 missing IRQ pin fix 2017-01-25 12:05:41 +02:00
TomoYamanaka 0236d95fed Fix I2C driver for RZ/A1H
Previously, when "length = 0" as failsafe, "return 0" is executed.
But we changed so that only START bit and STOP bit are executed same as other devices.
2017-01-10 12:44:12 +09:00
tomoyuki yamanaka 623f8acdc4 [RZ/A1H]Fix TTB setting of RO_DATA area
I modified the TTB setting of RO_DATA area.
The current setting of this area is "not executable".
Therefore, when trying to execute a program placed in this area, a prefetch abort will occur.
So I changed from "Sect_Normal_RO" to "Sect_Normal_Cod".
2016-12-20 16:44:52 +09:00
tomoyuki yamanaka cea27724d7 Fix frequency function of CAN driver.
Until now, when the frequency function of CAN driver was executed, signal no output, and the frequency could not be changed.
Since there was an error in the frequency changing procedure I modified it.
2016-12-01 11:41:20 +09:00
tomoyuki yamanaka b7c901c8e7 Bug fix of initial value of interrupt edge in "gpio_irq_init" function.
Renesas modified the  initial value of interrupt edge in "gpio_irq_init" function.
The value was "both egde(rise and fall)".So we modified it to "low revel".
2016-11-18 21:03:00 +09:00
tomoyuki yamanaka ecff4225d4 Fixed the issue about push/pop of VFP register.
When the floating-point calculation is executed into the processing which is called from IRQ handlers, VFP register is overwritten.
Therefore, we fixed the issue. we added the process to execute the saving (Push) and the returning (Pop) of VFP register in before and after the appropriate processing.
2016-10-25 19:31:38 +09:00
Toyomasa Watarai 74cd326e35 Add cmsis.h inclusion 2016-10-18 11:27:52 +09:00
Sam Grove eee4db1fe0 Merge pull request #2896 from geky/restructure-cmsis
restructure - Restructure cmsis directory
2016-10-07 11:13:09 -05:00
Sam Grove 3aca6fdd86 Merge pull request #2899 from TomoYamanaka/master
Fix bugs of PWM driver.
2016-10-06 15:54:29 -05:00