can freertos MPC4748g

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

can freertos MPC4748g

1,025 Views
Krishnaja
Contributor II

Hi,

When i added a "flexcan" component to free rtos, i noticed that configurations "PIT channel -------default " is not present. PF image below.

Krishnaja_0-1619591819310.png

Whereas for project without freertos PF below image.

Krishnaja_1-1619591865678.png

Can any one tell me what modifications should i do to tx/rx data on can as an freertos task? I have attached my project. PFA.

Thanks

 

Krishnaja. 

 

0 Kudos
6 Replies

977 Views
Krishnaja
Contributor II

Hi @PetrS ,

I referred mpc5746c example. I had created mpc5748g project and just modified the code in the task alone. 

I had checked the code using breakpoints, I found that it is not going inside the task.(Toggle pin is not happening).

static void prvTransmitTask( void *pvParameters ){

TickType_t xNextWakeTime;
/* Cast to void because parameter isn't used */
(void)pvParameters;
PINS_DRV_TogglePins(PTA,(1<<0));
// xNextWakeTime = xTaskGetTickCount();
for ( ;; )
{
uint8_t ledRequested;

ledRequested = LED1_CHANGE_REQUESTED;
SendCANData(TX_MAILBOX, TX_MSG_ID, &ledRequested, 1UL);

PINS_DRV_WritePin(PTA,7,1);
vTaskDelayUntil( &xNextWakeTime, mainTRANSMIT_FREQUENCY_MS );
}
}

Please tell me why it is not going into "prvTransmitTask".

PFA

 

Krishnaja.

0 Kudos

949 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

try to have same preprocessor setting as it is in the demo example

BR, Petr

0 Kudos

917 Views
Krishnaja
Contributor II

I checked preprocessor setting. Still I have same problem.

Please tell me what I have missed.

0 Kudos

902 Views
PetrS
NXP TechSupport
NXP TechSupport
0 Kudos

962 Views
Krishnaja
Contributor II

Hi @PetrS 

Any updates??

0 Kudos

1,011 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

please refer to flexcan_mpc5746c example which shows FlexCAN and FreeRTOS usage.

BR, Petr

0 Kudos