Setting optimization level to None disables interrupt auto-clear?

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

Setting optimization level to None disables interrupt auto-clear?

跳至解决方案
2,046 次查看
kyf
Contributor V

Hello there !

I have configured tmr peripheral to trigger bctu in order to initiate an adc conversion. I've added an interrupt callback function when bctu gets triggered in order to validate my peripheral configuration with an oscilloscope.

The strange for me thing is that when I set optimization level to "None (-O0)" my program entered my callback function only once.

When I have the optimization level to "Optimize for size (-Os)" my program enters the callback every time the trigger is happening.This is the wanted behavior but I can not figure out why this is happening.

Can anyone shred some light into this matter ?

 

All I want is to have an interrupt when triggering is happening in order to validate the functionality of triggers/notifications of any peripheral that I use.

 

 

Kind regards,

kyf

0 项奖励
回复
1 解答
2,039 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @kyf,

You did not specified the drivers you use.

For example, S32K3xx RTD 2.0.0 below, the functionality of the drivers is guaranteed only with the specified settings:

danielmartynek_0-1661258171601.png

 

BR, Daniel

 

在原帖中查看解决方案

4 回复数
2,033 次查看
kyf
Contributor V

Thank you @danielmartynek.

 

I'm using RTD 2.0.0 but I've never noticed that piece of information.

Due to the lack of time I haven't investigated this any further. I've set the optimization level back to "Optimize for size" option in order to proceed with the development.

Is the image that you've shared from "Release Notes for S32K3 RTD" ?

 

 

Kind regards,

kyf

0 项奖励
回复
2,029 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @kyf,

The image was taken from

SW32K3_RTD_4.4_2.0.0_D2203_ReleaseNotes.pdf

All the release notes can be found in your NXP SW account.

Go to nxp.com / My NXP Account / Software Licensing and Support / Software accounts / Automotive SW - S32K3 Standard Software / Automotive SW - S32K3 - Real-Time Drivers for Cortex-M / S32K3 Real Time Drivers Version 2.0.0

 

BR, Daniel

0 项奖励
回复
2,026 次查看
kyf
Contributor V

Thank you @danielmartynek .

I've wanted to confirm it's origins because I'm always looking for new resources for documentation
I downloaded yesterday the files.

Kind regards,

kyf

0 项奖励
回复
2,040 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @kyf,

You did not specified the drivers you use.

For example, S32K3xx RTD 2.0.0 below, the functionality of the drivers is guaranteed only with the specified settings:

danielmartynek_0-1661258171601.png

 

BR, Daniel