How to use MCAL with project configured for FreeRTOS MPU for S32K344

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

How to use MCAL with project configured for FreeRTOS MPU for S32K344

1,133 Views
HemantK
Contributor III

Hello All, 

 

I have created a simple FreeRTOS MPU project by modifying "FreeRTOS_Toggle_Led_Example_S32K344" and added DIO MCAL to toggle on board LED.

My modified ReceiveTask task looks like this now: 

void ReceiveTask( void *pvParameters )
{
    (void)pvParameters;
    BaseType_t operation_status;
    BaseType_t count = 0;
    uint8_t currentLevel = STD_HIGH;

    for( ;; )
    {
        operation_status = xSemaphoreTake(sem_handle, portMAX_DELAY);
        configASSERT(operation_status == pdPASS);
        Dio_WriteChannel(DioConf_DioChannel_RED_LED, currentLevel);
        currentLevel =~currentLevel & 0x1;
        if(count++ > 10)
        {
            //testResult = 0x5AU;
        }
    }
}

 

But as soon as it try to execute "Dio_WriteChannel(DioConf_DioChannel_RED_LED, currentLevel);", I get memory exception

 

HemantK_0-1671047979913.png

 

But no issue is seen if I comment above line of code.

 

In short can you please guide me as how I can use MCAL with FreeRTOS using MPU.

 

Regards, 

Hemant Kapoor

 

 

 

 

0 Kudos
Reply
3 Replies

1,108 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @HemantK,

Can you please post the project here, so that I can easily reproduce it?

 

Thank you,

BR, Daniel

0 Kudos
Reply

1,096 Views
HemantK
Contributor III

Hello, 

Please find the project attached.

0 Kudos
Reply

1,068 Views
nxf78987
NXP Employee
NXP Employee

Hi HemantK,

what is the FreeRTOS package's name you are using?

nxf78987_0-1671690891123.png

nxf78987_1-1671690919534.png

Best regards,

Dan

0 Kudos
Reply