Hello,
We are using Kinetis K and have encountered a problem which seems exactly as the known one in Kinetis L, but it doesn't appear in our Kinetis K erratas.
What we see is exactly the same behavior and working behavior as explained in mask set errata 2N97F, ID 6070, title: "I2C: Repeat start cannot be generated if the I2Cx_F[MULT] field is set to a non-zero value".
We are using Kinetis K MK11/MK21 and both don't have this errata published on the web site.
Is this a known issue for the Kinetis K devices or we have are missing something here?
Thank you,
Pavel
Hi Pavel,
According to your mention, the MK11/MK21 also ecountered the same issue which has been recorded in Errta 2N97F.
I'd like to confirm that whether the issue could be fixed by workaround or not and I was wondering if you could upload your code, then I could run this code with board for test.
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
FYI, a workaround is described here: KL25Z and I2C: Missing Repeated Start Condition | MCU on Eclipse
Hi Erich, I believe I'm seeing this exact problem on my K64F, but I'm not positive. However, the problem I've got is that I can't make the changes you've suggested because I can't find them in PEx.
By any chance is that option selected elsewhere in KDS 2.0?
I'm doing a write here, rather than a read. Perhaps I'm barking up the wrong tree, but I was trying to figure out if there's a way to force the repeated start when I found this post. The chip I'm using specifies that I either send a STOP or repeated start after the 0x01 in the image above.
Dave,
You should not be seeing the same issue as the K64 does not have the same version of the I2C module as the K22/K21/ L Family. But please let us know if changing the clock settings fixes your issue. Also, could you let us know what version of PEx and the SDK that you are using?
Thanks,
Chris
Hi Chris, I'm using KSDK 1.1 and whatever version of PEx is included with that. I haven't figured out how to modify the KSDK to generate the repeat start. However, I did fudge my function calls to mimic the signals for a repeat start, and it didn't help. It looks like we also have an issue with our I2C address selection, so in the end it looks like I probably won't need the repeat start.
Yes, it seems that issue is present in many more devices, as they probably share the same silicon implementation.
Which I2C component are you using with Processor Expert?
Wow, thank you for the super prompt reply! :smileyhappy: I'm using fsl_i2c.
that means you are using the Kinetis SDK? I believe it is in the clock manager, but not sure.
Yes, I'm using KSDK as well. I have disabled tabs and am going through each item in PEx, but nothing jumped out at me. I looked at the clock manager and there's nothing really there.
There are a lot of clock-related settings for the CPU, but I never know what is safe to play with there. Usually, I delete all configs except for the "maximum speed" config, but at the moment I have all five available and I'm using #1 (max speed).
This is handled in the SDK source code, and I believe you cannot influence this with the settings in the components. You would need to check the SDK source code.
Ok, thanks, I'll take a look at the clock configuration in the setup code and will post up what I find.
Yes, MCU on Eclipse is the first place where we found this bug mentioned.
The related two workarounds are also mentioned on the discussed errata 2N97F.
Pavel,
I am having some trouble understanding some of this post, but I just wanted to clarify that this errata has been documented already for certain K22 and K21 devices. If you check the errata sheets for Masks 2N03G and 3N03G, it is documented for these mask sets. Can you please check your silicon and let us know if these are the Mask numbers on your parts? If not, we definitely want to know the mask set numbers that you are seeing it on so that we can make sure we have all of the affected devices documented.
Thanks! :smileyhappy:
Chris
Hi Pavel,
Could you please tell me the workaroud whetlher work or not when MK11/MK21 couldn't generate the repeat start?
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Ping,
Yes, the workaround worked.
When we reconfigured the prescaler to 0 (divide by 1) while remaining the same resulting I2C frequency (with the help of PE), it started working correctly.
Thank you,
Pavel
Hi Pavel,
Thanks for your reply.
I was wondering if you could upload the demo and I can reproduce this situation, then I will report this issue to document team to correct the Errata document.
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
This silicon bug was an issue for me too. (K22 device) and unfortunately I spent 6 hours debugging before finding this post. This was complex code that I've moved from a slower Kinetis part so changing the multiplier seemed like a no brainer. The work-around solved the problem.
Jeremy or Erich (or someone else at Freescale), _please_ get this added to the errata for all affected Kinetis families!
Hi Jonathan,
Thanks for your information.
I was wondering if you can tell the specific MCU of K22 device you used?
I'm looking forward to your reply.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------