Skip to content

RTL8195AM - Remove redundant header file inclusion #5371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c5cc9ec
NUCLEO_F207ZG: Fix issue with tests-api-analogout and GCC_ARM
bcostm Sep 25, 2017
868143e
Coding style and add State field init
bcostm Oct 5, 2017
02598d5
Typo correction
bcostm Oct 10, 2017
e57d184
rtl8195am - cleanup IAR icf file
tung7970 Oct 4, 2017
f5b668a
rtl8195am - fix IAR zero padding issue
tung7970 Oct 5, 2017
a35c76d
rtl8195am - remove redundant file
tung7970 Oct 6, 2017
14343c4
STM32: TRNG: remove call to deprecated HAL_RNG_GetRandomNumber
LMESTM Sep 21, 2017
849749f
STM32: RNG: Ensure that no more than 1 instance is used
LMESTM Sep 21, 2017
4673fb6
Check for uARM support when compiling with uARM
theotherjimmy Oct 13, 2017
168bdc8
MCUXpresso: Fix issue of ticker interrupt incorrectly firing
mmahadevan108 Oct 13, 2017
bc5c945
MCUXpresso: Fix LPTimer issue when using multiple timeout objects
mmahadevan108 Oct 13, 2017
3848862
Activate FLASH hal support on 2 STM32 boards
LMESTM Oct 20, 2017
3a2f58e
Test the supported check in the ARM toolchains
theotherjimmy Oct 20, 2017
b0fc103
Check for core support in ARM toolchain
theotherjimmy Oct 20, 2017
c644cfe
Merge pull request #5354 from LMESTM/flash_activate
0xc0170 Oct 23, 2017
656aa82
Merge pull request #5179 from LMESTM/trng_deprecated_call
theotherjimmy Oct 23, 2017
3354327
Merge pull request #5188 from bcostm/fix_dac_f207zg
theotherjimmy Oct 23, 2017
d2b7620
Merge pull request #5260 from tung7970/fix-iar
theotherjimmy Oct 23, 2017
ab8a8de
Merge pull request #5317 from theotherjimmy/fix-arm-supported-check
theotherjimmy Oct 23, 2017
2a80231
Merge pull request #5340 from 0xc0170/nxp_fix_us_timer_replacement
theotherjimmy Oct 23, 2017
1566395
Merge pull request #5347 from 0xc0170/nxp_fix_lptimer
theotherjimmy Oct 23, 2017
6e5a3cb
rtl8195am - remove redundant header file inclusion
tung7970 Oct 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT3_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT3_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT3_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT3_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT3_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT3_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@

static int us_ticker_inited = 0;

