SENT ON MPC5746R Consult

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SENT ON MPC5746R Consult

Jump to solution
1,867 Views
fanshichencao
Contributor I

Hello,

I want to use SENT Module on MPC5746R, I have some confusion!

About SENT SRX Module, I can get message through polling mode.

Now I want to get data by software vector mode interrupt.I have finished configuring other related configurations.

In the initlization,I set the interrupt enable.

SRX_0.FRDY_IE.B.FRDY_IE = 63; //Control bit

And in the main function,I configure software INTC

INTC_0.PSR[564].B.PRIN = 10;
IntcIsrVectorTable[564] = (uint32)&ISR_sent0_Ch0;

But my program can't access the interrupt function【ISR_sent0_Ch0】,Can you help me with the analysis or guidance?

0 Kudos
1 Solution
1,721 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Regarding Step 1 - yes, that's the right register. Is the LSB bit (RDY[0]) set?

Regards,

Lukas

View solution in original post

0 Kudos
8 Replies
1,336 Views
Silence_1
Contributor I

Hello, do you have a way to initialize the SENT module now? My initialization has been unsuccessful and I cannot enter the interrupt

0 Kudos
1,721 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

following conditions must be fulfilled to trigger an interrupt:

1. Interrupt flag must be set (for example, you need to receive a message)

2. Interrupt must be enabled by enable bit in a module

3. Priority must be configured in INTC_PSR register (must be different from 0)

4. MSR[EE] bit must be set

5. Priority of interrupt must be higher than current priority

I can see in your description that you confirmed items 2 and 3. Could you double check also the others?

Regards,

Lukas

0 Kudos
1,334 Views
Silence_1
Contributor I

Hello, how to initialize the SENT  module on 5741p chip? My initialization has been unsuccessful and there is no way to enter the interrupt service function;

0 Kudos
1,697 Views
zhangguowang
Contributor I

hello, I want to use SENT in MPC5744P, the reference manual has the following description SENT_global.JPG

However, I think time below 3us can be obtained by set the SRX_CHn_CLK_CTRL register.

SENT_channel.JPG

For example,  the High Frequency Receiver clock is 100MHz(0.01us), and the SRX_CHn_CLK_CTRL register is set as 1.5/0.01=150

So what will happen in this case?

The unit tick time of my signal source is 1.5us.

 

0 Kudos
1,721 Views
fanshichencao
Contributor I

Hello

First of all, thank you very much for your guidance.Folling is my set steps:

1.Step1:I didn't find the register about the  Interrupt flag.Is this the register as shown below

pastedImage_1.png

2.Step2 set:SRX_0.FRDY_IE.B.FRDY_IE = 63; //Control bit

3.Step3 set:INTC_0.PSR[564].B.PRIN = 10;
4. Step4 set:__asm__(" wrteei 1");

5.The current priority set is  INTC.CPR[coreId].R = 0U.And  the SRX interrupt priority set is INTC_0.PSR[564].B.PRIN = 10;

Thank you very much for helping me analyze the problem and look forward to your guidance

0 Kudos
1,722 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Regarding Step 1 - yes, that's the right register. Is the LSB bit (RDY[0]) set?

Regards,

Lukas

0 Kudos
1,721 Views
fanshichencao
Contributor I

Hello Lukas,

First of all,Thank you very much for your patient guidance!

I have another question.For Enhanced Serial Message,how to match message ID and it's data.Is the ID and data obtained from register(SRX_CHn_SMSG_BIT3 ,SRX_CHn_SMSG_BIT2) at the same time matched with each other?

0 Kudos
1,721 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

you are supposed to read all three register before manual flag clearing. Or, when using fast flag clearing mechanism, the flag is cleared automatically when you read all three registers.

pastedImage_1.png

Read also section 53.5.4 Overflow behaivor.

In summary - the registers contain coherent data.

Regards,

Lukas

0 Kudos