FlexBus connected to SJA1000 CAN Controller

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

FlexBus connected to SJA1000 CAN Controller

跳至解决方案
899 次查看
jschepler
Contributor III

Hello,

The application for my microcontroller is to interface to 3 seperate CAN buses.  I am using the TWR-K64F Tower Kit.  For one of the CAN buses I used the integrated FlexCAN built into the microprocessor.  For the next two buses, I will need to communicate with a seperate CAN Controller.  The CAN Controller that I would like to use is an SJA1000.  There are two modes of operation for this controller, Intel or Motorola mode.  I will be operating the controller in Motorola mode because the R/WR signal is on one pin from the FlexBus.

This controller communicates on a parallel bus with 8 data/address pins multiplexed.  I would like to use the FlexBus to communicate with the controller.

However, the controller needs an E (Enable) signal that goes high just after the chip select asserts, and goes low just before the chip select goes back high.

I thought I would be able to use the Byte Enable signal from the microcontroller and just invert it for the Enable pin.

I connected my oscilloscope to the EBI_BE_32_24_B pin on the C side expansion port but it never changes state.

I can view the clock out signal and chip selects on the oscilloscopes and those are working properly, but the byte enable signal seems to not be working.

Am I connecting to the wrong pin?  Below is how I setup for using the BE_32_24_B pin:

flexbus_byte_enable.jpg

标签 (1)
0 项奖励
1 解答
608 次查看
jschepler
Contributor III

It looks like my code was correct.  Thank you Ma Hui for your response.  The reason I was not seeing anything on my scope was because the pin I was connected to on the secondary elevator isn't actually connected to the microcontroller.  Instead, the only place where PTC17 is connected is to pin 18 of Jumper 6.

flexbus_twr_secondary.jpg

在原帖中查看解决方案

0 项奖励
2 回复数
609 次查看
jschepler
Contributor III

It looks like my code was correct.  Thank you Ma Hui for your response.  The reason I was not seeing anything on my scope was because the pin I was connected to on the secondary elevator isn't actually connected to the microcontroller.  Instead, the only place where PTC17 is connected is to pin 18 of Jumper 6.

flexbus_twr_secondary.jpg

0 项奖励
608 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I think your code should be correct.

I also do a test with TWR-K60D100M board, which is using the same Flexbus module with K64 product, it shows the correct byte enable signal.

I just using the Kinetis 100MHz V2 sample code (KINETIS512_V2_SC) and just add the PTC17 setting to FB_BE31_24 function with below code:

PORTC_PCR17 = PORT_PCR_MUX(5);

Below is my scope copy for FB_BE31_24 signal vs. FB_CS0:

tek00000.png

Wish it helps.


Have a great day,
best regards,

Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------