Commit Graph

54 Commits (de9f9dd3a248b8e4b06894b3d52d81bdace6b5e1)

Author SHA1 Message Date
jacobjohnson-ON 41a0941d53 mbed OS 5.5.3, including the changes needed to enable 640k. Includes the proposed changes by Mac. 7/25/17 2017-07-25 17:37:14 -06: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
Martin Kojtal 865f470324 ncs36510: us ticker improvements
Do not ticker read in ISR, use reminder to schedule the next interrupt, this should make ticker much faster.

read - disable Timer0 while reading it, if ISR is pending just reread the time again via read() function

These 2 improvements should decrease time spent when reading/scheduling ticker
events.
2017-06-30 16:34:30 +01:00
Jimmy Brisson c7d6bbe295 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
Martin Kojtal 0f61af58a2 ncs36510: timer.h rename
This fixes an issue as Timer.h is mbed file, thus if this file gets included first,
causes failures.
2017-06-15 12:15:00 +01: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
Sam Grove fa0cd205a2 Merge pull request #4094 from pan-/fix_hal_ticker
[HAL] Add support for 64 bit us timestamp
2017-06-01 23:25:26 -05:00
Vincent Coubard 045b026ad4 NCS36510 RTC driver: Fix driver.
* Initialization clear interrupt status
* Remove state in management of interrupt
* Handle timestamp in the past
* Handle current seconds, even if out of the relative timestamp.
* Simplify interrupt handling logic.
2017-06-01 16:33:49 +01:00
Vincent Coubard 6fe07c640f Ticker NCS36510: Fix tests of the status register. 2017-05-31 19:16:05 +01:00
Bartek Szatkowski 85cc9c8381 Remove deprecated RTX4 config options 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Bartek Szatkowski b97ffe8fdc CMSIS5: Replace target defined NVIC_Set/GetVector with CMSIS implementation 2017-05-30 18:55:51 +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
Russ Butler 5cf2255afb Fix RAM vector table for NCS36510
Fix the ram address of the vector table on the NCS36510. Also reserve
space for it in the linker scripts.
2017-05-12 14:20:30 -05:00
Kevin Gilbert 0268c85101 Fixed typos 2017-05-02 13:16:14 -05:00
Kevin Gilbert 418d83b6c2 Addressed review comments: fixed unmapped switches and added Hexiware buttons 2017-05-02 12:20:05 -05: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
maclobdell 77f4e23c0f [NCS36510] Reduce default heap size allocated by IAR to 1/4 of total RAM.
Allows mesh minimal example to compile with IAR.
2017-04-13 22:48:34 -05:00
Radhika Raghavendran 9d06732aae Changed tab to spaces 2017-03-10 16:22:30 +05:30
Radhika Raghavendran e640f5f1e5 Re-do change for changing ADC range from 0 to 3.3V 2017-03-10 13:45:32 +05:30
Radhika Raghavendran c06fa3a335 A4 and A5 definitions added 2017-03-09 17:58:19 +05:30
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 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
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
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
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
0xc0170 2898199ccd ncs36510: lp ticker - remove unused header file inclusion (sleep) 2017-02-13 13:17:05 +00:00
pradeep-gr 48a78c554d NCS36510: spi_format function bug fix 2017-02-08 18:26:49 +05:30
0xc0170 3384572f14 ncs36510: fix sleep/deepslep name - add prefix hal_
This resolves an error that sleep is already defined.
2017-01-31 12:00:02 +00:00
0xc0170 86d136074c ncs36510: fix sleep header private file
This private header should have unique name, that does not collide with
generic names like sleep.h
2017-01-31 11:59:00 +00:00
Radhika 3d23ec0904 Formatting changes as per guidelines 2016-11-29 16:58:33 +05:30
Radhika 08ae38b3a0 Register map changes for RevG 2016-11-18 13:41:53 +05:30
Radhika d637f6d3ad Modified user trim default values. 2016-11-09 17:12:35 +05:30
Radhika eaf7265aa6 User trim added.
Astyle and pylint run on code.
2016-10-28 15:02:52 +05:30
Martin Kojtal 6eac2b008a Merge pull request #3009 from pradeep-gr/master
TRNG enabled. TRNG APIs implemented. REV A/B/C/D flags removed. Warnings removed
2016-10-28 10:13:50 +02:00
Martin Kojtal b826d1bb1a Merge pull request #3022 from hasnainvirk/ncs36510_fixes
OnSemi RAM usage fix
2016-10-27 10:04:31 +02:00
pradeep-gr bb824c6f91 mbed-os-tests-mbedtls-selftest issue fixed 2016-10-26 16:49:29 +05:30
pradeep-gr 99bd584070 Conflict resolved 2016-10-26 15:07:52 +05:30
pradeep-gr 4e4823053a To resolve conflict 2016-10-26 15:00:19 +05:30
Martin Kojtal 2175009bc5 Merge pull request #2938 from radhika-raghavendran/master
InterruptIn changes in NCS36510 HAL.
2016-10-25 11:58:39 +02:00
Radhika 7598b0572b Enable not checking against 0 or 1. 2016-10-19 14:11:49 +05:30
Radhika 1573405135 IRQ enable code moved out. 2016-10-19 13:44:10 +05:30
Radhika 17ed9e9777 Reverting Clock GPIO code to previous implementation of the gpio_api.c and gpio_irq_api.c 2016-10-19 09:52:12 +05:30
Radhika a3bccfdda7 gpio is connected API 2016-10-17 14:18:38 +05:30
Hasnain Virk 1b6f3cdbf6 OnSemi RAM usage fix
Previous code base had been wasting almost 4K of precious RAM.

* Main stack allocation reduced from 4K to 1K
* Un-necessary breakdown of RAM regions is removed. This gives us back 2K of RAM.
2016-10-17 11:37:53 +03:00
maclobdell e1657f13a0 add macros for NCS36510 IAR IDE building 2016-10-14 15:38:36 -05:00
Radhika b0265244a4 Fixed automerge problems. 2016-10-14 18:16:23 +05:30
Radhika 20e6a05bb8 Serial printf and InterruptIn changes 2016-10-13 17:36:23 +05:30