Hi CesarM
I've just received the MRB with the correct chip. Now I'm testing the firmware you linked me, but I think there's a wrong configuration.
In project options, why target device is Freescale MKL25Z128xxx4? Chip configuration is different! In derivative.h there is:
#include "MKL25Z4.h"
In this way, SPI doesn't work: debug stops at WaitSPITxBufferEmpty. I discovered that SPI registers configuration are different: SPI data register of MKW01, or MKL26, is at 0x40076000, while in MKL25Z4 is declared at 0x40076004. Indeed
typedef struct SPI_MemMap {
uint8_t C1; /**< SPI control register 1, offset: 0x0 */
uint8_t C2; /**< SPI control register 2, offset: 0x1 */
uint8_t BR; /**< SPI baud rate register, offset: 0x2 */
uint8_t S; /**< SPI status register, offset: 0x3 */
uint8_t RESERVED_0[1];
uint8_t D; /**< SPI data register, offset: 0x5 */
uint8_t RESERVED_1[1];
uint8_t M; /**< SPI match register, offset: 0x7 */
} volatile *SPI_MemMapPtr;
So I corrected manually these struct, replacing it in my header file, and adding
#include "MKL26Z4.h"
But now debug stops at WaitSPIRxBufferFull, so waiting
while(!(SpiRegs->S & SPI_S_SPRF_MASK));
Is there something wrong or I'm missing something?
Thank you
Mirco