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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,133 次查看
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 项奖励
回复
3 回复数

1,108 次查看
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 项奖励
回复

1,096 次查看
HemantK
Contributor III

Hello, 

Please find the project attached.

0 项奖励
回复

1,068 次查看
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 项奖励
回复