Hi,
I was trying to use the flexi2c according to the example of I2c_Example_S32K344 on S32K344 EVB board, it is connected to another board which acts as i2c slave. In function I2c_AsyncTransmit(), it was stuck in function Flexio_Mcl_Ip_SetShifterInterrupt() which was very confusing. The driver version is SW32K3_S32M27x_RTD_R21-11_4.0.0_D2311, could you have any advice about this problem? Thanks.
The EB configuration is shown as follows,
port:
MCL:
clock:
interrupt:
i2c channel:
Solved! Go to Solution.
Thanks for your reply, the problem has been fixed, the root cause is that UART interrupt disturbs the FlexIo interrupt, thanks again.
Hi @yqs77,
Does the I2C_Example_S32K344 work without modifications? Also, the description.txt file from the example includes this line in the "connections" section:
Pull up resistors of 2.2K each, one connected between SDA, SCL and VDD (J39.13).
Could you also share which debugger is being used?
Best regards,
Julián
Yes, I used the part of I2c master in I2C_Example_S32K344, and other modules like LPUART, SPI are also used together, so the interrupt number is 11 and the priority are the same(0). The debug tool is IAR 9.50.1.
If the priority of all interrupts are 0, it stuck at the location of baseAddr->SHIFTEIEN |= (uint32)interruptMask, If the priority of FLEXIO_IRQn raised to 1, others are 0, it stuck in function of SchM_Exit_Mcl_MCL_EXCLUSIVE_AREA_42.
Besides, as description.txt file noted, does it means that the pull up resistors need to be added additionally?
Sorry, the stuck location is not correct previously, I used Trace32 to debug, the function relations are shown as follows when stuck happened.
Hi @yqs77,
Could you share a test code in order to reproduce the issue? I am not able to reproduce it with your configuration on the S32K344-Q257 EVB. Also, your configuration sets the priorities of the three interrupts to 0 (highest), please configure it accordingly to the priority needed, or, as in the example:
Best regards,
Julián
Thanks for your reply, the problem has been fixed, the root cause is that UART interrupt disturbs the FlexIo interrupt, thanks again.