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:
解決済! 解決策の投稿を見る。
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.
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.
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:
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!
-----------------------------------------------------------------------------------------------------------------------