CanTrcv TJA1145AF write ID and Mask not sucessful

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CanTrcv TJA1145AF write ID and Mask not sucessful

跳至解决方案
196 次查看
WangBk
Contributor III
When I was testing the CanTrcv program (Vector code CanTrcv_30_Tja1145),I found that the register values of ID(28H-2AH) and MASK(2CH-2EH) cannot be written, The read value of Lock control register (address 0Ah) is 0. When I try to power off and on the chip within 1s, the chip will detect PNCOK = 0. CanTrcv_30_Tja1145 will rewrite the ID(28H-2AH) and MASK(2CH-2EH) registers. However, when the program read back the test, it was found that the new value was not written in. What was read back was the previous value, not the value written this time.
0 项奖励
1 解答
149 次查看
WangBk
Contributor III

Affected by the registers(Lock control register (address 0Ah)), there is a problem with the above test, and the results are not read correctly

在原帖中查看解决方案

0 项奖励
3 回复数
194 次查看
WangBk
Contributor III

Supplementary data

REG:

TS: 22H

ECS: 60H

SES: 61H

TES: 63H

WES: 64H

 

CanTrcv_30_Tja1145_SpiOutBuffer is spi tx data

CanTrcv_30_Tja1145_SpiInBuffer is spi feedback data

 

CanTrcv_30_Tja1145_SpiOutBuffer is written to the following register:

26H     length 3bytes      data:0x03 0x00 0x00

29H     length 3bytes      data:0x00 0x15 0x00

2CH     length 3bytes      data:0x00 0xFC 0x1F

2FH     length 1bytes      data:0x08

企业微信截图_17118746172338.png

0 项奖励
180 次查看
WangBk
Contributor III

Timing reference attachment and the figure below:

WangBk_0-1711879659833.png

TJA1145AF.jpg is the picture of the chip. Does it support 32-byte writing(Above picture form)?

 

 

标记 (1)
0 项奖励
150 次查看
WangBk
Contributor III

Affected by the registers(Lock control register (address 0Ah)), there is a problem with the above test, and the results are not read correctly

0 项奖励