KEAZ128MLH4 CAN communication using Single Wire CAN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KEAZ128MLH4 CAN communication using Single Wire CAN

1,260 Views
tonymor90
Contributor I

Hello,

I am developing an application that requires a Single wire CAN application, I have my CAN analyzer connected to my single wire transceiver, I am trying to use the KEA128_CAN_TEST that I saw on other threads but it gets stuck in the While loop, I've seen that other developers have had the same issue that it does not hit the Interrupt, any suggestions on what I can do?

Hugo

Labels (1)
0 Kudos
5 Replies

1,005 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Hugo,

Have you modify the code of KEA128_CAN_TEST?

Please try to use the loop mode first.

I have not used Single Wire CAN before, not sure if you have connected it correctly.

Please show us the circuit.

Loop mode.jpg

 

Best Regards,

Robin

 

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

0 Kudos

1,005 Views
tonymor90
Contributor I

Hello Robin,

Yes, I already tried the loop mode and it works fine, I was reading that the PE is missing the TxMessageBufferInterrupt but I added that portion of the code and now it gets stuck at the next line.

TxIssue.PNG

I cannot do anything after I hit "PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_CAN1_ID, DeviceDataPrv);

CANTransceiver.PNG

Here's the schematic of my single can Transceiver and the CAN lines of KEAZ

0 Kudos

1,005 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please select CPU type to LQFP 64-pin and then Generate Processor Expter Code again.

select CPU type.jpg

The Bit rate of that example is 100.84kbit/s. So you may need to select High-Speed mode for TH8056: Mode 0 = 1, Mode 1 = 0

3.2 Mode 0 and Mode 1 pins.jpg
And have you try to use the Normal speed mode?
I have not used TH8056 before, so not sure if it was caused by it.

That example work well on TRK-KEA128 board with it's onboard PC33901 CAN Transceiver.

Best Regards,

Robin

 

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

0 Kudos

1,005 Views
tonymor90
Contributor I

Hello novice

I had those changes in my project using the 64-pin package, and also I changed the Bit rate to 33.33kbit/s because that is the one I have to use for my application, so I am using Normal mode on the TH8056 that means Logic "1" on both pins.

So have tried a lot of things to make this work and still gets stuck where I told you before, I am going to attach my project so you can take a look.

I do not have the TRK_KEA128 board, right now I am developing with the FRDM board and my project PCB and the same issue the project does not work at all.

for some reason I cannot attach my project but I will add some screenshots of my changes. 

CANbitrate.PNG

EnableNormalModeTH8056.PNG

Like I said before I still have the issue that it gets stuck in PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_CAN1_ID, DeviceDataPrv);"

TxIssue.PNG

0 Kudos

1,005 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

I have modify the example in KEA128_CAN_TEST and attached here for you to refer.

I did not add MSCAN_PDD_EnableTxMessageBufferInterruptMask in CAN1_Init function.

My TRK-KEA128 board can send data with 33.333 kbit/s Bit rate now.

33.333 kbits.jpg

Best Regards,

Robin

0 Kudos