-
• #2
Hi Darius, Strange that you had trouble flashing the device - did you use the Serial Bootloader instructions? Glad you got it sorted in the end though.
Thanks for the update on the tutorial - Espruino's changed quite a lot since then and I've been trying to migrate the projects over to the new style. I'll update the code though. There's actually a Touchscreen module now that should make this even less painful.
-
• #3
Yes, I followed those instructions but I get..
[auxxoconnd1m1 10:36] ~/projects/Espruino >python scripts/stm32loader.py -p /dev/cu.usbserial -Vevw ./espruino_1v70_hystm32_24_ve.bin Open port /dev/cu.usbserial, baud 115200 Reading data from ./espruino_1v70_hystm32_24_ve.bin *** Get command Bootloader version: 0x22 Available commands: ['0x0', '0x1', '0x2', '0x11', '0x21', '0x31', '0x43', '0x63', '0x73', '0x82', '0x92'] Bootloader version 0x22 Traceback (most recent call last): File "scripts/stm32loader.py", line 561, in <module> chip_id = cmd.cmdGetID() File "scripts/stm32loader.py", line 164, in cmdGetID if self.cmdGeneric(0x02): File "scripts/stm32loader.py", line 137, in cmdGeneric return self._wait_for_ack(hex(cmd)) File "scripts/stm32loader.py", line 98, in _wait_for_ack raise CmdException("Chip replied with a NACK during %s" % info) __main__.CmdException: Chip replied with a NACK during 0x2
I'll take a look at the touchscreen module, thanks :)
-
• #4
Also, I just noticed that it says NACK during 0x2 but when I first ran it (without verbose) I got
[auxxoconnd1m1 10:35] ~/projects/Espruino >python scripts/stm32loader.py -p /dev/cu.usbserial -evw ./espruino_1v70_hystm32_24_ve.bin Reading data from ./espruino_1v70_hystm32_24_ve.bin Bootloader version 0x22 Chip id 0x414, STM32F1, performance, high-density Traceback (most recent call last): File "scripts/stm32loader.py", line 579, in <module> cmd.cmdEraseMemory() File "scripts/stm32loader.py", line 242, in cmdEraseMemory if self.cmdGeneric(0x43): File "scripts/stm32loader.py", line 137, in cmdGeneric return self._wait_for_ack(hex(cmd)) File "scripts/stm32loader.py", line 98, in _wait_for_ack raise CmdException("Chip replied with a NACK during %s" % info) __main__.CmdException: Chip replied with a NACK during 0x43
I can't reproduce it though.
-
• #5
OK, I was wrong, if I power it off for long enough I get..
[auxxoconnd1m1 10:40] ~/projects/Espruino >python scripts/stm32loader.py -p /dev/cu.usbserial -Vevw ./espruino_1v70_hystm32_24_ve.bin Open port /dev/cu.usbserial, baud 115200 Reading data from ./espruino_1v70_hystm32_24_ve.bin *** Get command Bootloader version: 0x22 Available commands: ['0x0', '0x1', '0x2', '0x11', '0x21', '0x31', '0x43', '0x63', '0x73', '0x82', '0x92'] Bootloader version 0x22 *** GetID command Chip id 0x414, STM32F1, performance, high-density Traceback (most recent call last): File "scripts/stm32loader.py", line 579, in <module> cmd.cmdEraseMemory() File "scripts/stm32loader.py", line 242, in cmdEraseMemory if self.cmdGeneric(0x43): File "scripts/stm32loader.py", line 137, in cmdGeneric return self._wait_for_ack(hex(cmd)) File "scripts/stm32loader.py", line 98, in _wait_for_ack raise CmdException("Chip replied with a NACK during %s" % info) __main__.CmdException: Chip replied with a NACK during 0x43
-
• #6
Not sure - maybe it's that some other application is also using the serial port?
Hi,
I ordered a Espruino but while I wait I thought I'd try and get it working on a Hy Mini 2.4" LCD board I got from ebay. I have some WS2812 LEDs arranged in a panel so I am trying Project 2.
I couldn't get the serial loader to work - it went into the STM boot ROM but I couldn't get it to unprotect so I used my Black Magic Probe like so..
I had to apply the following diff to get the demo code working..
To break it down..
1- Send 5 bytes so we read 5 bytes
2- Use B7 for chip select
3- Invert y position
I suspect 2 & 3 are only useful for this board, but number 1 seems like a bug in the original code - without it you only get 4 bytes so the Y coordinates are always NaN.
I haven't connected my LEDs yet, but soon :)
PS thanks for the Espruino, I am having good fun with it so far :)
Update: LEDs work, however I needed to change the baud rate in the example to 3200000 (like in the WS2811 example)