Hi,
I have created and MQX 4.0 project with the simple example SPI project that is available in the CodeWarrior 10.5
My kit is TWR-K60D100M with Kinetis MK60DN512 VMD10.
In "main.c", there is a section for serial memory addresses:
/* The SPI serial memory test addresses */
#define SPI_MEMORY_ADDR1 0x0000F0 /* test address 1 */
#define SPI_MEMORY_ADDR2 0x0001F0 /* test address 2 */
#define SPI_MEMORY_ADDR3 0x0002F0 /* test address 3 */
...Can you tell me if these are correct memory addresses?
The reason for asking is, when I write to those memory addresses, I receive error:
…
Enable write latch in memory ... OK
Read memory status ... 0x00
Write byte 0xba to location 0x000000f0 in memory ... done
Read memory status ... 0x00
Read byte from location 0x000000f0 in memory ... 0x00
Byte test ... ERROR
Getting statistics:
Rx packets: 8
Tx packets: 25
…
Enable write latch in memory ... OK
Read memory status ... 0x00
Page write 12 bytes to location 0x000001f0 in memory:
Hello,World!
Read memory status ... 0x00
Reading 12 bytes from location 0x000001f0 in memory:
…
Write short data test ... ERROR
…
Enable write latch in memory ... OK
Read memory status ... 0x00
Page write 16 bytes to location 0x000002f0 in memory:
ABCDEFGHIJKLMNOP
Enable write latch in memory ... OK
Read memory status ... 0x00
Page write 56 bytes to location 0x00000300 in memory:
QRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz1234567890
Read memory status ... 0x00
Reading 72 bytes from location 0x000002f0 in memory:
Write long data test ... ERROR
IO_IOCTL_SPI_READ_WRITE ... OK
Simultaneous write and read - memory read from 0x000000f0 (10):
Write: 0x03 0x00 0x00 0xf0 0x00 0x00 0x00 0x00 0x00 0x00
Read : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Simultaneous read/write (data == 0x00) ... ERROR
--------------------
Project attached.
------------------
Notes:
I built it with Freescale compiler not GCC.
My kit is TWR-K60D100M with Kinetis MK60DN512 VMD10.
My MQX: MQX 4.0 with CW: 10.5.
Added "#define BSPCFG_ENABLE_SPI_STATS 1" in "user_config.h" and rebuilt bsp/psp.
Original Attachment has been moved to: my_spi.zip