Timer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Timer

1,459件の閲覧回数
syedhashmiraza
Contributor III

hello iam using MCXA153 in this there is no mrt what is the repalcement of mrt ?this is my code and i want to build this in MXCA153 what is the replacemnet of MRT?

void Timing_StartCardClk(uint32_t cardClk) {
startTimer(CARD_CLK_DIV * cardClk);
}
 
static inline void startTimer(uint32_t value) {
MRT_StartTimer(MRT0, 0, MRT_CHANNEL_INTVAL_LOAD_MASK | value);
 
triggered = false;
}
 
void Timing_Init() {
// Setup MRT in One-Shot mode
RESET_PeripheralReset(kMRT_RST_SHIFT_RSTn);
const mrt_config_t conf = {false};
MRT_Init(MRT0, &conf);
MRT_SetupChannelMode(MRT0, 0, kMRT_OneShotMode);
 
MRT_EnableInterrupts(MRT0, 0, kMRT_TimerInterruptEnable);
NVIC_EnableIRQ(MRT0_IRQn);
}
 
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,434件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @syedhashmiraza 

The MCXA153 does not include an MRT peripheral. To achieve similar functionality, you can use the CTIMER available on the MCXA153.

CTIMER can operate in various modes, including timer mode, which is suitable for generating delays or triggering events like the MRT.

You can refer to the MCXA153SDK ctimer example.

Harry_Zhang_0-1734401158930.png

BR

Harry

0 件の賞賛
返信

1,341件の閲覧回数
syedhashmiraza
Contributor III

"Hello, can I use LPTMR as a replacement for MRT?"

0 件の賞賛
返信

1,325件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @syedhashmiraza 

If you want to use LPTMR,

You can refer to the SDK LPTMR examples.

Harry_Zhang_0-1735783088744.pngHarry_Zhang_1-1735783175769.png

BR

Harry

0 件の賞賛
返信

1,422件の閲覧回数
syedhashmiraza
Contributor III

"Hello, can I use OSTIMER as a replacement for MRT?"

タグ(1)
0 件の賞賛
返信

1,410件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @syedhashmiraza 

Yes, you can.

BR

Harry

0 件の賞賛
返信