hardware bug?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

hardware bug?

976 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gjzxwht on Thu May 28 07:14:28 MST 2015
LPC1788 208
I2C0 for RTC,SPI for FALSH,hardware interrupt.
just I2C,is ok;just spi,is ok.
If i read RTC,and read data from flash through spi whiletime,i2c's state machine run wrong sometimes.
the I2C sequence of read RTC is:
1 send "start" ok ,the status of I2C0 is 0x08
2 send "slave addr+W" ok, the status is 0x18
3 send "addr" over,  the status is 0x28,
4 send " Resart",most of time,the status is 0x10,and is right ,but maybe 0x28 occasionally.
-------
if i just resd RTC ,is ok.
who can tell me why?
Labels (1)
0 Kudos
Reply
2 Replies

812 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gjzxwht on Thu May 28 22:25:05 MST 2015
I2C pull up resistors  is ok
SPI is SPI1 
program is in the attached file.
run FlashSaveChk() in flash.c quickly,i2c's state machine maybe wrong.
thank you very much!
0 Kudos
Reply

812 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Thu May 28 11:55:43 MST 2015
need more info.
Do you have I2C pull up resistors?
you say I2C0 but not say which SPI?
please show the code where you set up pin configurations
0 Kudos
Reply