MC9S12XEP100 SPI Problem!

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S12XEP100 SPI Problem!

ソリューションへジャンプ
1,063件の閲覧回数
CIA_MAN275
Contributor III

Hello!

 

I have a question! Is the following initialization for my MC9S12XEP100 okay?

Because my SPI-Bus, which worked on my HC12 don't work on this new evaluation Board!?

 

/* Init for SPI Interface */
  PTS |= 0x80;
  DDRS = DDRS | 0xF0; /* outputs */
  SPI0CR1 = 0x58; /* 0b01011000 */
  SPI0CR2 = 0; /* Normal mode */
  SPI0BR = 0x01; /* SPI clock */

I would appreciate it, if you could give me some help for my problem!

 

Thank you!

ラベル(1)
0 件の賞賛
返信
1 解決策
719件の閲覧回数
CIA_MAN275
Contributor III

The problem belongs to a missing cable! :smileywink:

 

Now it works!

 

Thanks a lot!

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
719件の閲覧回数
LeandroLeite
Contributor II

Take a look at the MODRR (Module Routing Register) register, it redirects the SPI to alternative ports.

 

I have the same trouble in my MC9S12XET256, then I set the bit MODRR4 and it works.

 

Good Luck!

Leandro

0 件の賞賛
返信
720件の閲覧回数
CIA_MAN275
Contributor III

The problem belongs to a missing cable! :smileywink:

 

Now it works!

 

Thanks a lot!

0 件の賞賛
返信