Commit Graph

38 Commits (529af2b0f44df7ec39ba5ae1b3eeee408519a5fc)

Author SHA1 Message Date
Edmund Hsu 10af90ac0a Resolve adi_tmr_ConfigTimer api conflict in us_ticker.c for both EV_COG_AD4050LZ and EV_COG_AD3029LZ 2018-08-06 16:41:55 +10:00
Edmund Hsu da6c6bdc49 Resolve adi_tmr_ConfigTimer discrepancy between __ADuCM4050__ and __ADuCM3029__ 2018-08-06 16:36:36 +10:00
Edmund Hsu 6a7bfeba6d Disable unused Configuration data from compiler warning
Add __ADuCM3029__ constants
2018-08-06 16:32:18 +10:00
Edmund Hsu 20de3366ae Add C++ linkage for adi_tmr.h 2018-08-06 16:25:32 +10:00
Edmund Hsu 9579440ce7 Add __ADUCM4050__ and __ADUCM3029__ to include MCU specific configurations 2018-08-06 16:23:25 +10:00
Przemyslaw Stekiel ace821017f Add implementation of ticker_free() function to CI boards.
This PR provides implementation of ticker_free() function for the following boards:
ARCH_PRO
EV_COG_AD3029LZ
EV_COG_AD4050LZ
K22F
K64F
K82F
KW24D
KW41Z
LPC546XX
NRF51_DK
NRF52_DK
NUCLEO_F207ZG
NUCLEO_F401RE
NUCLEO_F429ZI
NUCLEO_F746ZG
REALTEK_RTL8195AM
2018-08-02 09:48:10 +02:00
Przemyslaw Stekiel c0ee843d63 Add lp/us ticker_free() functions stub.
This patch adds only empty stubs of `us_ticker_free()` and `lp_ticker_free()` for all boards where these functions are not implemented.
2018-07-25 08:58:38 +02:00
Edmund Hsu 6feef97409 Enable COG boards instruction cache 2018-06-18 16:31:15 +10:00
Edmund Hsu e2fe49d403 Preserve RTC counter value while re-initialization 2018-05-25 13:04:23 -05:00
Edmund Hsu 8d670001f2 Remove trailing spaces of adi_rtc.c 2018-05-25 13:04:23 -05:00
Edmund Hsu e514c2c70d Fix us_ticker.c to support "USTICKER"
- Disable microsecond ticker interrupt on reinitialization
- Skip us_ticker_set_interrupt() if timestamp is already past
- Eliminate tmr2Config since tmrConfig is adequate for all timer config
2018-05-25 12:32:38 -05:00
Edmund Hsu e10ef5bd73 ADI: Enable bootloader for EV_COG_AD3029LZ and EV_COG_AD4050LZ 2018-04-20 16:20:02 +10:00
Edmund Hsu e2d9eb8b79 EV_COG_AD3029LZ: Rework linker scripts to support bootloader
- fix compiler warning message of flash_api.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
2018-04-20 15:57:05 +10:00
Edmund Hsu beb6a38009 EV_COG_AD4050LZ: Rework linker scripts to support bootloader
- fix compiler warning message of flash_api.c
- fix compiler warning message of startup_ADuCM4050.c
- eliminate absolute address of ROM tables
- add MBED_APP_START and MBED_APP_SIZE to linker scripts
2018-04-20 15:45:26 +10:00
Edmund Hsu 3d37c26d28 Add BUTTON pin names for EV_COG_AD4050LZ and EV_COG_AD3029LZ
Apart from reset and boot buttons, EV_COG_AD4050LZ and
EV_COG_AD3029LZ have 2 more user defined buttons:

- BUTTON1
- BUTTON2
2018-04-17 10:53:11 +10:00
Edmund Hsu 04eaabf579 Fix EV_COG_AD3029LZ `us_ticker_fire_interrupt()` minimal time interval
- ensure us_ticker_irq_handler() is called only when GP2 timer expires
- set us_ticker_set_interrupt() time interval to be 9.846 us
- set us_ticker_fire_interrupt() time interval to be 0.03846 us
2018-04-01 19:35:05 +10:00
Edmund Hsu ef6d93eca0 Fix EV_COG_AD4050LZ `us_ticker_fire_interrupt()` minimal time interval
- ensure us_ticker_irq_handler() is called only when GP2 timer expires
- set us_ticker_set_interrupt() time interval to be 9.846 us
- set us_ticker_fire_interrupt() time interval to be 0.03846 us
- convert tab to space
2018-04-01 19:34:24 +10:00
li-ho b26b682902 Fix on chip flash minimal programmable unit size
- sector size is 0x800 bytes
- writeable unit size is 0x8 bytes
- flash start address is 0x0
- total ADuCM3029 on chip flash size is 0x40000 bytes
- total ADuCM4050 on chip flash size is 0x7F000 bytes
2018-03-15 16:50:06 +11:00
Dave Wu fc481049f8 Cleared data structures in analogin_init();
Set buffer for 1 sample in analogin_read_u16. Before it assumes the
buffer is set outside by the higher layer. Now it's temporarily
located on the stack since only the ADC value is returned.
2017-12-21 09:59:13 +11:00
Edmund Hsu 165b2c665f Realign ADuCM4x50 and ADuCM302x instance memory blocks
Ensure all instance memory blocks meet 4 byte alignment requirement
  without relying on compiler's or liker's optional settings:
  - gpioMemory[]                                    for adi_gpio_Init()
  - aRtcDevMem0[]                                   for adi_rtc_Open()
  - i2c_Mem[] or I2C_Mem[]                          for adi_i2c_Open()
  - spi_Mem0[], spi_Mem1[], spi_Mem2[] or SPI_Mem[] for adi_spi_Open()
