Go Down

Topic: Assert reset from LabView... (Read 852 times) previous topic - next topic

bre1

Hi, I have an Arduino Due, using it as an Sram tester...I know when the serial monitor is invoked it asserts reset (~100ms). I am trying to figure out the control to accomplish this reset in LabView (with serial monitor closed).

What command or pin assertion accomplishes this? I have been trying through trial & error with no luck so far.

Otherwise having fun with it!

MarkT

Have you tried the RESET pin?
[ I won't respond to messages, use the forum please ]

chriskner

You could monitor an available input pin, and trigger this routine in your code.

The hardware reset pin will always work though (and is probably a better choice)....

Code: [Select]
//key to allow software reset in RSTC_CR
const int RSTC_KEY = 0xA5;

// **** Z ****
// required parameters: none         // Software reset the processor
// Note: This will also terminate the current socket connection.
void Z_Reset_Processor(){
  DBG_PRINTLN("RESET command received from client.  Rebooting NOW!");
  RSTC->RSTC_CR = RSTC_CR_KEY(RSTC_KEY) | RSTC_CR_PROCRST | RSTC_CR_PERRST;
  while (true);
}


-Chris

bre1

Thanks, I know I can use the reset pin, but I am looking for a software solution (the pins I was referring to was dtr, cts etc.). The above function works (thanks!), but as the note says, it breaks the connection.

The basic question is; how does the arduino software assert reset? I was hoping someone could save me the trouble of rooting through the arduino source code.

Thank you.

dlloyd

#4
Jan 24, 2014, 05:52 pm Last Edit: Jan 24, 2014, 06:02 pm by dlloyd Reason: 1
Check the schematic ... the "MASTER-RESET" signal is connected to both the SAM3X and the ATMEGA16U2-MU ... the ATMEGA will break your connection. Looks like a hardware modification is required.

Curious if your using the NI-VISA component to communicate to the serial port or a DLL function. I've had success with LabVIEW using FTDI's D2XX DLL for communication.
Electricity is really just organized lightning - George Carlin

Go Up