KW36 + bluetooth_w_urt_freertos (SDK) + CAN (example_code) => Integration failure

cancel
Showing results for 
Search instead for 
Did you mean: 

KW36 + bluetooth_w_urt_freertos (SDK) + CAN (example_code) => Integration failure

157 Views
Contributor III

Hello All,

I try to integrate the CAN-interrupt-tx example code (frdmkw36_driver_examples_flexcan_interrupt_transfer) into my project, and I use the wireless-UART example code (frdmkw36_wireless_examples_bluetooth_w_uart_freertos) as my code-based, Unfortunately, It seems the CAN-BUS can't work and no any CAN interrupt can be generated. I have verified and confirmed that my CAN0_init() function can work fine, because I have added it to the CAN-interrupt-tx example code and it seems to work well, Now I have some questions, Is it impossible to execute interrupt ISR in NXP's FreeRots, or I missed some configuration for CAN's ISR, Can anyone share some useful experience to me,

Thank you very much.

Labels (2)
4 Replies

46 Views
NXP TechSupport
NXP TechSupport

Hello,

You can check as well this application note with the implementation. I would recommend you to start with the CAN communication first and only adding the driver to receive/send a message through CAN and after that if you are interested adding the rest of the functionality mentioned there (security+LIN) .

regards,

Estephania

46 Views
Contributor III

HI Estephania,

I have tried adding CAN_init() to (frdmkw36_wireless_examples_bluetooth_w_uart_freertos) according to the instructions in the Application Note, but it seems that CAN-BUS still does not work. In order to confirm whether the CAN-Driver can run in the FreeRtos project, I tried to dump the register value after executing "FLEXCAN_WriteTxMb()" and compare it with (frdmkw36_driver_examples_flexcan_interrupt_transfer) , As shown in the figure below, we can see that the register value of the yellow item is wrong . Can anyone provide me with some suggestions, Many thanks.

Source Code :

pastedImage_3.png

Wrong memory content :

pastedImage_2.png

Correct memory content : 

pastedImage_7.png

0 Kudos

46 Views
NXP TechSupport
NXP TechSupport

Hello,

Sometimes the file changes so by any chance could you please first make a back up of the different Heap files? Once you have a back up of them, could you please try removing all of them but the heap4 ? You need to keep the heap4.

Also, you have an internal message.

Regards ,

Estephania

0 Kudos

46 Views
Contributor III

HI Estephania,

Thank you for sharing your experience. I have referenced the Application Note for creating the CAN driver, and used "SDK Component Management window" to add the CAN Driver to my project, but it seems that there are some compiler errors. I remove some files as follows to fix the compiler's errors. Is it correct ?  Thank you very much.

pastedImage_1.png

0 Kudos