Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Re: Re: spi debuging problem

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Re: Re: spi debuging problem - bailao - Sep 7 19:00:35 2007

Hi,

I have try your approach,but it dose not work.

Bailao  

======== 2007-09-05 19:31:00 您在来信中写道: ========

Hi,

I've also had some problem with SPI (my prog has also stuck at that

line, but not during reset), and (if I remember well) in the older

posts on this forum there's a hint for the need to add another check

before you can send the data.

You can try this:

unsigned char XferSPI2(unsigned char abyte) {

while((SPI2SR & BM_SPTEF) == 0);

SPI2DR = abyte;

while((SPI2SR & BM_SPIF) == 0);

return(SPI2DR);

}

Zoltan

--- In 6...@yahoogroups.com, "bailao" wrote:

>

> Hello All,

>

> I got a strange problem while debuging TLE6232 with SPI

Module.Please see the circuit and project in the accessory.

> The project works well while reseting by BDM from P&E,but stops at

command "while((SPI0SR & BM_SPIF) == 0) ; // wait until transfer

finished" listed in s12_spi.c when reseting by hardware reseting or

power-up reseting.

>

> Those who will try it will be great thankful!

>

> Thanks!

>

> bailao

>

> [Non-text portions of this message have been removed]

>

[Non-text portions of this message have been removed]


(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )