How to use Eb Configuration tool to configure mcal on S32K148 to realize Can_wakeup

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use Eb Configuration tool to configure mcal on S32K148 to realize Can_wakeup

3,939件の閲覧回数
lb_2023
Contributor I

嗨恩智浦专家,

        

我想使用 Eb 配置工具在 S32K148 上配置 mcal 以实现Can_wakeup。但是我在软件中找不到配置此功能的特定位置,并且我不知道如何在程序中调用这些功能。我对此有一些疑问:

1.此功能是否只能通过假装联网模式实现?

2.进入假装联网模式后,如何让此模式以停止模式运行?如何请求关闭 CHI 子模块时钟,同时保持 PE 子模块时钟处于活动状态?如何在寄存器中设置LPM_ACK位CAN_MCR?

3.如果我需要为此配置新的唤醒源,如何配置?

以上问题基于EB MCAL的使用。希望得到您的回复。

愿你安好。

0 件の賞賛
返信
5 返答(返信)

3,888件の閲覧回数
Shuang
NXP Employee
NXP Employee

Hi,

S32k1xx has four low-power modes (VLPS, VLPR, STOP1, STOP2).

Below is the current of the four low-power modes.

nxf47391_0-1676256823984.png

Below is CAN status during low-power mode.

nxf47391_1-1676256893646.pngnxf47391_2-1676256905213.pngnxf47391_3-1676256917642.png

Below is wake-up sources.

nxf47391_4-1676257035306.png

So I think your low-power should be VLPS mode. CAN is OFF in VLPS mode. If you want to wake up MCU by CAN, you need to reconfigure CAN RX pin to GOIP input and enable GOIP's interrupt before entering VLPS mode. You need to reconfigure CAN after waking up. You only do some urgent cases after waking up and reset MCU by WDG timeout.

Thanks!

BR,

Shuang

0 件の賞賛
返信

3,874件の閲覧回数
lb_2023
Contributor I

Hi Shuang,

   First of all, thank you very much for your patient and detailed reply.

   According to your reply, my low-power should be VLPS mode. If I reconfigure CAN RX pin to GOIP input and enable GOIP's interrupt before entering VLPS mode. This means that in addition to CANNM messages, other application CAN messages can wake up the MCU, After MCU wake up, I judge again that if the received messages don't include the CAN NM message with a specific ID, MCU should sleep quickly again. If the received message does,MCU will work normally until the next normal sleep. I need to do that, right?

    Regards,

    Bin

0 件の賞賛
返信

3,852件の閲覧回数
Shuang
NXP Employee
NXP Employee

Hi Bin,

You are right.

But I create a demo project. We do not need to reconfigure CAN RX pin to GOIP input before entering VLPS mode

The attachment file includes EB and S32DS3.4 projects.

S32K1xx software version: SW32K1_RTD_4.4_1.0.1_HF01

EB version: tresos Studio 27.1

S32DS version: S32DS3.4 

Test board HW: S32K148 EVB board

Thanks!

BR,

Shuang

0 件の賞賛
返信

3,793件の閲覧回数
lb_2023
Contributor I

Hi Shuang

       Thank you so much for creating the demo project, let me know more about it.

       But my EB MCAL version is V1.0.4,AS4.2.2.Therefore I did not open your EB demo project. 

      I created two channels in Icuchannel, one is I/O wakeup and the other is CAN wakeup, but multiple errors were displayed when generating code. (Since I cannot place the image, the error message is placed at the end) Before, Icuchannel created only one channel: I/O wakeup, so there were no errors and it worked. Now I want to add can wake up, but I failed to configure it.

Thanks!

Regards,

Bin

 

ADD:
[ENTRY]
TYPE Tresos Status
VERSION 1.0
CODE 2170
SEVERITY ERROR
ORIGIN Tresos
TIMESTAMP 23-02-21,14:00:52
ADDITIONALINFO
SHORTMESSAGELOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
SHORTMESSAGENONLOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
LONGMESSAGELOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
LONGMESSAGENONLOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
SHORTMESSAGEENRICHEDLOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
SHORTMESSAGEENRICHEDNONLOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
LONGMESSAGEENRICHEDLOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
LONGMESSAGEENRICHEDNONLOCALIZED Failed to generate file "D:\EB\EB\tresos\plugins\Icu_TS_T40D2M10I4R0/generate_PB/src/Icu_PBcfg.c (signed)"
STACKTRACE dreisoft.tresos.datamodel2.generated.operationstatus.GeneratorOperationStatus.<init>(GeneratorOperationStatus.java:61)
dreisoft.tresos.datamodel2.generated.operationstatus.GeneratorOperationStatus.FAILED_TO_GENERATE(GeneratorOperationStatus.java:1084)
dreisoft.tresos.datamodel2.generator.AbstractECUCGeneratorBase.generateFile(AbstractECUCGeneratorBase.java:316)
dreisoft.tresos.launcher2.generator.TemplateBasedCodeGenerator.runGeneratorForTemplate(TemplateBasedCodeGenerator.java:689)
dreisoft.tresos.launcher2.generator.TemplateBasedCodeGenerator.processTemplate(TemplateBasedCodeGenerator.java:639)
dreisoft.tresos.launcher2.generator.TemplateBasedCodeGenerator$1.run(TemplateBasedCodeGenerator.java:574)
dreisoft.tresos.lib2.job.ThreadUtils.runJobs(ThreadUtils.java:591)
dreisoft.tresos.launcher2.generator.TemplateBasedCodeGenerator.runGenerator(TemplateBasedCodeGenerator.java:590)
dreisoft.tresos.launcher2.generator.TemplateBasedCodeGenerator.doRun(TemplateBasedCodeGenerator.java:321)
dreisoft.tresos.launcher2.generator.AbstractCodeGenerator.run(AbstractCodeGenerator.java:153)
dreisoft.tresos.launcher2.generator.GeneratorRunUtils$1.run(GeneratorRunUtils.java:517)
dreisoft.tresos.lib2.job.ThreadUtils.runJobs(ThreadUtils.java:591)
dreisoft.tresos.launcher2.generator.GeneratorRunUtils.doRunGenerators(GeneratorRunUtils.java:536)
dreisoft.tresos.launcher2.generator.GeneratorRunUtils$GeneratorBunch.run(GeneratorRunUtils.java:764)
dreisoft.tresos.launcher2.generator.GeneratorRunUtils.runForAllVariants(GeneratorRunUtils.java:334)
dreisoft.tresos.launcher2.generator.GeneratorRunUtils.generate(GeneratorRunUtils.java:184)
dreisoft.tresos.launcher2.generator.GeneratorRunUtils.runGenerators(GeneratorRunUtils.java:139)
dreisoft.tresos.launcher2.generator.ECUCGeneratorProject.run(ECUCGeneratorProject.java:170)
dreisoft.tresos.launcher2.generator.ECUCGeneratorProject.runGenerators(ECUCGeneratorProject.java:146)
dreisoft.tresos.launcher2.generator.actions.BuildWorkerJob.doRun(BuildWorkerJob.java:189)
dreisoft.tresos.lib2.job.AbstractWorkerJob.run(AbstractWorkerJob.java:255)
dreisoft.tresos.lib2.job.internal.JobWrapper.run(JobWrapper.java:90)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

[ENDENTRY]

 

0 件の賞賛
返信

3,790件の閲覧回数
Shuang
NXP Employee
NXP Employee

Hi Bin,

I think you can download the S32K1 Real-Time Drivers Version 1.0.1 HotFix 01

The software is MCAL version and is free for customers.

Thanks!

BR,

Shuang

0 件の賞賛
返信