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.
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
Hi Jorge Gonzalez
Thanks for the warning. A did it now :smileyhappy:
Greeting
Michal Navratil
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!
-----------------------------------------------------------------------------------------------------------------------