2023-02-09 05:44 PM
After IIC module is initialized, when I prepared the data and to write the IBCR register to send it, after the register is written with the value 0x70(master mode, tx mode, interrupt enable and generate START condition), the value read from the IBCR is 0x50. Who can tell me what's wrong?
Thanks!
Solved! Go to Solution.
2023-02-13 08:07 AM
Hello ,
You should check the fonction IICB_vSetControlReg
Which debugger do you use ?
TRACE32 or PLS ?
i recommend you to switch in assembler mode ..
sometimes , there is a misalignment of the hex file and source code file.
Best regards
Erwan
2023-02-13 08:07 AM
Hello ,
You should check the fonction IICB_vSetControlReg
Which debugger do you use ?
TRACE32 or PLS ?
i recommend you to switch in assembler mode ..
sometimes , there is a misalignment of the hex file and source code file.
Best regards
Erwan
2023-02-14 07:10 PM
Hello Erwan
Thanks a lot for your answer!
My debugger is MULTI. And the function IICB__vSetControlReg is defined as below:
#define IICB__vSetControlReg(u8Ch, a) REG_WRITE8((IIC0__nBaseAddress+IIC__nCtrlRegOffset), a)
#define REG_WRITE8(address, value) ((*(volatile uint8*)(address))= (uint8)(value))
I followed your suggestion to debug in assembler mode. The result is confused!
Please see the debugger information as the attached image shows
What possible reasons can cause the register IBCR to fail to write?
Best regards!