Remove drag2flash?

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

Remove drag2flash?

445 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaybee on Fri Mar 30 01:36:45 MST 2012
hey guys,

I have a rdb1768v2 which has a great "drag2flash" functionality, however i would like to remove this as the interrupt jams my program whenever a sd-card is inserted.

I would like to modify this part such that my program will still be able to detect a new sd card only upon a trigger. How do i remove the drag2flash function?
0 Kudos
8 Replies

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaybee on Tue Apr 03 02:00:23 MST 2012
Fixed, it was a power issue. I soldered a 1000uf e-capacitor on to the supply and ground at UH1 and now it works fine.

Thanks for pointing it out.
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Apr 03 00:00:47 MST 2012
This has all the hallmarks of being a power problem. Inserting the SD card will draw more power. Many PC's USB ports do not supply the power they advertise.

I suggest you provide external power to the board through the power connector. You might also try another USB port on your computer.
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaybee on Mon Apr 02 18:49:08 MST 2012
I performed a mass erase and created a new project with this code.

/*
===============================================================================
 Name        : main.c
 Author      : 
 Version     :
 Copyright   : Copyright (C) 
 Description : main definition
===============================================================================
*/

#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif

#include <cr_section_macros.h>
#include <NXP/crp.h>

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

// TODO: insert other include files here

// TODO: insert other definitions and declarations here

int main(void) {
    
    // TODO: insert code here

    // Enter an infinite loop, just incrementing a counter
    volatile static int i = 0 ;
    while(1) {
        printf("writing with delay\n");
        for(i=0;i<30000;i++);
        for(i=0;i<30000;i++);
        for(i=0;i<30000;i++);
        for(i=0;i<30000;i++);

    }
    return 0 ;
}


I connected my laptop on the debug usb port and set target library to be "redlib semihosting"

It has no problem running until, I insert a SD card into the slot which gives me this error.

http://img197.imagevenue.com/img.php?image=25438_error3_122_554lo.jpg

Some how every time I insert a SD card into the rdb1768v2r4, an interrupt is generated. It hangs the program.

How can i remove this function?
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Apr 02 03:17:46 MST 2012
Drag2Flash is only present on the debug connector. It is not connected in any way to the SD card. Drag2Flash *cannot* be affected by the SD card.

The RDB1768cmsis2_usb_msc example (as supplied) does not support hot-swapping of the SD card. Therefore, swapping the SD card has no affect on the mass storage device. Have you modified the example?

If you want us to help further:
- post the *exact* code you are using
- describe *exactly* what is happening. State step-by-step what you do, and the results. Describe exactly which USB ports you are using Post screenshots so we can see.
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaybee on Mon Apr 02 02:29:50 MST 2012
Yes, I think its the USB mass storage example that I tried a few months back.

Now whenever I insert an SD card, the "auto play" pops up.

I tried to use mass erase using the icon at the tool bar which was successful. But i still get the "auto play" pop up whenever a SD card is inserted
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Apr 02 01:57:38 MST 2012
Sorry, but your description makes no sense.

The RDB1768v2 board provides drag2flash functionality through the debug connection (the USB connector on the short edge of the board). This provides a mass storage interface to the PC to allow you to drag a binary file onto the board - which is copied into the flash of the main LPC1768 MCU when you press SW4 on the board. After the copy completes, the main MCU will be reset, so that this application starts running.

The drag2flash has absolutely no connection to the SD card interface of the board, which is connected only to the main LPC1768 MCU.

The only thing that I can think of here is that you have some software installed into the flash of the main LPC1768 MCU which is providing a USB mass storage interface through the USB device connector (along the long edge of the board).

But I am afraid that from the description that you have given so far, there is not really any further advice that we can provide at this stage.

Regards,
CodeRedSupport
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaybee on Sun Apr 01 19:38:48 MST 2012
Thanks for the reply.

I am trying to use the SD card as a data logger and load pictures to an external LCD, sometimes I would take out the SD card and replace it with another or reinsert the original SD card after extract the data from the SD card using a laptop.

The problem I am facing now is, when I am debugging my program, whenever an SD card is insert, the "auto play:" window pops up and my debug program hangs. I would like to remove this so i can test my application.
0 Kudos

437 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Mar 30 07:38:58 MST 2012
It is not possible to remove Drag2Flash. However, Drag2Flash is implemented in the debug portion of the RDB1768 board, and should not affect your target application in any way.

Can you explain exactly what you are trying to do, how you are trying to do it, and what the problem is.
0 Kudos