Post Go back to editing

ADuC7021 setting SPICON phase prevents boot

Category: Hardware
Product Number: ADUC7021

I have an ADuC 7021 microprocessor with SPI configured like:

GP1DAT|=0b11010000U<<24U; // set bits OUT
SPIDIV=0x03; // 5mhz
 SPICON=0x1043; // configure SPI
 GP1CON|=0x02020000; // switch to SPI mode
SPITX=trimpotStep; // tell it to send the data bits
while((SPISTA&0x04)==0x00) {} // wait for send complete

It runs and writes to SPI ok, except the device I am talking to triggers on the rising edge of the clock so I want to switch the phase.
SPICON=0x1047;

But when I do so, the processor locks up.

Is there something else that needs to be changed to allow this to work?

Thread Notes

Parents Reply Children