Kinetis SDK + Optimisation levels

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

Kinetis SDK + Optimisation levels

3,968 Views
TurboMan
Contributor IV

I'm using the I2C driver in a project generated using the project generation tool. If I have the optimisation level set to anything other than -O0, the project locks up in the driver / function I'm calling. I2C_MasterTransferBlocking() for instance.

 

Any advice other than don't use optimisation?

Labels (1)
0 Kudos
Reply
6 Replies

3,748 Views
TurboMan
Contributor IV

I can attach files fine in the "advanced editor" view, when the attach option is there. However, if I look at posts and replies in my inbox, then there isn't an attach option.

But, I did find that if I click on the original post title, then it will go to the view where "use advanced editor" is a small link in the top right hand corner, then I can click on that, and then the "attach" option appears in the bottom left. Once you're in the advanced view, then you can do as your screenshots point out, it's getting there that was awkward.

Anyway, I've now attached the project, thanks.

0 Kudos
Reply

3,740 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I just tested your project on my TWR-KV58F220M demo board. test the project with -O0 and -O2, -O3 separately, but the appearance is the same in debugger run.

see attached video for -O3 for instance. with -O0 and -O2, everything is same in debugger run.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

3,740 Views
harshpatel
Contributor IV

Hello

Thanks for detail....So your code is working fine without optimization but if you change optimization level than its lock up right?

well here i have attached snapshot for how to attach  file. i think attached code may help  more to fix it.

0 Kudos
Reply

3,740 Views
TurboMan
Contributor IV

P.S. It will lock up waiting for an interrupt, as I'm using a blocking function call. However, I can see the TCF (transfer complete) flag in the I2C reg, but not any interrupt flag, and it doesn't look like interrupts are enabled either. I didn't dig too deeply here.

0 Kudos
Reply

3,740 Views
harshpatel
Contributor IV

Hello

 which controller you are using?

can you please share code??

Regards,

Harsh

0 Kudos
Reply

3,740 Views
TurboMan
Contributor IV

Hello Harsh, here are some more details:

KDS 3.2.0

SDK_2.0_TWR-KV58F220M

KV58F220M tower board, using I2C driver to read the who_am_i register from the FXOS8700CQ. Using PKV58F1M0VLQ22, so pre-prod part on an early version tower board. Project generated by kinetis project generator using the 2.0 SDK generated for the KV58F using the SDK builder app.

There is no button to attach a zip file on this reply frame. There is also no option to "go advanced" and see more controls.

0 Kudos
Reply