Hi All
With IMXRT1052 I experienced a hang on LPI2C when subaddressSize is 2 (subaddress @16 bit)
Setup:
IMXRT1052 with LPI2C2 connected to an EEPROM (address 0x50). IMXRT acts as a master, EEPROM acts as a slave
SDK version 2.10.0
A 16 byte read command from EEPROM starting from subaddress 0x00 is issued. subaddressSize is = 2 (subaddress @16 bit)
LP2IC initialized in transfer mode with wrapper FreeRTOS
Result:
Transfer is interrupted before receiving data from EEPROM. SCL is stuck low
Here handler state:
State (0x03) is kTransferDataState
16 byte to be transfered
Here below scope captures
NOTE:
If subaddressSize = 1 or 4 transfer is completed correctly, without changing any other parameter
Also scope captures with subaddressSize = 4 are reported
------------------------------------------------------------------------------------------------------------------------------------------------------
Scope capture with 16 bit subaddress
Just after R=0x50 SCL signal (yellow) is stuck low
Detail::
------------------------------------------------------------------------------------------------------------------------------------------------------
Scope capture with 32 bit subaddress
Just after R=0x50 SCL signal (yellow) is correct
Detail:
Thanks in advance
已解决! 转到解答。
Hi @flexeos ,
Please also try our newest SDK2.11.0, whether you can reproduce the issues or not, this new version just uploaded to the website, just to check whether it can fix your issues.
https://mcuxpresso.nxp.com/en/builder?hw=EVKB-IMXRT1050
If you still have issues, just kindly let me know, I will find time to test it and analyze the detail code.
Best Regards,
Kerry
Hi @flexeos ,
Do you try the I2C driver code which is without the freertos, eg:
SDK_2_10_0_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\lpi2c\interrupt_b2b_transfer\master
Then, you send out the subaddressSize = 2, whether the issue still reproduced or not?
Do you have the logic analyzer tool? which can analyze the I2C bus, that will be more clear to check the bus data.
From your code test result, the master side is halted, you also can check the I2C register, MSR, whether some error happens or not?
Please use the baremetal I2C project try it again.
Best Regards,
Kerry
Hi @kerryzhou
We tested lpi2c_interrupt_b2b_transfer_master adapting just LPI2C instance and slave address and the result is the same with SCL stuck at zero with subaddressSize = 2
See here below the capture from logic state analyzer
I report here below status of some relevant registers:
Thanks again for your support
Hi @flexeos ,
Thanks for your information.
Please tell me which detail eeprom partnumber you are using?
You can also share me that EEPROM datasheet, I need to check it.
Best Regards,
Kerry
Hi @kerryzhou
EEPROM is CAT24C512WI-GT3
You can find datasheet here: https://www.mouser.it/datasheet/2/308/1/CAT24C512_D-2310637.pdf
In the meanwhile we adapted lpi2c_interrupt_b2b_transfer_master example and we run it on EVB to communicate to FXOS8700CQ
The result is the very same: with subaddressSize = 2 SCL is stuck at zero
Regards
Hi @flexeos ,
Thanks for your information, good. Just test it based on the NXP MIMXRT1050-EVKB and the SDK.
Just take the SDK code as an example:
SDK_2_10_0_EVKB-IMXRT1050\boards\evkbimxrt1050\demo_apps\bubble_peripheral
Which detail code point you have modified to reproduce the issues?
Best Regards,
Kerry
Hi @kerryzhou
Sorry for the delay but in the meanwhile we made many tests:
We started from these projects:
and we modified following items to be compliant with our HW:
With app evkbimxrt1050_lpi2c_interrupt_b2b_transfer_master the defect is exactly replicated as I described previously
With evkbimxrt1050_bubble_peripheral behavior is correct
Going deeply into the issue we identified that the difference is related to specific API called:
LPI2C_MasterTransferBlocking is not feasible for our application due to multithread environment
Let me know if you have some suggestions
Thanks
Hi @flexeos ,
Please also try our newest SDK2.11.0, whether you can reproduce the issues or not, this new version just uploaded to the website, just to check whether it can fix your issues.
https://mcuxpresso.nxp.com/en/builder?hw=EVKB-IMXRT1050
If you still have issues, just kindly let me know, I will find time to test it and analyze the detail code.
Best Regards,
Kerry