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
Make rtc_isenabled() to return 1 if the RTC is initialized and the time has been set; 0 otherwise.
Disable clock gate on exit from this function if RTC was initialized.
Keep the RTC code if either DEVICE_RTC or DEVICE_LOWPOWERTIMER is
defined on the devices which use the RTC for both the rtc api and the
low power timer api. This allows DEVICE_LOWPOWERTIMER to be enabled while
DEVICE_RTC is turned off.
1. Enable LPTICKER for K22, K24, K64, K66, K82, KL82F, KW24D
2. Change the implementation to only use the LPTMR which reduces
the amount of interrupts generated which is required for tickless
operation
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Low power ticker time counter is created based on RTC which is driven by 32KHz clock. Additional low power timer is used to generate interrupts.
We need to adapt driver to operate on ticks instead of us.
Perform the following updates:
- provide lp ticker configuration: 32KHz/32 bit counter.
- lp_ticker_init() routine disables lp ticker interrupts .
- adapt the driver functions to operate on ticks instead us.
- adapt comments.
- add us_ticker_free() routine.
Certain instances of the TPM are missing some registers, updated
TPM driver handles this variation. This issue was discovered when
running the PWMOUT tests using the ci-test-shield
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Fix the check to look for if MCG has a PLL
2. Do setup before and after deep sleep mode execution
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Start function: Issue repeat start when bus is busy
2. Byte write function: Do not call SDK function as this does
not work for some of the Kinetis device
3. Byte read function: Do not call SDK function as this would
issue a START and STOP signal which is not required for
I2C byte functions
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
I2C3 clock define was missing. I2C3 is connected to the Arduino
connector which is used by the ci-test shield
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Delta calculation from lp_ticker_set_interrupt() function:
delta_us = timestamp > now_us ? timestamp - now_us : (uint32_t)((uint64_t)timestamp + 0xFFFFFFFF - now_us);
Lets assume that timestam == now_us.
Expected delta value should be 0 and in this current version is 0xFFFFFFFF.
The following condition:
timestamp > now_us
should have the following form:
timestamp >= now_us
Additionally modified us ticker driver to provide the same logic.