{"action":"created","issue":{"url":"https://api.github.com/repos/grigorig/stcgal/issues/6","labels_url":"https://api.github.com/repos/grigorig/stcgal/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/grigorig/stcgal/issues/6/comments","events_url":"https://api.github.com/repos/grigorig/stcgal/issues/6/events","html_url":"https://github.com/grigorig/stcgal/issues/6","id":124650334,"number":6,"title":"stc15f104w issue","user":{"login":"Phil67ago","id":16326974,"avatar_url":"https://avatars.githubusercontent.com/u/16326974?v=3","gravatar_id":"","url":"https://api.github.com/users/Phil67ago","html_url":"https://github.com/Phil67ago","followers_url":"https://api.github.com/users/Phil67ago/followers","following_url":"https://api.github.com/users/Phil67ago/following{/other_user}","gists_url":"https://api.github.com/users/Phil67ago/gists{/gist_id}","starred_url":"https://api.github.com/users/Phil67ago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phil67ago/subscriptions","organizations_url":"https://api.github.com/users/Phil67ago/orgs","repos_url":"https://api.github.com/users/Phil67ago/repos","events_url":"https://api.github.com/users/Phil67ago/events{/privacy}","received_events_url":"https://api.github.com/users/Phil67ago/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-03T14:09:06Z","updated_at":"2016-01-03T14:22:22Z","closed_at":null,"body":"Hi!\r\nSeems that stc15f104w is different than a standard stc15.\r\n\r\nDid some effort to figure it out... but I failed!\r\nstatus_packet is one byte too short\r\n\r\n--\r\n\r\n#### stcgal -p /dev/ttyUSB0 -D -P stc15 binary.hex\r\n\r\nWaiting for MCU, please cycle power: <- Packet data: 46 B9 68 00 2B 50 91 C5 92 B5 F7 BB 9F 00 A8 E0 D0 FF 4E 78 00 00 71 51 03 F2 94 04 06 58 B5 02 1B 20 22 26 22 80 14 10 04 CF 0F 6E 16\r\n('/usr/bin/stcgal', 9, '<module>', [\"        load_entry_point('stcgal==1.0', 'console_scripts', 'stcgal')()\\n\"], 0)\r\n('/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/frontend.py', 184, 'cli', ['    return gal.run()\\n'], 0)\r\n('/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/frontend.py', 120, 'run', ['        try: self.protocol.connect()\\n'], 0)\r\n('/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py', 761, 'connect', ['                status_packet = self.get_status_packet()\\n'], 0)\r\n('/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py', 1454, 'get_status_packet', ['        status_packet = self.read_packet()\\n'], 0)\r\n('/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py', 1231, 'read_packet', ['        self.dump_packet(packet, receive=True)\\n'], 0)\r\n('/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py', 655, 'dump_packet', ['            for item in reversed(inspect.stack()):\\n'], 0)\r\ndone\r\nTarget model:\r\n  Name: STC15F104W\r\n  Magic: F294\r\n  Code flash: 4.0 KB\r\n  EEPROM flash: 1.0 KB\r\nTarget frequency: 11.068 MHz\r\nTarget BSL version: 7.1.4Q\r\nTarget wakeup frequency: 37.317 KHz\r\nlen=37, 50 91 C5 92 B5 F7 BB 9F 00 A8 E0 D0 FF 4E 78 00 00 71 51 03 F2 94 04 06 58 B5 02 1B 20 22 26 22 80 14 10 04 CF\r\nF7 BB 9F FF\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/stcgal\", line 9, in <module>\r\n    load_entry_point('stcgal==1.0', 'console_scripts', 'stcgal')()\r\n  File \"/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/frontend.py\", line 184, in cli\r\n    return gal.run()\r\n  File \"/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/frontend.py\", line 120, in run\r\n    try: self.protocol.connect()\r\n  File \"/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py\", line 771, in connect\r\n    self.initialize_options(status_packet)\r\n  File \"/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py\", line 1662, in initialize_options\r\n    self.options = Stc15Option( status_packet[5:8] + status_packet[12:13] + status_packet[37:38])\r\n  File \"/usr/lib/python3.4/site-packages/stcgal-1.0-py3.4.egg/stcgal/protocols.py\", line 452, in __init__\r\n    assert len(msr) == 5\r\nAssertionError\r\n\r\n---------------------------------------------------\r\n\r\n#### stcgal -p /dev/ttyUSB0 -D binary.hex\r\n\r\nWaiting for MCU, please cycle power: <- Packet data: 46 B9 68 00 2B 50 91 C5 92 B5 F7 BB 9F 00 A8 E0 D0 FF 4E 78 00 00 71 51 03 F2 94 04 06 58 B5 02 1B 20 22 26 22 80 14 10 04 CF 0F 6E 16\r\ndone\r\nTarget model:\r\n  Name: STC15F104W\r\n  Magic: F294\r\n  Code flash: 4.0 KB\r\n  EEPROM flash: 1.0 KB\r\nTarget frequency: 76.068 MHz\r\nTarget BSL version: 7.1Q\r\nTarget options:\r\n  reset_pin_enabled=False\r\n  low_voltage_reset=True\r\n  oscillator_stable_delay=4096\r\n  por_reset_delay=long\r\n  clock_gain=high\r\n  clock_source=internal\r\n  watchdog_por_enabled=False\r\n  watchdog_stop_idle=True\r\n  watchdog_prescale=64\r\n  eeprom_erase_enabled=False\r\n  bsl_pindetect_enabled=True\r\nLoading flash: 249 bytes (Intel HEX)\r\nSwitching to 19200 baud: -> Packet data: 46 B9 6A 00 0D 50 00 00 36 01 F2 94 02 84 16\r\nSerial port error: read timeout\r\n\r\n---\r\n\r\n/Phil\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/grigorig/stcgal/issues/comments/168501251","html_url":"https://github.com/grigorig/stcgal/issues/6#issuecomment-168501251","issue_url":"https://api.github.com/repos/grigorig/stcgal/issues/6","id":168501251,"user":{"login":"zerog2k","id":3943170,"avatar_url":"https://avatars.githubusercontent.com/u/3943170?v=3","gravatar_id":"","url":"https://api.github.com/users/zerog2k","html_url":"https://github.com/zerog2k","followers_url":"https://api.github.com/users/zerog2k/followers","following_url":"https://api.github.com/users/zerog2k/following{/other_user}","gists_url":"https://api.github.com/users/zerog2k/gists{/gist_id}","starred_url":"https://api.github.com/users/zerog2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerog2k/subscriptions","organizations_url":"https://api.github.com/users/zerog2k/orgs","repos_url":"https://api.github.com/users/zerog2k/repos","events_url":"https://api.github.com/users/zerog2k/events{/privacy}","received_events_url":"https://api.github.com/users/zerog2k/received_events","type":"User","site_admin":false},"created_at":"2016-01-03T14:22:22Z","updated_at":"2016-01-03T14:22:22Z","body":"Try -P stc15a\r\nThis changed for me recently as well on stc15f204ea "}}