[ECOS] SPI interface does not work with Viper & AdderII running eCos

Paul Randall prandall@delta-info.com
Thu Oct 2 15:02:00 GMT 2003


Hi All,

I recently wrote an eCos driver for the PowerQUICC SPI interface. It 
works great on a A&M Viper with a MPC860T processor. Unfortunately, it 
does not work on the AdderII modules (which use a MPC852T processor) or 
a Viper I have fitted with a XPC866T processor.

The driver code is attached to this e-mail. When the driver tries to 
send the first buffer of data (spi_write in spi.c) and it tries to start 
the transmission (line 392 of spi.c):

eppc->spi_spcom = QUICC_SPIC_STR;

At this point, my Insight debugger loses contact with the board. I have 
a feeling that either the board is locking up or the debug output is 
getting stepped on somehow.

I noticed in the MPC866 manual (which applies to both the MPC852T and 
MPC866T) there is a note on page 18-10 which says:

The entire dual-port RAM should be cleared as the first step in
system initialization. This step should be followed by issuing a
CPM reset using the CPCR. Only after these two steps should
the dual-port RAM be programmed for speci.c CPM
functions.

This note is not in the MPC860 manual. Is this procedure followed in the 
Viper and AdderII initialization code for eCos? If not where should it 
be done? Should it be done in RedBoot as well?

I also noticed that the SPI and I2C parameter RAM areas can be 
relocated, which was not the case with the MPC860T. Do I need to do that 
to get the SPI interface to work? Or, is it possible the SPI RAM area is 
inadvertently being relocated by a bad value in the SPI_BASE (offset 
0x1DAC0x1DAD from the dual port RAM base)? Is the SPI_BASE value being 
initialized properly? Is this why the procedure above was added to the 
MPC866 manual?

Any suggestions would be greatly appreciated.

Best regards,

Paul Randall
Delta Digital Video
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: spi.c
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20031002/6461d638/attachment.c>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


More information about the Ecos-discuss mailing list