{"id":858,"date":"2017-08-13T21:09:41","date_gmt":"2017-08-14T02:09:41","guid":{"rendered":"http:\/\/jimlund.org\/blog\/?page_id=858"},"modified":"2017-08-16T20:45:23","modified_gmt":"2017-08-17T01:45:23","slug":"cy7c68013a","status":"publish","type":"page","link":"https:\/\/jimlund.org\/blog\/?page_id=858","title":{"rendered":"CY7C68013A"},"content":{"rendered":"<p><strong>CY7C68013A<\/strong><\/p>\n<p>Plug it in and check dmesg:<br \/>\n<code>[6780403.023743] usb 3-8: new high-speed USB device number 83 using xhci_hcd<br \/>\n[6780403.039899] usb 3-8: New USB device found, idVendor=0925, idProduct=3881<br \/>\n[6780403.039902] usb 3-8: New USB device strings: Mfr=0, Product=0, SerialNumber=0<\/code><\/p>\n<p>Program on a linux machine (<a href=\"http:\/\/www.cypress.com\/knowledge-base-article\/using-cyusblinux-gui-devices-custom-vidpid-kba91950\">link<\/a>), also <a href=\"pics\/cyusb_linux_programmers_guide.pdf\">cyusb_linux_programmers_guide<\/a>:<br \/>\ncd cyusb_linux_1.0.4<\/p>\n<p>Add line to configs\/cyusb.conf:<br \/>\n<code><VPD><br \/>\n0925    3881            Clone Cypress USB device<br \/>\n04b4    8613            Default Cypress USB device<\/code><\/p>\n<p>Add line to configs\/88-cyusb.rules:<br \/>\n<code>KERNEL==\"*\", SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", ACTION==\"add\", ATTR{idVendor}==\"0925\", MODE=\"666\", TAG=\"cyusb_dev\", RUN+=\"\/usr\/local\/bin\/cy_renumerate.sh A\"<\/code><\/p>\n<p>Install: .\/install.sh <\/p>\n<p>Now run it and<br \/>\nbin\/cyusb_linux <\/p>\n<p><img decoding=\"async\" src=\"pics\/cyusb_linux.2017.png\" alt=\"cyusb_linux 2017\" \/><\/p>\n<p>Program with PSOC4_swd_programmer\/FX2LP\/swd.iic, messages:<br \/>\n<code>Found C2 Load IIC format file<br \/>\nReleasing FX2 CPU from reset<br \/>\nSignal 10 (=SIGUSR1) received !<br \/>\nNo of devices of interest found = 1<\/code><br \/>\n-Worked!<\/p>\n<p>Now use it to program the  CY8C4245PVI-482 (32 kb flash)<br \/>\n<code>cd PSOC4_swd_programmer\/PC<br \/>\nmake<br \/>\n.\/swd-prog -y Tarocco.hex 2&> usb.logy Analyzer<\/code><\/p>\n<p>-Gave an error.  Turns out swd-prog thinks the file is the last argument is the file and the &#8216;2&#8217; was the last arg.  And should be just &#8216;&#038;>&#8217;.  Edit swd_prog.cpp.  Not really necessary, but avoids problems.<\/p>\n<p>Change:<code><br \/>\n      fileIdx = idx;<\/code><br \/>\nto:<code><br \/>\n      if (fileIdx == -1) { fileIdx = idx; }<\/code><br \/>\nand make:<br \/>\n<code>g++    -c -o swd_prog.o swd_prog.cpp<br \/>\ng++ -o swd-prog HexFileParser.o ProgrammingSteps.o swd_prog.o LibUSB.o -lusb-1.0<br \/>\n<\/code><\/p>\n<p>Now runs:<br \/>\n<code>.\/swd-prog -y Tarocco.hex &> usb.log<\/p>\n<p>Acquring device...done<br \/>\nVerifying chip ID...done<br \/>\nErasing flash...done<br \/>\nChecking flash checksum...done<br \/>\nProgramming...done<br \/>\nVerifying...done<br \/>\nVerifying final checksum...done<br \/>\nSUCCESS<\/code><\/p>\n<p><strong>Burning firmware on a Mac \/ OS X<\/strong><br \/>\nHaven&#8217;t tried this:<br \/>\n<a href=\"https:\/\/hackaday.io\/page\/2915-burn-firmware-cy7c68013a-on-a-mac-nightly-brain-dump\">Flash and use the CY7C68013A module with sigrok on a mac<\/a><\/p>\n<p>Motor Testing<br \/>\nPittman 9413D319 3140-0665 19.1V, <a href=\"http:\/\/www.genapro.com\/cnc_misc.htm\">encoder pinout<\/a>, <a href=\"pics\/Pittman_motor_3140-0665.jpg\">img<\/a><br \/>\nTested encoder, works!  Motor runs at 3.3V, 5V.<\/p>\n<p>Mot<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CY7C68013A Plug it in and check dmesg: [6780403.023743] usb 3-8: new high-speed USB device number 83 using xhci_hcd [6780403.039899] usb 3-8: New USB device found, idVendor=0925, idProduct=3881 [6780403.039902] usb 3-8: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Program on a linux machine (link), also cyusb_linux_programmers_guide: cd cyusb_linux_1.0.4 Add line to configs\/cyusb.conf: 0925 3881 Clone Cypress [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-858","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/pages\/858","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=858"}],"version-history":[{"count":8,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/pages\/858\/revisions"}],"predecessor-version":[{"id":868,"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/pages\/858\/revisions\/868"}],"wp:attachment":[{"href":"https:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}