6 years, 9 months ago.

FRDM K64F - Can't build the majority mbed APIs?

Hi all,

I am currently struggling to run the example CAN API code for the FRDM K64F board? *example code from here https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/interfaces/digital/CAN/

I have also tried the other examples including Ethernet to no avail etc. The build error I consistently get is that the functions and types (from the API) aren't recognised.

/media/uploads/ConnorMcShane/screen_shot_2017-07-12_at_3.41.37_pm.png

It works for other boards such as the LPC1768. It must be that the new mbed OS API's isn't fully compatible with the FRDM K64F board but I was just looking for confirmation on this.

Thanks for your time

2 Answers

6 years, 9 months ago.

This MCU has only one CAN interface, pins are PTA12 and PTA13. Check here: http://cache.freescale.com/files/microcontrollers/doc/data_sheet/K64P144M120SF5.pdf

But there is no CAN support for this target in mbed. Check pin names here, no CAN pins: https://github.com/ARMmbed/mbed-os/blob/mbed-os-5.5/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM/PeripheralPins.c

You can use the driver from the manufacturer to implement the missing layer.

Accepted Answer

Thanks for your help Mark, sorry I am new to this stuff (university student). So you mean to find the CAN driver source (*.c and *.h) and manually include them in the mbed compiler directory and then try and build again?

Thanks

posted by Connor McShane 14 Jul 2017
6 years, 9 months ago.

Does K64F support CAN? I believe it does not. Ethernet it does, therefore it should work. Please provide what is mbed/mbed OS version that you use, what are errors you are seeing, anything that can help to reproduce.

K64F does support CAN, I think as mentioned above the mbed os doesn't support CAN for this board.

I was compiling with the latest mbed 5 (updated version). The first compile error I was getting was Identifier "CAN" is undefined "CAN can1(MBED...." which is silly since the mbed documentation explicitly describes CAN as an object type from the CAN library.

posted by Connor McShane 14 Jul 2017