Hi Zhaohong,
Wish you had a good holiday!
Back to my project I asked help earlier. After a few days efforts, I still did not solve my problems.
I tried the suggestions and saw some example codes. I did not see any issue in my codes, but the problems still there.
(1) for the SCI port. The receiving does not work. Transmitting works well. I tried LIN mode, it showed same thing.
I'd like you to help explain the bit-2 of the SCI flag register, it says "IDLE".
In my case, in SCI mode, as long as set and enable peripheral power as below
/** - Enable Peripherals */ CLKCNTRL_bit.PENA = 1U;
The SCI flag register bit2 was set as "1". and never changed no matter whatever tried.
Base on the ref manual (page 1413), IDLE='1' means "the idle period has not been detected, the SCI will not receive any data".
It also mentioned one of below events occur can make SCI enters the idle state - (1) system reset, (2) power down, (3)SCI software reset, (4) RX pin is configured as GP I/O pin.
But - I tried (3) and (4), they can not clear the "IDLE" status.
* However, if I set to LIN mode, this bit was cleared. But I still can not receive data so far.
(2) the I2C module, I still can not access the I2C registers. As suggested, using disassembly step by step, I can see the register address is the one listed in datasheet.
the base address is 0XFFF7D400
I possible, I'd like to talk to you for details. My #713-272-4503.
Thanks,
Yanzhong