Hi, jeremyzhou
Thank you for your answer, but it doesn't relate to my question.
The enumeration of the channel names that you put here are already included in the driver header "fsl_mrt.h" and already linked to the project.
The problem is not with the names of channels. They are already defined.
The problem is that the channels other than "kMRT_Channel_0" cannot be handled:
there is only interrupt handle for Channel_0 in file "startup_LPC54608.c" in the SDK:
WEAK void MRT0_IRQHandler(void)
{ MRT0_DriverIRQHandler();
}
Also I do not see any channels other than Channel_0 in "Peripherals View" (please see the attached pictures in the first post).
P.S.
In the MRT example "lpcxpresso54608_driver_examples_mrt_mrt_example" from SDK, when I try to use the MRT Channel 1:
/*******************************************************************************
* Code
******************************************************************************/
void MRT0_IRQHandler(void)
{
/* Clear interrupt flag.*/
MRT_ClearStatusFlags(MRT0, kMRT_Channel_0, kMRT_TimerInterruptFlag);
mrtIsrFlag0 = true;
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
void MRT1_IRQHandler(void)
{
/* Clear interrupt flag.*/
MRT_ClearStatusFlags(MRT1, kMRT_Channel_1, kMRT_TimerInterruptFlag);
mrtIsrFlag1 = true;
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
I get the error:
"MRT1 undeclared"
Because only MRT0 has definition in the equate file “LPC54608.h”:
/* MRT - Peripheral instance base addresses */
/** Peripheral MRT0 base address */
#define MRT0_BASE (0x4000D000u)
/** Peripheral MRT0 base pointer */
#define MRT0 ((MRT_Type *)MRT0_BASE)
/** Array initializer of MRT peripheral base addresses */
#define MRT_BASE_ADDRS { MRT0_BASE }
/** Array initializer of MRT peripheral base pointers */
#define MRT_BASE_PTRS { MRT0 }
/** Interrupt vectors for the MRT peripheral type */
#define MRT_IRQS { MRT0_IRQn }
Should I edit “LPC54608.h”?