K22 errata e6939 - Is the workaround even possible?

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

K22 errata e6939 - Is the workaround even possible?

Jump to solution
1,071 Views
ee-quipment_com
Contributor II

In the K22 mask sets 0N50M, 0N51M, 1N41K, and 0N74K (and possibly more, these were all I looked at) there is an errata e6939 which has the description "Core: Interrupted loads to SP can cause erroneous behavior". To summarize the errata as I understand it, if an instruction of the form "LDR SP, xxx" is interrupted bad things may occur.

The workaround is to not use instructions of that form. Okay, fair enough I guess, if writing assembly code. But what is the workaround for C code, since I can't control what the compiler emits? I would appreciate if someone who is using a K22 part can share how you are ensuring that you don't encounter this errata.

Labels (1)
Tags (4)
1 Solution
807 Views
chris_brown
NXP Employee
NXP Employee

Hi Jeff,

Our CodeWarrior Experts have confirmed that the compiler will not generate these instructions. 

After some discussion, I have learned that you are probably more at risk of these types of instructions being  hidden in an operating system library.  Are you using an operating system?  If so, which one?  ARM has confirmed that no known RTOS contains these instructions. 

Regards,

Chris

View solution in original post

6 Replies
807 Views
chris_brown
NXP Employee
NXP Employee

Hi Jeff,

I completely understand how this errata could be a little confusing.  This is an ARM errata that we picked up by default because we are using the Cortex M4F in this device.  We need to do a little more research into this but we are not aware of any compilers that generate these particular instructions.  So this limitation would only occur with hand-written code (assuming no compilers generate this instruction). 

As I said, we need to confirm this, but in the meantime, you could also check with your compiler manufacturer and see if this is something that you need to worry about. 

As a last resort (if you are unable to get in touch with your compiler manufacturer), you could have you compiling generate the appropriate listing files, open them with a text editor and use the search functions to try to find these suspect instructions.  If any were found, you could create a macro (assembly code) to replace the functions that you are worried about. 

Hope this helps,

Chris

807 Views
ee-quipment_com
Contributor II

Christopher, thank you for the prompt reply. Following your suggestion, may I ask you, as a representative of my compiler manufacturer Freescale, if this is something that I need to worry about?

I can't imagine searching through the compiler output for the offending instructions after every debug/edit/compiler iteration. I appreciate the suggestion though, I know you are just trying to be helpful and cover all possible solutions.

0 Kudos
807 Views
chris_brown
NXP Employee
NXP Employee

Hmm.. So I take it you are using KDS or CodeWarrior? 

I don't have an answer for either one right now, but can forward that question on to the appropriate parties. 

~Chris

0 Kudos
807 Views
ee-quipment_com
Contributor II

Sorry, my bad for not providing the information.

- CodeWarrior for MCU

     Version: 10.5

     Build Id:130916

I'd appreciate any info you can find out.

0 Kudos
808 Views
chris_brown
NXP Employee
NXP Employee

Hi Jeff,

Our CodeWarrior Experts have confirmed that the compiler will not generate these instructions. 

After some discussion, I have learned that you are probably more at risk of these types of instructions being  hidden in an operating system library.  Are you using an operating system?  If so, which one?  ARM has confirmed that no known RTOS contains these instructions. 

Regards,

Chris

807 Views
ee-quipment_com
Contributor II

Chris,

Wow! What a great answer - very complete and well researched. Thank you so much. Now I can move ahead with that K22 design, although I still might take your advice and parse my final release code for the at-risk instructions :smileyhappy:

Jeff

0 Kudos