A problem with LIN on HC908QL4

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

A problem with LIN on HC908QL4

1,375件の閲覧回数
Yac
Contributor I
Hello everybody,

I'd like to establish the LIN communication on HC908QL4. I used the LIN908QL4 Driver software provided by Motorola, that I've downloaded from this Freescale site.
There were 2 messages to implement - one from Master to Slave and one from Slave to Master.
When the transmission is disabled then I can receive succesfuly the message sent from Master to HC908QL4, but as soon as I enable the transmission (uncomment the appropriate code in SLIC interrupt routine) I cannot transmit any message from Slave to Master and also cannot receive any more.

In SLIC interrupt routine there is a case 0x2C - "ID received correctly". Here I use my code to transmit the data to Master:
case 0x2C:
if(SLCID==0x61) // my Slave-Message ID
{
SLCD0 = 5; // some test data (4 bytes)
SLCD1 = 129;
SLCD2 = 1;
SLCD3 = 2;
SLCDLC = 0xC3; // Write DLC code to start TX - Checksum Standard, 4 bytes to transmit
}

After this is done, the SLIC interrupts stop to work. As far as I know the transmission line goes simply to low (dominant) state and that's all. Even the Master messages don't go.
Theoretically the next thing that should happen should be the interrupt with case 0x08: TX buffer empty, checksum sent or case 0x0C: TX buffer empty, but it happens never.

Is this something wrong with hardware or I make simply a software error (i.e. don't enable something?).

Best regards,
Yac.
ラベル(1)
0 件の賞賛
返信
1 返信

655件の閲覧回数
btbhass
Contributor II
Try reseting the interrupt flag immediately after the interrupt. case 0x2CU: SLCS_SLCF = 1U; /* ID received correctly */ if(SLCID==0x61) // my Slave-Message ID { etc.
0 件の賞賛
返信