1

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

1

750 Views
kaimi
Contributor I

lin总线以 9600 波特率的速率 发送周期50ms. 同时用pmf的 outc 模式控制gdu 每87us(用定时器T0定时产生中断) 极性翻转一次,极性翻转是在 定时器T0定中断中完成并且lin发送50ms 定时也由定时器T0在中断中计数50ms发送lin.
现在出现的问题是当lin总线发出时影响gdu 输出波形,图形上看是使gdu的每87us 延时程lin的发送总周期 。直到lin 发送完成后也持续影响lin总周期的时间 。如何做到互不相应
void TI1_OnInterrupt(void)
{

EnterCritical();
PMFCFG2_MSK = 0X35;
_PMFOUTC_OUTCTL = 0X0A;
_PMFCFG1.Bits.BOTNEGA = ~_PMFCFG1.Bits.BOTNEGA;
_PMFCFG1.Bits.BOTNEGB = ~_PMFCFG1.Bits.BOTNEGB;
ExitCritical() ;

if (bia == 500)
{bia =0;
dataa[0] = 0x1a;
dataa[1] = 0x2a;
dataa[2] = 0x3a;
dataa[3] = 0x4a;
dataa[4] = 0x5a;
dataa[5] = 0x6a;
dataa[6] = 0x1a;
dataa[7] = 0x2a;
EnterCritical();
LIN_send_data(0x33, 8, &dataa[7]);
ExitCritical() ;
}

}
Contact Name

0 Kudos
2 Replies

665 Views
joany38
Contributor I

I have a little project that demonstrates how to make a segment in a linker file as well as how to add some data to the segment.

cookie clicker

0 Kudos

702 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @kaimi,

Does it mean that becasue of the LIN operation, the GDU polarity reverse is delayed?
If so, it looks like the issue is in the CPU load when servising the LIN communication.
How long it takes to complete the LIN_send_data(0x33, 8, &dataa[7])?
It looks like this is a blocking function.

 

BR, Daniel

0 Kudos