SD Card SPI mode w/ FRDM KE-02Z (if possible?) with KDS and GCC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SD Card SPI mode w/ FRDM KE-02Z (if possible?) with KDS and GCC

1,012 Views
diegomarcelocro
Contributor II

Anyone have an example to make work an SD memory with FRDM KE-02 ...... thank's

0 Kudos
6 Replies

654 Views
diegomarcelocro
Contributor II

Hi Erich... I Don't use a FRDM board I'm use the processor (MKE02Z64VQH2) I'm from Argentina... an there isn't parts for choose.... I need work with it!....

0 Kudos

654 Views
mjbcswitzerland
Specialist V

Hi

Your processor is (essentially) the same as used on the FRDM-KE02Z board (20MHz with 64k Flash) so you can use that board as basis.

Note that you don't need to be frightened of the uTasker solution which immediately gives you all that you need just because it is a professionally supported solution - it is also free for anyone who can't afford or doesn't need the personal support; in fact general support is still available in this forum to every one anyway.

Reards

Mark

0 Kudos

654 Views
diegomarcelocro
Contributor II

Thank's Mark... I learn abouth uTasker....

0 Kudos

654 Views
BlackNight
NXP Employee
NXP Employee

Hi Diego,

I do not have a FRDM-KE02Z board, but I have put together quickly a project with FatFS running bare metal (no RTOS). It is available attached and on GitHub here: mcuoneclipse/Examples/KDS/FRDM-KE02Z/FRDM-KE02Z_FatFS at master · ErichStyger/mcuoneclipse · GitHub

Again, as I don't have a board, I was not able to verify it. Steps to add FatFS to a project are described in https://mcuoneclipse.com/2014/05/26/tutorial-data-logger-with-the-frdm-k64f-board/  and apply very much to the KE02 too.

On the KE02Z the SPI chip select signal cannot be turned off. Don't use that CS signal, instead use the select signal of the SD_Card component, as configured in that project. So depending on your SD card connections, you only would need to change the SPI and SS signals. I have used the FRDM-KE02Z as base, but this board is marked as 'obsolete' e.g. at Mouser. I see if I can order one of the FRDM-KE02Z40M which seem to be the newer one.

I hope this helps,

Erich

0 Kudos

654 Views
mjbcswitzerland
Specialist V

Hi

I have attached binary files for FRDM-KE02Z40M and FRDM-KE02Z and SD card (build with KDS and GCC).

In both cases the SD card can be connected using the following pins:

        // - SPI0_CS  PTE-3 (J9-7) [VDD J9-4 / 0V J9-14]

        // - SPI0_SCK  PTE-0 (J9-1)

        // - SPI0_MOSI PTE-1 (J9-3)

        // - SPI0_MISO PTE-2 (J9-5)

There is a DOS-like interface on the OpenSDA virtual COM port UART which allows the SD card to be manipulated. Eg.

  Disk interface

===================

up          go to main menu

info        utFAT/card info

dir          [path] show directory content

dird        [path] show deleted directory content

dirh        [path] show hidden content

infof        [path] show file info

infod        [path] show deleted info

cd          [path] change dir. (.. for up)

file        [path] new empty file

write        [path] test write to file

mkdir        new empty dir

rename      [from] [to] rename

trunc        truncate to [length] [path]

hide        [path] file/dir to hide

unhide      [path] file/dir to un-hide

prot        [path] file/dir to write-protect

unprot      [path] file/dir to un-protet

print        [path] print file content

del          [path] delete file or dir.

undel        undelete [name]

format      [-16/12] [label] format (unformatted) disk

fformat      [-16/12] [label] full format (unformatted) disk

re-format    [-16/12] [label] reformat disk!!!!!

re-fformat  [-16/12] [label] full reformat disk!!!!!

sect        [hex no.] display sector

help        Display menu specific help

quit        Leave command mode

D:\>dir

Directory D:\

---- 26.10.2015  12:00 <DIR>            dir1

---A 26.10.2015  12:00              256 M21.txt

1 files with 256 bytes

1 directories, 4115939328 bytes free

This is available at http://www.utasker.com/kinetis.html and will work on most Kinetis parts and IDEs without needing any porting effort. utFAT documentation at http://www.utasker.com/docs/uTasker/uTasker_utFAT.PDF

and the project, processor and SD card can be simulated in (approx.) real time as shown below.

Regards

Mark

pastedImage_0.png

0 Kudos

654 Views
diegomarcelocro
Contributor II

I need work without the uTasker..... with  McuOnEclipse Components if its possible.....

0 Kudos