SJA1000t

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

SJA1000t

1,361件の閲覧回数
San_96
Contributor I

Hi.

I am unable to access the module SJA1000t. I connected mode pin to Vcc.

I am using MPC5777C EBI lines D0 to D7 to AD0 to AD7 via a 3.3v to 5v bi-directional latch level shifter.

I'm using two address like ALE_ADR, DATA_ADR

when a can register ex. status reg 0x02 is to be read, i write like below.

ebican_reg[ALE_ADR] = 0x02;

By using a CPLD, when ALE_ADR is written, i generate ALE signal to the module.

Then I read

temp = ebican_reg[DATA_ADR];

When DATA_ADR is used, i generate CS#, RD# and WR# signals based on CS#, OE# and R/W# signals of EBI lines respectively.

But I'm unable to access the module. What am I missing here ?

Please help.

0 件の賞賛
返信
3 返答(返信)

1,340件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

It seems it is continuation of following thread:

https://community.nxp.com/t5/MPC5xxx/SJA1000T/td-p/1396179

To be honest, it does not make too much sense to me.

Could you show me scheme of connection?

I somehow don't understand the part with ALE generating. ALE is signal tied out of MCU directly and it is just generated automatically during address phase of multiplexed access.

You just needed to specify address of slave device's register and read/write from/to that address.

0 件の賞賛
返信

1,309件の閲覧回数
San_96
Contributor I

Hi Sir,

  There was a mistake while I provide ALE signal to the Module. Now I am able to access the registers and read and write them. But I still have problem of transmitting the data. I have configured SJA1000T as Transmitter and Flex can of MPC5777C as a receiver. I am working on transmission since three days. But things have not moved any further. Please verify hardware connections in attached picture and below software configuration.

Software is as below.

Init function :

Power on Reset check.

Clock div register : Set Pelican mode and CBP

BTR0, BTR 1 as configured for 1Mbps

AMRx = 0xFF

ACRx = 0x00

OCR = 0x1A (Normal mode; Push-Pull for TX0) (TX1 is left unconnected in circuit)

Interrupts disabled

Bring to Normal mode by Making MOD.RM = 0

TX function :

TX frame info : (16 address) = 10001000  (Extended Data frame, length

From address 17 to 20 : Identifier

From 21 to 28 : Data bytes

Check TBS and TCS in status register. If buffer is free, providing TR in CMD register.

Provided some no_ops

Then checking status register Transmit status in do while loop: It says the data is transmitted. But Flex Can didn't receive any data at all.

I tried connecting one SJA as TX and one SJA as RX. But some invalid data is received. Even I changed my Identifier and Data bytes, I'm receiving the same invalid data.

 

Secondly, I tried to receive data from Flex Can, SJA module is receiving the data. But when reading receive buffers address 16 to 29, every byte is read as 0x0d. Surely this is not valid. So, I read FIFO registers from 32 to 100. From 32 to 44, Same 0x0d is read. From 45 to 57, the id and data i sent is stored. So, receiving is also functioning bad.

0 件の賞賛
返信

1,272件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Good. So EBI accesses are correct now.

I believe my colleague is able to help you with CAN issue over case you have created.

0 件の賞賛
返信