2017-12-07 14:57:08 +11:00
Edmund Hsu 7239be2bd7 Update trng_api.c
- Maintain compatible code for ARM 5 and ARM 6 while default alignment
   settings differ.
 - Instance memory containing memory pointers must be 4 byte aligned for
   all compilers regardless compilers' settings.
 - uint32_t is recommended to replace uint8_t for instance memory
   declaration because uint32_t guarantee 4 byte alignment.
2017-12-01 13:23:24 +11:00
Edmund Hsu 7c8cbd6ca2 Add ARMC6 feature to EV_COG_AD4050LZ and EV_COG_AD3029LZ 2017-12-01 09:59:43 +11:00
Dave Wu 45aa2130bc Added SystemCoreClock as an extern. 2017-11-16 13:29:43 +00:00
Dave Wu 401674284a Cleaned up some formatting issues. 2017-11-15 22:59:26 +11:00
Dave Wu 82a58ac94d Added support for ADI EV-COG-AD3029LZ platform.
Fixed issues raised from ARM PR review and removed the unsupported platform.

- Fixed an issue where the TRNG is read even though it may not be ready;
- Added configuration to ensure the buffering mode is disabled so only 8-bit bytes are generated;
- Moved the TRNG device handle into the trng_t structure.

Removed undefined spi slave related functions.

- Added error checking for trng_get_bytes function;
- Added curly brackets to single line conditions for some files;
- Changed rx and tx buffers in serial module as local variables;
- Removed some unused code and some minor formatting corrections;
- Minor i2c & spi updates for github pull request;
- Added function definition for spi_master_block_write.

Added default delay and sample times for the ADC during initialization.

- Added code to clear stack variable in trng_get_bytes upon exiting the
function;
- Remove lp ticker functionality as the timer hardware does not satisfy
lp timer requirements.

Added a check for the STUCK bit before reading the RNG data register to ensure there are no hardware faults.

- Removed .mbedignore to work around some exporter issues;
- Added #includes to some of the driver data C files for them to build on their own.
2017-11-15 16:35:31 +11:00
Dave Wu d5122c5ea5 - Removed .mbedignore due to an issue with the eclipse exporter not picking up the ignored files;
- Added #includes in BSP data C files so they can be built on their own without mbedignore;
2017-11-09 14:17:15 +11:00
Dave Wu 9e0e9c8bee Added a check for the STUCK bit before reading the RNG data register to ensure there are no hardware faults. 2017-11-02 15:50:55 +11:00
Wu 2eff4c7569 - Added code to clear temporary variable on the stack before exiting the
trng_get_bytes;
- Removed lp ticker as it does not satisfy the requirements of the lp
timer.
2017-10-30 02:16:55 +01:00
Dave Wu de2b5264e2 Added default delay and sample times for the ADC during initialization. 2017-10-12 12:46:54 +11:00
Dave Wu 6d116273c7 - Cleaned up some formatting issues; - Fixed a build error in spi_master_block_write; - Some clean up in serai_api. 2017-10-11 15:06:49 +11:00
Dave Wu 6f9a54777d Added curly brackets for the single line if else statement. 2017-10-09 17:28:46 +11:00
Dave Wu 5ea792cc9a - Added error checking for trng_get_bytes function;
- Added curly brackets to single line conditions in gpio_qpi.c and gpio_irq_api.c;
- Changed rx and tx buffers in serial module as local variables;
- Minor i2c & spi updates for github pull request;
- Added function definition for spi_master_block_write.
2017-10-09 17:13:58 +11:00
Dave Wu d1b81b2161 Removed the custom app thread stack size. 2017-10-03 17:32:10 +11:00
Dave Wu c196ad241d Removed undefined spi slave related functions. 2017-10-03 15:00:42 +11:00
Dave Wu c942171a99 - Fixed an issue where the TRNG device is read even when it is not ready;
- Added a configuration call in trng_init to make sure the TRNG buffering mode is disabled, so only 8-bit bytes are returned;
- Moved the TRNG device handle into the trng_t structure;
- Fixed some formatting errors in the adc driver.
2017-10-03 14:21:37 +11:00
Dave Wu 7cf9bf5c3d - Added definiton for i2c_reset;
- Removed unneeded code from i2c and serial modules.
2017-10-02 15:34:19 +11:00
Dave Wu ce580dde74 Fixed issues raised in the feedback from ARM for the ADuCM4050 platform. 2017-10-02 14:28:25 +11:00
Dave Wu 00b1e72e49 Added support for ADI EV-COG-AD4050LZ platform. 2017-09-20 14:37:22 +10:00