Import AUTOSAR OS generation from EB tresos to S32 tool MBDT

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

Import AUTOSAR OS generation from EB tresos to S32 tool MBDT

跳至解决方案
1,221 次查看
agus_idiada
Contributor III

Dear NXP colleagues,

I am in the process of importing the EB tresos config into the S32 tool .mex file of the motor control example project S32K396_MBDT_BASED_MC_0_9_0.

So I have already imported all the .epc files (except the Resource.epc ) into the S32 tool but I still have errors. Where can I get this information form the EBT project in order to fix the errors.

Error when trying to import Resource.epc

agus_idiada_1-1727867407449.png

List of errors in the S32 tool

agus_idiada_0-1727867324984.png

I attached the .mex file with all the .epc loaded.

Thanks,

Agustin.

@Irina_Costachescu 

0 项奖励
回复
1 解答
1,189 次查看
Irina_Costachescu
NXP Employee
NXP Employee

Hello @agus_idiada 

Please find attached the .mex file with no errors. I have tested that when pressing the Update Code button it generates successfully configuration code, and I would like to add some comments on the problems you were encountering.
 
As a general mention, the process of migrating configurations from EB Tresos to S32 Configuration Tools is not completely automated. This means that, even if the .epc files are imported inside a .mex file, some manual changes must also be made to ensure a configuration without any errors.
 
For navigating to the setting that causes an error to be displayed in the Problems view, you could double click on that particular issue and the GUI will open the specific configuration tab which has the item which is not configured as expected. Hovering on the error provides details on what is expected from the drivers side. So, in the future, please note that this process could help you identify the cause of the errors.
 
Irina_Costachescu_0-1728024542241.png

 

 
What I have done, by following this approach, is described below:
 
1. I have removed the I2C, LIN, ICU and CAN components as they are not configured in the EB Tresos project since not being used by the demo. As the MCU and MCL components had a different configuration than the default one provided by the toolbox, some settings for the components in discussion were missing (e.g Lin peripheral reference clock, which is not configured in MCU, I2C FlexIO channels, which need to be enabled in MCL - these are just two examples). 
 
2. Since ADC_DMA is enabled for the AdcHwUnits 3 and 4, the tool requires a DMA Channel to be enabled in the configuration as well. As this constraint seems to not be implemented by the drivers inside the EB Tresos tool, I will kindly ask @Vincent_Deng to provide more information here, on which channel should be used for each of the configured SDADC instances. For now, I have just enabled them to fix the errors 
 
3. Mcu component settings, inside the S32CT environment, need to match the ones enabled inside the Clocks Tool. Since Mcu component was imported from the EB Tresos project, containing the settings required by the application, I have updated the Clocks Tool settings to match the ones in Mcu. For performing this, you could check the faulty settings in the Mcu component, then go to the Clocks Tool and update them accordingly there. Modifications that were required imply:
 
- Change Clock Sources - this can be done my double clicking on the corresponding clock divider and choosing the appropriate source
 
Irina_Costachescu_1-1728024709158.png
 
- Enable Clock Sources dividers - by double clicking on the corresponding divider block and choosing the appropriate option from the right side options
 
Irina_Costachescu_3-1728024847153.png

 

This Search bar helps you to find the necessary MUXes and settings inside the Clocks Tool.
 
Irina_Costachescu_2-1728024802051.png
Please let us know if this configuration works on your setup as well.
 
Thank you,
Irina

在原帖中查看解决方案

2 回复数
1,190 次查看
Irina_Costachescu
NXP Employee
NXP Employee

Hello @agus_idiada 

Please find attached the .mex file with no errors. I have tested that when pressing the Update Code button it generates successfully configuration code, and I would like to add some comments on the problems you were encountering.
 
As a general mention, the process of migrating configurations from EB Tresos to S32 Configuration Tools is not completely automated. This means that, even if the .epc files are imported inside a .mex file, some manual changes must also be made to ensure a configuration without any errors.
 
