On Tue, Mar 7, 2017 at 7:59 PM, Kolja Waschk <urj...@ixo.de> wrote:
> Hi,
>
>> Any idea if this MEM mode would allow urjtag to treat it like an 0x378
>> parallel port:
>
> It does not seem to implement PPCLAIM/PPRELEASE ioctls, used e.g. in
> ppdev.c. So I don't think it can be used like a generic parport. There
> are other ioctls to switch between operation modes like parallel, mem,
> i2c, spi.
>
> Support for SPI might be especially interesting, as it can be used as
> JTAG under certain circumstances, e.g. if one can toggle between GPIO
> and SPI mode freely.
>
> However, support for such CH341-specific mode in UrJTAG would be either
> Linux-only (using the kernel driver you referenced) or implementing the
> functionality using libusb, as you suggested.

I found this simple SPI programmer based on libusb using D0-D5 pins:

https://github.com/hackpascal/ch341prog

The code is using those pins (UIO probably means Universal IO):

#define>CH341_CMD_UIO_STM_IN>--->---0x00>---// UIO Interface In ( D0 ~ D7 )
#define>CH341_CMD_UIO_STM_DIR>-->---0x40>---// UIO interface Dir( set
dir of D0~D5 )
#define>CH341_CMD_UIO_STM_OUT>-->---0x80>---// UIO Interface Output(D0~D5)
#define>CH341_CMD_UIO_STM_END>-->---0x20>---// UIO Interface End Command

Now if there is code for a similar JTAG cable libusb based, that might
be a good starting point.

--
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
UrJTAG-development mailing list
UrJTAG-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to