PSOC4: manually enabling CAN / CANFD functionalities using PDL

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
sblaett
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi

Our team would like to use the CAN functionalities of our PSOC 4100S Plus in ModusToolbox without using any Code Generator Tool like "Device Configurator".

 

the current state is as follow:

- we downloaded the PDL and HAL APIs with Library Manager: the driver are located in the external folder "mtb_shared"

- we generated a new project with our own BSP (according to chapter 5.3 in : https://www.cypress.com/file/524841/download)

- we implemented a blink LED (blue LED on CY8CKIT-149 Evaluation Board) using only the PDL APIs :

** see attached file **

- debugging works fine, LED is blinking as it should

 

Now we would like to initialize CAN functionalities. The problem is, that we cannot access the CAN API from the given pdl, i.e. we can not write :

Cy_CANFD_Enable (CANFD0, channelMask);

.. as it can not find this functions' definition.

The cy_canfd.c/.h files are present in mtb_shared/mtb-pdl-cat2/release-v1.4.0/drivers, so that should not be a problem.

Now, we have noticed, that the whole canfd implementation is not active (greyed out, see attached file), since CY_IP_MXTTCANFD is not defined/activated.

So, how can we use the function defined in cy_canfd.c/.h in our applilcation?

 

Best,

Stephan

0 Likes
2 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @sblaett ,

There are a few resources you can go through in order to get started with using CAN FD functionalities with PDL in PSoC 4 devices such as - you can try going through this code example here, where this example demonstrates how to use CAN FD in PSoC™ 4 MCU devices. Also, for the implementation of CAN functionalities in PDL, you can go through the flow of code here: https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__canfd.html 

Best Regards,

Aashita

 

 

0 Likes
sblaett
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi Aashita,

thank you for your anwer, but that does not help us at all..

We already tried to follow the guides in those examples, but unfortunately it does not work. For example it says, that you can configure CANFD within "Device Configurator", as the first picture depicts. After opening "device configurator", one can not activate CAN FD fo any reasons. To sum up, we can not see any reference regarding CAN FD functionalities.

Additional Information: We are using the "CY8CKIT-149 PSOC 4100S Plus Prototyping Kit"

candfd_problem3.PNGcandfd_problem4.PNG

0 Likes