For navigating to the setting that causes an error to be displayed in the Problems view, you could double click on that particular issue and the GUI will open the specific configuration tab which has the item which is not configured as expected. Hovering on the error provides details on what is expected from the drivers side. So, in the future, please note that this process could help you identify the cause of the errors.
 
Irina_Costachescu_0-1728024542241.png

 

 
What I have done, by following this approach, is described below:
 
1. I have removed the I2C, LIN, ICU and CAN components as they are not configured in the EB Tresos project since not being used by the demo. As the MCU and MCL components had a different configuration than the default one provided by the toolbox, some settings for the components in discussion were missing (e.g Lin peripheral reference clock, which is not configured in MCU, I2C FlexIO channels, which need to be enabled in MCL - these are just two examples). 
 
2. Since ADC_DMA is enabled for the AdcHwUnits 3 and 4, the tool requires a DMA Channel to be enabled in the configuration as well. As this constraint seems to not be implemented by the drivers inside the EB Tresos tool, I will kindly ask @Vincent_Deng to provide more information here, on which channel should be used for each of the configured SDADC instances. For now, I have just enabled them to fix the errors 
 
3. Mcu component settings, inside the S32CT environment, need to match the ones enabled inside the Clocks Tool. Since Mcu component was imported from the EB Tresos project, containing the settings required by the application, I have updated the Clocks Tool settings to match the ones in Mcu. For performing this, you could check the faulty settings in the Mcu component, then go to the Clocks Tool and update them accordingly there. Modifications that were required imply:
 
- Change Clock Sources - this can be done my double clicking on the corresponding clock divider and choosing the appropriate source
 
Irina_Costachescu_1-1728024709158.png
 
- Enable Clock Sources dividers - by double clicking on the corresponding divider block and choosing the appropriate option from the right side options
 
Irina_Costachescu_3-1728024847153.png

 

This Search bar helps you to find the necessary MUXes and settings inside the Clocks Tool.
 
Irina_Costachescu_2-1728024802051.png
Please let us know if this configuration works on your setup as well.
 
Thank you,
Irina
1,163 次查看
Vincent_Deng
NXP Employee
NXP Employee

Hi @Irina_Costachescu,

Thanks for giving a detailed example and introduction guiding how to import the EB project used in the mbdt demo into the S32DS IDE. Great work!

Hi @agus_idiada,

I will list the information about DMA channels used in the mbdt demo and also include some notes related to the usage of DMA channels.

An overview of used DMA channels in the demo:

  1. Instance 1,
  2. channel 6~7, used for transferring processed SDADC results(in the Dspss) to the Etpu for resolver calculation,
  3. channel 8, used to transfer the excitation signal trigger, is linked with channel 6.

The following figures show the detailed configurations:

  • Overview

Vincent_Deng_4-1728368002458.png

 

  • Channel 6

Vincent_Deng_3-1728367969957.png

Vincent_Deng_0-1728367815226.pngVincent_Deng_1-1728367843632.pngVincent_Deng_2-1728367870476.png

  • channel 7

Vincent_Deng_5-1728368105835.png

Vincent_Deng_6-1728368143778.pngVincent_Deng_7-1728368161438.pngVincent_Deng_8-1728368176168.png

  • Channel 8

Vincent_Deng_9-1728368348022.pngVincent_Deng_10-1728368371943.pngVincent_Deng_11-1728368383225.pngVincent_Deng_12-1728368394851.png

The above snapshots listed the configurations for generation. Also, need to note, the DMA channels still need to configure the source address and destination address. Please check the code void Dma_User_Config(void) in file common/etpu_motor/motor_bsp/mbd_user_init.c. The function was called in the Configuration Board Initialization parts, see the demo guide for details. Listed the function code here with comments.

Vincent_Deng_13-1728369220578.png

So, please check and make sure the macros/definitions used in the Dma_User_Config() are correct after generation.

Thanks!

Vincent