I am wondering if this driver will work without any editting for MQX for Kinetis devices? I am using a TWR K64F120M and know that the driver works for baremetal, but would like it to work with MQX, also.
My understanding is this driver is for RTOS and baremetal.
Thanks for your reply, Daniel.
I can successfully run the flexcan_uart_twrk64f120m demo, but when I copy that code to my project I get a strange error. In my project I have several tasks, and I use the same code from the demo for this CAN_TASK. In my project, as soon as the can message sends, and I know it sends because I have a CAN analyzer, I then get a mesage that reads "No source available for "0x410"". Or, It it will say, "No source availabe for "0x530"".
However, if I put a breakpoint in the fsl_flexcan_driver.c file, in the function FLEXCAN_DRV_SEND, at the line
if (result == kStatus_FLEXCAN_Success)
then my program will continue to work without errors.
If I take the breakpoint off, the "no source available" message appears and the device resets.
Any ideas on to the cause of this error?
Everyone, please be aware about the LWSEM_WAIT strange occurences. I have been troubleshooting this problem for several days, and I just discovered another user had a problem with LWSEM.
The thread I am refering to is here: _lwsem_post problem on 32Bit SPI slave ISR
It seems that I will have to re-write the flexcan driver and use a lwevent instead of a lwsem to solve the issue completely, I now just have a delay of 100ms before the LWSEM_WAIT.
So hey just wondering did you get problem fixed?
I have co-worker that got this demo working for TWR-K60D100M and another soon to be announced Kinetis device using latest KDS/KSDK.
Thanks. I am only working on baremetal now. I am not sure about a lof of process about FlexCan. I didnt find info from reference manual or i just missed it.
Basically, I try to make an application that can send/receive a CAN message. Currently, I dont have the other CAN for test, so I have to use loop back mode.
I configured Rx buffer, tx buffer. I didnt use interrupt. It doesn really send or receive. Do you know what I did wrong?
The KSDK_1.1.0 has both baremetal (HAL and Driver layers) and OS (MQX/FreeRTOS/Others) support.
If you want baremetal please look at the following project:
Currrently it is only setup for the K60 and K64 in KDS but it might give insight into help with your code base.
Documentation for that demo is in following PDF Chapter 7.
C:\Freescale\KSDK_1.1.0\doc\Kinetis SDK v.1.1 Demo Applications User's Guide.pdf
Thanks for replying. I ran the demo which is flexcan_uart. It worked.
Currently, my application is not using UART. Therefore, i removed all code related UART and after that
it cannot transmit message through CAN anymore. Do you think i miss something important as your experience?
Retrieving data ...