Hi Customer,
Thanks a lot for your contribution.
You are right, after the detail checking, the SDK have bugs about the I2C code.
I have tested the main clock, it is really 30Mhz, I output the main clock to PIO0_6, with the following code:
1. pin mux.c
Add:
// CLKOUT to P0_6 kSWM_CLKOUT kerry add
SWM_SetMovablePinSelect(SWM0, kSWM_CLKOUT, kSWM_PortPin_P0_6);
Above CLOCK_DisableClock(kCLOCK_Swm); in void BOARD_InitPins(void).
2. in main code:
//========clkout P0_6 choose main clock
SYSCON->CLKOUTSEL = 1;
SYSCON->CLKOUTDIV = 1;
Then we can find the main clock in the PIO0_6, it is :

So, please modify the I2C master clock to 30Mhz, instead of 12Mhz.
#define I2C_MASTER_CLOCK_FREQUENCY (30000000)//(12000000)
I will report this bug to our according department.
Then when you test the I2C, you will find the I2C clock is 100Khz.

Thanks a lot for your question post, it is really very useful to our SDK improvement.
Wish it helps you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------