TWR-K64 Using SDHC with JTAG port

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

TWR-K64 Using SDHC with JTAG port

643 Views
adyr
Contributor V

Hi,

I am trying out various parts of the TWR-K64F120M with a TWR-SER but I can't get the SD card to work. I had it working with the TWR-K60N512 and also the TWR-K60F120M but with the K64 board I get errors.

I have tried using the MQX SDCARD sample as well as my own app but both show the same errors.

If I connect via the JTAG debugger then the error appears from the call to: fopen("sdcard:", 0); and "Unable to open SD card device" appears in the console. I think this is due to the SDHC line being shared with the trace lines of the JTAG port so I guess it is not possible to use the SD card while debugging with the JTAG port?

If I connect via the Open SDA port then it will get past that but fail at the line: error_code = _io_mfs_install(sdcard_handle, filesystem_name, (_file_size)0); unless I step through it, in which case that works but then it fails at the call to error_code = MFS_Read_device_sector(drive_ptr, BOOT_SECTOR, drive_ptr->DIR_SECTOR_PTR);

It is the same SD card that I was using in the TWR-K60N512 board.

Does anyone know what J13 does? My board has no pins so I presume it is not required.

I can also see that there are a number of zero ohm links connecting the lines to the elevator. Do these need to be removed? (I have tried the board on its own, not connected to the tower, and I see the same problem)

I have fitted the 4K7 resistor to R521 and that seems to make the WP work OK.

Does anyone know of any other jumpers need to be moved?

Has anyone got the SD card working on the TWR-K64120M?

Thanks,

Adrian.

0 Kudos
3 Replies

349 Views
apanecatl
Senior Contributor II

As long as you are using the JTAG trace (PTE0-PTE5) lines you will not be able to use the SD card example; however if you use the reduced JTAG pinout (pins 1-10) you should not have any problem.

0 Kudos

349 Views
adyr
Contributor V

Thanks Pedro, that is what I figured. I'm not sure if I can disable the trace pins on SIGNUM JTAGJet-Trace. If not I will try and get another cable that I can cut to see if that works.

Do you know of any other reasons why the SD card will not work such as jumper settings?

When using the Open SDA debug port I still can't install the file system on the card even though the driver opens.

The same example and card work fine on the TWR-K60F120M and the TWR-K60N512 (card in an adapter) so are there any known problems with the TWR-K64F120M board?

Thanks,

Adrian.

0 Kudos

349 Views
apanecatl
Senior Contributor II

Check the jumper settings again and note for the SD card example to work it is necessary to place a 4.7K  the resistor on R521.

J1, J16, J18, J19, J20, J31, J38 on position 1-2

J6, J7,J8, J22, J23, J24, J25, J26, J27, J28, J33, J31, J34, J35, J36 and J39 closed

J32 open

J29 on position 5-6 to use JTAG / 1-2 to use OpenSDA

J10 and J15 on position 2-3

0 Kudos