MC9S08LG32 cannot change register value

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

MC9S08LG32 cannot change register value

722件の閲覧回数
navry
Contributor I

Hello everyone

 

I'm trayin setup SPI on MCU MC9S08LG16 and i cannot set any register from SPI registers. When i setting SPIC1 value to 0xD0 by code, nothing change. SPIC1 have 0x04 from begin program. When i traying change this value in debug mode in memory window or in register map, not work it. After hit on enter value stay on 0x04.

 

I use Codewarrior 6.1.

Please, can you help my anybody to explain this problem?

 

Thank you very much.

ラベル(1)
0 件の賞賛
3 返答(返信)

418件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Michal Navratil:

Your question is in general space with very low visibility. Please move it to Classic/Legacy CodeWarrior to gain more attention.

About posting in the right place, check the next document by colleague Denisse: Where to post a Discussion?

Regards!

Jorge Gonzalez

0 件の賞賛

418件の閲覧回数
navry
Contributor I

Hi Jorge Gonzalez

Thanks for the warning. A did it now :smileyhappy:

Greeting

Michal Navratil

0 件の賞賛

418件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Michal Navrátil,

Maybe the SPI registers cannot be set because the Bus clock to the SPI module was not enabled, please try to enable it with the next instruction and then try to set the SPI registers:

SCGC2_SPI =1; // This bit controls the clock gate to the SPI module

You can find more information about the System Clock Gating Control 2 Register (SCGC2) on the page 91 of the User Manual:

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/MC9S08LG32RM.pdf

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