Hello, I am using a 9S12E64 MCU as SPI Slave and another MCU (non-Freescale) as Master. The Master treat 9S12E MCU as an EEPROM (ST95040). I used SS bean with CW4.6 to generate SPI code (SS1 Module). There was any data to be received and sent. Attached is my code.
- SPICR1 was initialized as EC in main() when running step by step, SPICR1 = EC, SPISR = 20 (change to 00 late), and SPIDR = 00. when running fully SPICR1 = 04, SPISR = 20, and SPIDR = 00.
- Are enable Interrupt (SPICR1=140) and disable Interrupt (SPICR1=12) needed in the Main() code?
- Function SS1_SendChar(SS1_TComData Chr) be called at Main() but nothing happend with SPIDR.
- Function SS1_RecvChar(SS1_TComData *Chr) be called at Main() but nothing happend with SPIDR.
Thanks for hlep.