How to create a FreeRTOS project for FlexCAN?

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

How to create a FreeRTOS project for FlexCAN?

1,372 Views
tangbing
Contributor I

hello!

 in S32 Design Studio v1.2 I can get an example FreeRTOS_Example,I want to use FlexCAN,so

I Add the CAN module in the FreeRTOS_Example,

Free.png

I add the clock initialization program is as follows:

CLOCK_SYS_Init(g_clockManConfigsArr, FSL_CLOCK_MANAGER_CONFIG_CNT,
g_clockManCallbacksArr, FSL_CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_FORCIBLE);

Pins_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);


/*CAN test*/
FLEXCAN_DRV_Init(FSL_CANCOM1, &canCom1_State, &canCom1_InitConfig0);

The following errors in debugging:

33.png

so How to create a FreeRTOS project for FlexCAN?

Do you have any related FreeRTOS project for FlexCAN FlexCAN materials?

Tags (1)
0 Kudos
2 Replies

868 Views
raresvasile
NXP Employee
NXP Employee

Hi,

It seems that the clock for the FlexCAN instance was not enabled from Clock Manager.

To enable the clock:

   - Open Clock Manager PEx component

   - Go to PCC tab and tick on Enable checkbox for the desired CAN instance

   - Generate Processor Expert Code and Build the project

Best regards,

Rares

0 Kudos

868 Views
yalamandadosaky
Contributor V

Hi raresvasile,

I am trying to do the same (porting FreeRTOS alongwith Flexcan) but ProcessorExpert generator is giving some error


ERROR: Unexpected status of script: Beans\flexcan\Items\S32_SDK_C55\flexcan.chg, please contact Freescale
ERROR: Unexpected status of script: Drivers\Common\EBGNSupport\TimingLib.prg, please contact Freescale support.  
Generator: ERROR: There are errors in the project, please review components configuration. It is not possible to generate

 

I am using s32ds v1.2 with latest update for EAR 0.8.1,

Can you help me how to resolve this issue.

0 Kudos