static void lptmr_isr(void)
{
LPTMR_ClearStatusFlags(LPTMR0, kLPTMR_TimerCompareFlag);
LPTMR_StopTimer(LPTMR0);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand Down Expand Up @@ -56,7 +64,7 @@ void us_ticker_init(void)
busClock = CLOCK_GetFreq(kCLOCK_McgInternalRefClk);
LPTMR_SetTimerPeriod(LPTMR0, busClock / 1000000 - 1);
/* Set interrupt handler */
NVIC_SetVector(LPTMR0_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(LPTMR0_IRQn, (uint32_t)lptmr_isr);
NVIC_EnableIRQ(LPTMR0_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@

static int us_ticker_inited = 0;

static void lptmr_isr(void)
{
LPTMR_ClearStatusFlags(LPTMR0, kLPTMR_TimerCompareFlag);
LPTMR_StopTimer(LPTMR0);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand Down Expand Up @@ -56,7 +64,7 @@ void us_ticker_init(void)
busClock = CLOCK_GetFreq(kCLOCK_McgInternalRefClk);
LPTMR_SetTimerPeriod(LPTMR0, busClock / 1000000 - 1);
/* Set interrupt handler */
NVIC_SetVector(LPTMR0_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(LPTMR0_IRQn, (uint32_t)lptmr_isr);
NVIC_EnableIRQ(LPTMR0_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT0_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT0_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT0_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT3_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT3_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT3_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@

static int us_ticker_inited = 0;

void us_ticker_init(void) {
static void lptmr_isr(void)
{
LPTMR_ClearStatusFlags(LPTMR0, kLPTMR_TimerCompareFlag);
LPTMR_StopTimer(LPTMR0);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
return;
}
Expand Down Expand Up @@ -55,28 +64,32 @@ void us_ticker_init(void) {
busClock = CLOCK_GetFreq(kCLOCK_McgInternalRefClk);
LPTMR_SetTimerPeriod(LPTMR0, busClock / 1000000 - 1);
/* Set interrupt handler */
NVIC_SetVector(LPTMR0_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(LPTMR0_IRQn, (uint32_t)lptmr_isr);
NVIC_EnableIRQ(LPTMR0_IRQn);
}


uint32_t us_ticker_read() {
uint32_t us_ticker_read()
{
if (!us_ticker_inited) {
us_ticker_init();
}

return ~(PIT_GetCurrentTimerCount(PIT, kPIT_Chnl_1));
}

void us_ticker_disable_interrupt(void) {
void us_ticker_disable_interrupt(void)
{
LPTMR_DisableInterrupts(LPTMR0, kLPTMR_TimerInterruptEnable);
}

void us_ticker_clear_interrupt(void) {
void us_ticker_clear_interrupt(void)
{
LPTMR_ClearStatusFlags(LPTMR0, kLPTMR_TimerCompareFlag);
}

void us_ticker_set_interrupt(timestamp_t timestamp) {
void us_ticker_set_interrupt(timestamp_t timestamp)
{
uint32_t delta = timestamp - us_ticker_read();
LPTMR_StopTimer(LPTMR0);
LPTMR_SetTimerPeriod(LPTMR0, (uint32_t)delta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT3_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT3_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT3_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT3_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT3_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT3_IRQn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@

static int us_ticker_inited = 0;

static void pit_isr(void)
{
PIT_ClearStatusFlags(PIT, kPIT_Chnl_3, PIT_TFLG_TIF_MASK);
PIT_ClearStatusFlags(PIT, kPIT_Chnl_2, PIT_TFLG_TIF_MASK);
PIT_StopTimer(PIT, kPIT_Chnl_2);
PIT_StopTimer(PIT, kPIT_Chnl_3);

us_ticker_irq_handler();
}

void us_ticker_init(void)
{
if (us_ticker_inited) {
Expand All @@ -47,7 +57,7 @@ void us_ticker_init(void)
//Ticker
PIT_SetTimerPeriod(PIT, kPIT_Chnl_2, busClock / 1000000 - 1);
PIT_SetTimerChainMode(PIT, kPIT_Chnl_3, true);
NVIC_SetVector(PIT3_IRQn, (uint32_t)us_ticker_irq_handler);
NVIC_SetVector(PIT3_IRQn, (uint32_t)pit_isr);
NVIC_EnableIRQ(PIT3_IRQn);
}

Expand Down
10 changes: 10 additions & 0 deletions targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api/lp_ticker.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ void lp_ticker_set_interrupt(timestamp_t timestamp)

/* Checking if LPTRM can handle this sleep */
delta_ticks = USEC_TO_COUNT(delta_us, CLOCK_GetFreq(kCLOCK_Er32kClk));
if (delta_ticks == 0) {
/* The requested delay is less than the minimum resolution of this counter */
delta_ticks = 1;
}

if (delta_ticks > MAX_LPTMR_SLEEP) {
/* Using RTC if wait time is over 16b (2s @32kHz) */
uint32_t delta_sec;
Expand All @@ -154,6 +159,11 @@ void lp_ticker_set_interrupt(timestamp_t timestamp)
/* Set aditional, subsecond, sleep time */
if (delta_us) {
lptmr_schedule = USEC_TO_COUNT(delta_us, CLOCK_GetFreq(kCLOCK_Er32kClk));
if (lptmr_schedule == 0) {
/* The requested delay is less than the minimum resolution of this counter */
lptmr_schedule = 1;
}

}
} else {
/* Below RTC resolution using LPTMR */
Expand Down
Binary file not shown.
Loading