> > >/ On Sun, Jan 17, 2010 at 9:58 PM, simon qian <simonqian.openocd at > >gmail.com <https://lists.berlios.de/mailman/listinfo/openocd-development>> > >wrote: > />/ > The very first command after init command should be "read target > voltage". > />/ > />/ I would like the patch to have a comment *why* this should be > />/ the first command. > />/ > />/ What happens if it is not? > / > That was my question too. :) > > Does versaloon not work properly without this? > Checking the VREF is a good thing to do before anything else with JTAG link, or any other SWD link. This can certify the target is powered and/or the JTAG cable is connected.
This can be implemented for Amontec JTAGkey and Amotnec JTAGkey-2 since the Amontec JTAGkey layout returns the VREF_CHECKED_N signal on the ft2232 port A. The advantage of a signal VREF_CHECKED_N over a Target voltage is that the software do not need to convert a voltage value to a binary value. The Amontec JTAGkey and Amontec JTAGkey-2 will return 0 on VREF_CHECKED_N (checked) if voltage is between 5.5V and 1.3V ? On Amontec JTAGkeys, the JTAG link works without checking the VREF_CHECKED_N, but integrating a VREF check in the soft will make the powerup sequence more robust and more convenient for the user. What happen if the user forget to connect the JTAG emulator and the Target board ? Actually, we receive an error as the JTAG description is not correct. With integrating VREF_CHECKED_N, OpenOCD will say : "Please check your JTAG connection. Amontec JTAGkey-2 is not connected to the Target board, or the Target board is not powered" Also on the Amontec JTAGkey and Amontec JTAGkey-2, the SRST_N Value can be read, this could make sure the target is not reseted by the user before starting the JTAG link, but this is not really interesting ! VREF is ! Regards, Laurent http://www.amontec.com _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
