FlexBus connected to SJA1000 CAN Controller

cancel
Showing results for 
Search instead for 
Did you mean: 

FlexBus connected to SJA1000 CAN Controller

Jump to solution
445 Views
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

Labels (1)
0 Kudos
1 Solution
154 Views
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

View solution in original post

0 Kudos
2 Replies
155 Views
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 Kudos
154 Views
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!
-----------------------------------------------------------------------------------------------------------------------