Setting optimization level to None disables interrupt auto-clear?

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

Setting optimization level to None disables interrupt auto-clear?

Jump to solution
791 Views
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 Kudos
1 Solution
784 Views
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

 

View solution in original post

4 Replies
778 Views
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 Kudos
774 Views
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 Kudos
771 Views
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 Kudos
785 Views
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