Commit Graph

67 Commits (b6b6866d38ead4561a03e49a000ac1d73f640585)

Author SHA1 Message Date
Keyur Hariya 3e7a909265 Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-19 13:20:14 -05:00
Cruz Monrreal df5119677a
Merge pull request #6607 from maximmbed/max32630-fix-spi
Improve SPI block write
2018-04-17 10:55:00 -05:00
Cruz Monrreal 63412bbe1d
Merge pull request #6605 from maximmbed/max32625-rework-ticker
Rework us_ticker and rtc_api/lp_ticker | Fix compiler warning for spi_api
2018-04-16 10:39:11 -05:00
Cruz Monrreal b630691fdf
Merge pull request #6606 from maximmbed/max32630-fix-i2c
Fix I2C master
2018-04-16 10:38:10 -05:00
Keyur Hariya b08c752fcd Fix indentation 2018-04-13 15:20:00 -05:00
Keyur Hariya 16d38895d3 Improve SPI block write
Replace looping construct with actual block writes.
Transaction in spi_master_block_write funtion is protected by critical
section to ensure it is completed without interruption. A hardware
limitation may cause data corruption if the TX fifo is allowed to run
empty.
2018-04-13 15:14:10 -05:00
Keyur Hariya b594ec20b8 Fix compiler warning for spi_api
Add mbed_critical include file to disable compiler warning messages.
2018-04-12 12:52:55 -05:00
Keyur Hariya 098c2cf756 Rework us_ticker and rtc_api/lp_ticker
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
2018-04-12 12:52:05 -05:00
Keyur Hariya 278707518c Revert "Rework us_ticker and rtc_api/lp_ticker | Fix compiler warnings for spi_api"
This reverts commit 840246a4d5.
2018-04-12 12:51:05 -05:00
Keyur Hariya 534f570b0c Rework us_ticker and rtc_api/lp_ticker
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
2018-04-11 16:16:09 -05:00
Keyur Hariya e802b255be Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-04-11 15:07:52 -05:00
Keyur Hariya 840246a4d5 Rework us_ticker and rtc_api/lp_ticker | Fix compiler warnings for spi_api
Simplify tickers to stop emulating 1us ticks by using native timer resolutions.
Implement ticker get info functions.
Separate rtc and lp ticker init status by implementing separate functions.
Add mbed_critical include file to disable compiler warning messages.
2018-04-11 15:02:11 -05:00
Keyur Hariya 2bb78d433f Fix assembly file extension 2018-04-04 10:32:46 -05:00
Keyur Hariya da96c56d90 [MAX32620C] Add new target 2018-03-28 16:39:09 -05:00
Cruz Monrreal 2e69ddd989
Merge pull request #6202 from maximmbed/fix-max32625mbed
Fix max32625mbed
2018-03-06 20:41:10 -06:00
Keyur Hariya 390ba4070c Replace enable/disable irq with critical section enter/exit 2018-02-26 12:35:07 -06:00
Keyur Hariya e6d901a852 Remove automatic I2C stop after each read
Automatic stop prevents sending repeated start.
2018-02-23 16:36:30 -06:00
Keyur Hariya dcf3b904d1 Enable ADC scaling and enable internal channels
Increases input range by 2x(now, 0-2.4v)
2018-02-23 16:36:30 -06:00
Keyur Hariya 992c889b33 Improve us ticker performance
Improves accuracy during heavy work load.
2018-02-23 16:32:30 -06:00
Keyur Hariya 80b0ae0d9e Improve SPI block write
Replace looping construct with actual block writes.
2018-02-23 16:32:12 -06:00
Keyur Hariya 8d778d5d8b Fix missing serial object for interrupts
Save serial objects when setting interrupt requests.
Improve uart interrupt handler.
2018-02-23 16:25:20 -06:00
Martin Kojtal 2661f6fe40 us ticker: fix fire interrupt handling
Few targets need more than just pending IRQ set. They include some flags to be
set that are checked in IRQ handler. This is the case for targets in this
commit.
2018-02-23 09:13:40 +01:00
Bartek Szatkowski c5a5438256 Update params in calls to LD/STREXW to be uint32_t 2017-11-10 09:53:42 +00:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Jimmy Brisson 66c3385727 Merge pull request #4398 from maximmbed/max326xx_ble_update
MAX326xx: BLE updates, fixed sleep, open-drain LEDs
2017-07-31 15:23:47 +00: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
Jimmy Brisson 742d98a9ed Merge pull request #4696 from pan-/max32630_fix_uart
Max32630 UART: Fix IRQ dispatching and CTS/RTS line configuration
2017-07-24 10:46:36 -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
Jesse Marroquin 3a4138369d Update BLE, fix sleep and open-drain LEDs in MAX326xx
MAX32630FTHR gets BLE, uses timer peripheral 5 for HCI timing
libexactLE update for 610,620
Fixup hal_sleep and hal_deepsleep for 620
LEDn outputs now forced to open-drain
2017-07-14 17:36:56 -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
Vincent Coubard bf419ca1b3 Max32630 UART: Fix P5_5 mapping. 2017-07-11 17:53:58 +01:00
Vincent Coubard 004d01d1b5 MAX32630: Apply correct configuration for CTS/RTS lines. 2017-07-03 17:02:43 +01:00
Vincent Coubard 5157c7b622 MAX32630: clear uart interrupt flag prior to handler call. 2017-07-03 16:39:29 +01:00
Vincent Coubard 253de5286d MAX32630: Map UART IRQ to serial object.
Before this change none of the IRQ set would be dispatch to the actual serial object.
2017-07-03 16:35:19 +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
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
Martin Kojtal d4bab30923 MAX32630FTHR: Fix NVIC_SetVector type in HAL
Change the irq_handler parameter of NVIC_SetVector from a function
pointer to a uin32_t so it matches the cmsis specification. This
prevents the following problem from occurring in RTX5 when building
for IAR:
The error: Error[Pe167]: argument of type "void (*)(void)" is incompatible
with parameter of type "uint32_t".
2017-05-11 18:09:58 -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
Kevin Gilbert 77cc87b050 Adding consistent button pin mappings 2017-04-27 18:42:47 -05:00
Bartek Szatkowski 4cd6068b73 MAX32630: Fix sleep definitions 2017-04-10 11:40:04 +01:00
0xc0170 801708b594 Maxim 3630: define LED4 same as LED1 2017-01-27 11:10:53 +02:00
Martin Kojtal 15cd3da4ba Merge pull request #3640 from maximmbed/max32630
MAX32630FTHR: Adding new platform
2017-01-27 11:01:03 +02:00
Jesse Marroquin dddcf76b3e [MAX32630FTHR] Adding new platform 2017-01-24 15:48:19 -06:00
Bartek Szatkowski 6a045a49a9 Platform: Add sleep/deepsleep user facing functions
Add sleep/deepsleep functions to platform layer which are replacing HAL
functions with the same name, rename existing symbols in HAL layer
to hal_sleep/hal_deepsleep. This way sleep functions
are always available, even if target doesn't implement them, which makes
the code using sleep clearer. It also enables us to make decision on in
which builds (debug/release) the sleep will be enabled.
2017-01-19 09:39:29 +00:00
Kevin Gillespie a0243cd852 [MAX32620] Fixing serial readable function. 2016-12-07 10:23:26 -06:00
Brian Daniels f6e79cb111 Fixing invalid comment notation in assembly file 2016-11-09 12:09:09 -06:00