problem hardFault generated by sw32k3_FreeRTOS

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

problem hardFault generated by sw32k3_FreeRTOS

5,768 Views
michelet1
Contributor II

Hello,

i have s32ds 3.5 and i'm using the board MCTPTX1AK324(and follow step provided to get started) with installation RTD 4.4 2.0.0,  IPCF 4.0.0.

As a next step i tried to allocate a static task and the related scheduler function(vTaskStartScheduler).

I modified FreeRTOSConfig.h to have static allocation etc.. but when I start the code and debug with PE micro it generates hardFault() when it executes prvPortStartFirstTask(void) function in vTaskStartScheduler.

I also tried looking for possible solution(as insert define MCAL_ENABLE_USER_MODE_SUPPORT)  but i couldn't solve it.

In the attachment i report the image of the main with static task allocation and the scheduler.

 Thank you in advance for your help and availability

0 Kudos
Reply
17 Replies

5,739 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

Do you enable the "static allocation"?

nxf78987_0-1700467747336.png

If not, please let me the correct statement in the task_scheduler function was occurred hardfault error. Besides, Could you send me your example?

Best regards,

Dan

0 Kudos
Reply

5,715 Views
michelet1
Contributor II

Good evening,

thanks for your answer but my problem is the following:
I started from the following link (https://www.nxp.com/design/development-boards/automotive-development-platforms/s32k-mcu-platforms/s3...)  in order to try dual core reference design of s32k324.
I  need to work with s32ds3.5 but this reference design only work with RTD 2.0.0.   In fact if i try to install RTD 3.0.0 and then open configuration tool from s32ds3.5 it generates the error that i report in the attachment.
So my doubt is: Starting from reference design of the s32k3 it is possible to use RTD 3.0.0?
Using s32ds3.5 i should use RTD 3.0.0 and FreeRTOS 10.5.1 ? it seems to me that this is the only possible combination
Thank you very much for your precious help and collaboration

 

Michele
0 Kudos
Reply

5,701 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

Using s32ds3.5 i should use RTD 3.0.0 and FreeRTOS 10.5.1?

=> Yes, because SW32K3_FreeRTOS_10_5_1_UOS_3_1_0_D2304 package based on the RTD 3.0.0.

And RTD 3.0.0 only can install on the S32DS 3.5.

with  RTD 2.0.0, this package based on the  S32 Design Studio IDE v3.4 Update 3.

Best regards,

Dan

0 Kudos
Reply

5,691 Views
michelet1
Contributor II

Good morning, 

thanks for the confirmation regarding RTD 3.0.0.

The doubt remains that how do i make the reference design(https://www.nxp.com/design/development-boards/automotive-development-platforms/s32k-mcu-platforms/s3...) work on the s32ds3.5?

this reference works with RTD 2.0.0, is it possible to make it work with RTD 3.0.0?

Thanks again for your precious help and collaboration.

Michele

0 Kudos
Reply

5,685 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

this reference works with RTD 2.0.0, is it possible to make it work with RTD 3.0.0?

=> Yes, it is.

Best regards,

Dan

0 Kudos
Reply

5,682 Views
michelet1
Contributor II

good morning,

but once RTD 3.0.0 has been installed I can no longer open the configTool (i.e. the .mex file) and it generates the error in the attachment.

How do I resolve this?

Thanks again for your precious help

Michele

0 Kudos
Reply

5,675 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

Did you install and use correct S32DS update side for RTD K3 3.0.0 version?

nxf78987_0-1700821692128.png

Best regards,

Dan

0 Kudos
Reply

5,671 Views
michelet1
Contributor II

Hello, 

first i deleted RTD 2.0.0 and then i went under Help->s32ds design studio extensions and updates->select RTD 3.0.0 as the following image shows.

Do i have to do some further steps? because after installing RTD 3.0.0 i  can no longer open config tool(.mex file) and it generates an error that i showed before here on the forum.

Thanks again very much for your help

Michele 

0 Kudos
Reply

5,663 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

Maybe you was not install development package for S32K3XX before install RTD 3.0.0 package.

This is the sequence to install RTD 3.0.0 package:

First, you need to install development package for S32K3XX, download at the highlighted path as image below.

nxf78987_0-1700837080814.png

After install this development package completed, you will install RTD S32K3 3.0.0

Best regards,

Dan

 

0 Kudos
Reply

5,644 Views
michelet1
Contributor II

Good evening,

thank you for your precious help.
I only have one more doubt: when i also add FreeRTOS and call vTaskStartScheduler. At a certain point the prvPortStartFirstTask function is executed and at this point the k324 microcontroller generates HardFault.
Why does this behavior happen? Is it due to the address 0XE000ED08? in the attachment i report two screens with the fundamental points of the code that concern this problem
I hope i was clear in explaining my problem. i take this opportunity to thank you again for your precious help.

 

Michele
0 Kudos
Reply

5,599 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

Could you send me your project?

Best regards,

Dan

0 Kudos
Reply

5,587 Views
michelet1
Contributor II


Hello,

right now i'm doing some tests with triple motor k3 reference design project.

In attachment i report the project.(is file .exe for install reference design project s32k324 on your PC)

i would like to at least be able to make freertos work on this project(in this case i'm using RTD 2.0.0 and s32ds3.4 with freertos 10.4.5)

thanks again for your availability

Best regards

0 Kudos
Reply

5,563 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

I can't install your .exe file into my PC because it violates the secure policy of NXP.

Could you send me the .zip file of your project?

Best regards,

Dan

0 Kudos
Reply

5,556 Views
michelet1
Contributor II

Good morning,

I will send you the project in 7z zip format.

Inside there is the dual core s32k324 project. I tried to install FreeRTOS first in core0 and then on core1 but still there was a HardFault when prvPortStartFirstTask is executed.

 Thanks again for your precious help and collaboration

Michele

0 Kudos
Reply

5,532 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

The FreeRTOS didn't support multi-core scenarios. So, you can't implement FreeRTOS with dual-core.

Best regards,

Dan

0 Kudos
Reply

5,516 Views
michelet1
Contributor II

Good morning,

thanks for your info.

I still have a couple of questions to understand better:

1) it is not possible to use any operating system in the dual core s32k324 case?

2)is this a temporary thing/ in the future you can use freertos on the dual core?

Thanks again for your precious help.

Best regards

0 Kudos
Reply

5,511 Views
nxf78987
NXP Employee
NXP Employee

Hello @michelet1,

1) it is not possible to use any operating system in the dual-core s32k324 case?

=> I only can confirm that you can't use the FreeRTOS packages for multi-core.

2)is this a temporary thing/ in the future you can use freertos on the dual core?

=> I only know that, at the moment, there are not any FreeRTOS packages that support multi-core.

Best regards,

Dan