Request for help to make ESP32 to work with 6" ePaper of ‘Dalian Good Display’

Dear Mr. Jean-Marc,

I slightly prefer to continue on this topic, as it is specific to your questions.

Sure. We shall continue here.

Any questions or suggestions for improvement are welcome.

Thank you so much.

You also need to install Adafruit_GFX. It is known to Library Manager; use "Manage Libraries..." and write "Adafruit_GFX" into the search box, then install it. Maybe this helps.

I had already installed it.

I assume you have installed GxEPD_HD library by downloading it as zip-file and using the Library manager "Add .ZIP Library…" method.

Done by "Add .ZIP Library…" method.

I am interested to learn how you get on.
Could yo compile the example, or even run it on your system?

When trying to compile (without connecting DESTM32-T to my system via ST-LINK/V2), I get the following messages:

...
Using board 'genericSTM32F103V' from platform in folder: E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\STM32F1
Using core 'maple' from platform in folder: E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\STM32F1
Detecting libraries used...
...
Alternatives for GxEPD_HD_EPD.h: [GxEPD_HD-master@0.0.4]
ResolveLibrary(GxEPD_HD_EPD.h)
  -> candidates: [GxEPD_HD-master@0.0.4]
"C:\\Users\\govin\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\arm-none-eabi-gcc\\8.2.1-1.7/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -DBOARD_generic_stm32f103v -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10810 -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103VE -mthumb -march=armv7-m -D__STM32F1__ -DARDUINO_ARCH_STM32 -DMCU_STM32F103VE -mthumb -march=armv7-m -D__STM32F1__ -DARDUINO_ARCH_STM32 "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/include" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/stm32f1/include" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/usb/stm32f1" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/usb/usb_lib" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\cores\\maple" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\variants\\generic_stm32f103v" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\libraries\\GxEPD_HD-master\\src" "C:\\Users\\govin\\AppData\\Local\\Temp\\arduino_build_515119\\sketch\\GxEPD_HD_Example.ino.cpp" -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
...
Alternatives for Adafruit_GFX.h: [Adafruit_GFX_Library@1.6.1]
ResolveLibrary(Adafruit_GFX.h)
  -> candidates: [Adafruit_GFX_Library@1.6.1]
...
WARNING: library GxEPD_HD-master claims to run on STM32 architecture(s) and may be incompatible with your current board which runs on STM32F1 architecture(s).
Generating function prototypes...
...
Compiling sketch...
...
Compiling libraries...
Compiling library "GxEPD_HD-master"
...
"C:\\Users\\govin\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\arm-none-eabi-gcc\\8.2.1-1.7/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++11 -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -DBOARD_generic_stm32f103v -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10810 -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103VE -mthumb -march=armv7-m -D__STM32F1__ -DARDUINO_ARCH_STM32 -DMCU_STM32F103VE -mthumb -march=armv7-m -D__STM32F1__ -DARDUINO_ARCH_STM32 "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/include" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/stm32f1/include" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/usb/stm32f1" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\system/libmaple/usb/usb_lib" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\cores\\maple" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\variants\\generic_stm32f103v" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\libraries\\GxEPD_HD-master\\src" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\hardware\\Arduino_STM32\\STM32F1\\libraries\\SPI\\src" "-IE:\\Users\\govin\\OneDrive\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "E:\\Users\\govin\\OneDrive\\Documents\\Arduino\\libraries\\GxEPD_HD-master\\src\\GxGDE060BA.cpp" -o "C:\\Users\\govin\\AppData\\Local\\Temp\\arduino_build_515119\\libraries\\GxEPD_HD-master\\GxGDE060BA.cpp.o"
...
Compiling library "SPI"
...
Compiling core...
...
Archiving built core (caching) in: C:\Users\govin\AppData\Local\Temp\arduino_cache_520423\core\core_436a27c3019c8637c511386479c45b85.a
Linking everything together...
...

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\libmaple/timer.c:524: warning: undefined reference to `dispatch_basic'

c:/users/govin/appdata/local/arduino15/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\govin\AppData\Local\Temp\arduino_build_515119\core\core.a(timer.c.o): in function `__irq_tim7':

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\libmaple/timer.c:528: warning: undefined reference to `dispatch_basic'

"C:\\Users\\govin\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\arm-none-eabi-gcc\\8.2.1-1.7/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\govin\\AppData\\Local\\Temp\\arduino_build_515119/GxEPD_HD_Example.ino.elf" "C:\\Users\\govin\\AppData\\Local\\Temp\\arduino_build_515119/GxEPD_HD_Example.ino.bin"
Multiple libraries were found for "SPI.h"
 Used: E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI
Multiple libraries were found for "Adafruit_GFX.h"
 Used: E:\Users\govin\OneDrive\Documents\Arduino\libraries\Adafruit_GFX_Library
Multiple libraries were found for "GxEPD_HD_EPD.h"
 Used: E:\Users\govin\OneDrive\Documents\Arduino\libraries\GxEPD_HD-master
Using library GxEPD_HD-master at version 0.0.4 in folder: E:\Users\govin\OneDrive\Documents\Arduino\libraries\GxEPD_HD-master 
Using library SPI at version 1.0 in folder: E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\SPI 
Using library Adafruit_GFX_Library at version 1.6.1 in folder: E:\Users\govin\OneDrive\Documents\Arduino\libraries\Adafruit_GFX_Library 
"C:\\Users\\govin\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\arm-none-eabi-gcc\\8.2.1-1.7/bin/arm-none-eabi-size" -A "C:\\Users\\govin\\AppData\\Local\\Temp\\arduino_build_515119/GxEPD_HD_Example.ino.elf"
Sketch uses 432824 bytes (82%) of program storage space. Maximum is 524288 bytes.
Global variables use 64104 bytes (97%) of dynamic memory, leaving 1432 bytes for local variables. Maximum is 65536 bytes.
Low memory available, stability problems may occur.

Is everything above look fine?
If yes, can I connect the DESTM32-T via ST-LINK/V2 and run once again?

What about that reset switch. Is it required?

Is there any use of "STM32 ST-LINK Utility"?

I'm a bit confused on how to move forward, as I'm new to STM32 platform.

Any guidance is greatly appreciated, please.

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

thank you for the feedback!

Is everything above look fine?
If yes, can I connect the DESTM32-T via ST-LINK/V2 and run once again?

Yes, this looks ok, you can continue. I will try to find out about the warnings, but I get the same, see post #16.

What about that reset switch. Is it required?

No, but it is handy for restarting the test, without the need to upload again, or to remove and reconnect power.

Is there any use of "STM32 ST-LINK Utility"?

I don't think you need it with your official ST-Link V2 probe.
But the cheap small ST-Link V2 devices may need a program update, this is one use of the utility.
I think you would get a warning in this case.
And I think you can use the utility to save (download) the code on the board to a file.
But I don't remember the details, I used it quite some time ago.

I think you can safely move on.

I checked to compile and upload through the small ST-Link V2, and fortunately it still worked.
But I had to use the USB connector and cable for power supply. The 5V pin from the ST-Link V2 was not enough (the red wire on my picture). Maybe because I use a 7port USB3 HUB with switches, which reduces the 5.2V from the notebook to about 4.8 or 4.9V. If the supply voltage is too low the screen refresh doesn't work or is distorted.

Supply from an external power supply may be the better option.

Good Luck!

Jean-Marc

Dear Mr. Jean-Marc,

In spite of multiple attempts, I'm unable to get connected to DESTM32-T.
Please click here to download Images that explain different scenarios I have tried.

Images A, B & C:
In these scenarios, the ST-LINK (either USB-Dongle or Probe) is recognized by the system's 'Device Manager'. However, the following appears in the console/terminal output of Arduino IDE:

No target connected. 
Unable to connect to ST-LINK!

Complete Arduino Console output of scenario 'A' is appended below, please:

....
Sketch uses 432824 bytes (82%) of program storage space. Maximum is 524288 bytes.
Global variables use 64104 bytes (97%) of dynamic memory, leaving 1432 bytes for local variables. Maximum is 65536 bytes.
Low memory available, stability problems may occur.

C:\Program Files (x86)\Arduino>rem @echo off 

C:\Program Files (x86)\Arduino>rem: Note E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ get path of this batch file 

C:\Program Files (x86)\Arduino>rem: Need to change drive if My Documents is on a drive other than C: 

C:\Program Files (x86)\Arduino>set driverLetter=E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

C:\Program Files (x86)\Arduino>set driverLetter=E: 

C:\Program Files (x86)\Arduino>E:

E:\>cd E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_515119/GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_515119\GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: ------------- use STLINK CLI 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>stlink\ST-LINK_CLI.exe -c SWD -P C:\Users\govin\AppData\Local\Temp\arduino_build_515119\GxEPD_HD_Example.ino.bin 0x8000000 -Rst -Run -NoPrompt 
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

No target connected
Unable to connect to ST-LINK!

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem:texane-stlink\st-flash.exe write C:\Users\govin\AppData\Local\Temp\arduino_build_515119\GxEPD_HD_Example.ino.bin 0x8000000

Images I, II & III:
These are different other scenarios in which the following appears in the console/terminal output of Arduino IDE:

No ST-LINK detected!

It seems that I'm missing something very fundamental. :frowning:

Any suggestion, please?

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

I decided to give you a first answer, as I don't know if you are waiting for a first answer.

It is somewhat difficult for me to analyze this issue.
Checking connections on picture is not easy, nor guessing what might be wrong.

Connection on picture A looks correct. VCC 3.3V pin 1 should not be needed, but should be ok.

On picture B I really can't see which colour wire goes to pin 7 and which to pin 9.
Pin 7 should be SWDIO, pin 9 SWDCLK.

Picture C is unconnected. I will check how upload behaves for this case.

Picture I flat cable connection. I would have expected this to work.
But the LED on the TCON-11 is off. Either there is a short on 3.3V, you could check, or the board is on constant reset condition.

Picture II is unconnected. Short or reset removed.

Picture III power disconnected. Only the USB to serial chip has power from USB with your J2 setting.

How to continue?

As we both have the mini ST-Link V2 version, we could try to get this option working.
Most likely you need to update the firmware on your mini ST-Link V2 using the STM32 ST-Link Utility. I had to do this on all my mini ST-Link.

If this doesn't work, I will try other options, e.g. Segger J-link or upload through serial.

First I will do checks on the newly installed PC, e.g. with ST-Link connected and disconnected.

Jean-Marc

Additions:

This is what I get with mini ST-Link with target disconnected:

WARNING: library GxEPD_HD-master claims to run on STM32 architecture(s) and may be incompatible with your current board which runs on STM32F1 architecture(s).
C:\Users\ZinggJ\AppData\Local\Temp\arduino_cache_37109\core\core_63d356ea1a72191c9ab7be62e3129616.a(timer.c.o): In function `__irq_tim6':

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\libmaple/timer.c:524: warning: undefined reference to `dispatch_basic'

C:\Users\ZinggJ\AppData\Local\Temp\arduino_cache_37109\core\core_63d356ea1a72191c9ab7be62e3129616.a(timer.c.o): In function `__irq_tim7':

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple\libmaple/timer.c:528: warning: undefined reference to `dispatch_basic'

Sketch uses 436040 bytes (83%) of program storage space. Maximum is 524288 bytes.
Global variables use 65200 bytes (99%) of dynamic memory, leaving 336 bytes for local variables. Maximum is 65536 bytes.
Low memory available, stability problems may occur.

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>rem @echo off 

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>rem: Note C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win\ get path of this batch file 

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>rem: Need to change drive if My Documents is on a drive other than C: 

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>set driverLetter=C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>set driverLetter=C: 

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>C:

C:\ZinggJ\Arduino\GxEPD\GxEPD_HD\examples\GxEPD_HD_Example>cd C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name 

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_850858/GxEPD_HD_Example.ino.bin 

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_850858\GxEPD_HD_Example.ino.bin 

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: ------------- use STLINK CLI 

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>stlink\ST-LINK_CLI.exe -c SWD -P C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_850858\GxEPD_HD_Example.ino.bin 0x8000000 -Rst -Run -NoPrompt 
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

No target connected
Unable to connect to ST-LINK!

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe 

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem:texane-stlink\st-flash.exe write C:\Users\ZinggJ\AppData\Local\Temp\arduino_build_850858\GxEPD_HD_Example.ino.bin 0x8000000

I tried the same on my newly installed system. I got no warning about no target connected.
There was no driver installed for this USB device.

I would have expected the driver getting installed with the standard STM32 package. But it didn't get installed.
I installed the driver using en.stsw-link009.zip, it installed fine and was ok in Device Manager as serial device. But upload doesn't work, without warning or error message.

On my work notebook I didn't ever install this driver. But I had installed the STM32GENERIC package. Maybe that's why it works. Going to install the STM32GENERIC package on my newly installed system.

Program upload through ST-Link V2 doesn't work on my new system. No idea what to do.
Maybe I try with J-Link tomorrow.

I try to get this topic updated by adding this in a new post. There seems a delay in between somewhere, if I add to an existing post.

Jean-Marc

Got one step further: ST-LINK_CLI.exe did not start because of missing msvc dlls. Had to load both:
Microsoft Visual C++ 2010 Redistributable Package (x86)
Microsoft Visual C++ 2010 Redistributable Package (x64)

now I get "No target connected" when no target is connected to ST-Link :slight_smile:

and code upload works with target connected, on my new Windows 10 i7 miniPC! :slight_smile: :slight_smile:

Before fixing the dll issue, I did 2 steps that may be needed (from wiki below):

Run the IDE, and on the Tools menu, select the Boards manager, and install the Arduino SAM boards (Cortex-M3) from the list of available boards. You must do this step, it installs the arm-none-eabi-g++ toolchain!

may not be needed if the standard STM32 package was installed already.

if using Maple or Maple mini, you need to install drivers for the Serial and DFU (upload devices). Please open a cmd window (run as administrator), navigate to the folder: /drivers/win/ and run: install_drivers.bat. Note: This doesn't actually install drivers. Windows comes pre-installed with a compatible Serial USB driver and a DFU (upload) driver. However the built in drivers need to be associated with the USB ID of the Maple serial and DFU devices. The batch file and wdi-simple.exe do the clever stuff to convince Windows 7 or newer, that it should use its drivers with the Maple serial and DFU devices.

this may be important.

Jean-Marc

Dear Me. Jean-Marc,

code upload works with target connected, on my new Windows 10 i7 miniPC!

Congrats! :slight_smile:

Run the IDE, and on the Tools menu, select the Boards manager, and install the Arduino SAM boards (Cortex-M3) from the list of available boards. You must do this step, it installs the arm-none-eabi-g++ toolchain!

Done.

if using Maple or Maple mini, you need to install drivers for the Serial and DFU (upload devices). Please open a cmd window (run as administrator), navigate to the folder: /drivers/win/ and run: install_drivers.bat. Note: This doesn't actually install drivers. Windows comes pre-installed with a compatible Serial USB driver and a DFU (upload) driver. However the built in drivers need to be associated with the USB ID of the Maple serial and DFU devices. The batch file and wdi-simple.exe do the clever stuff to convince Windows 7 or newer, that it should use its drivers with the Maple serial and DFU devices.

There is no "win" folder in "C:\Windows\System32\drivers". Created an empty "win" folder. However, I'm facing issues. CMD output is appended below:

C:\Windows\System32\drivers\win>E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\drivers\win\install_drivers.bat
Installing Maple DFU driver...
Extracting driver files...
  Success
Installing driver(s)...
  Success

Installing Maple Serial driver...
Extracting driver files...
  Success
Installing driver(s)...
libwdi:error [install_driver_internal] installer failed to respond - aborting
  Operation timed out

Press any key to continue . . .

However, tried to upload via ST-Link V2. But, issue remains same. Output of Arduino is appended below:

Sketch uses 432824 bytes (82%) of program storage space. Maximum is 524288 bytes.
Global variables use 64104 bytes (97%) of dynamic memory, leaving 1432 bytes for local variables. Maximum is 65536 bytes.
Low memory available, stability problems may occur.

C:\Program Files (x86)\Arduino>rem @echo off 

C:\Program Files (x86)\Arduino>rem: Note E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ get path of this batch file 

C:\Program Files (x86)\Arduino>rem: Need to change drive if My Documents is on a drive other than C: 

C:\Program Files (x86)\Arduino>set driverLetter=E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

C:\Program Files (x86)\Arduino>set driverLetter=E: 

C:\Program Files (x86)\Arduino>E:

E:\>cd E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_136199/GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_136199\GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: ------------- use STLINK CLI 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>stlink\ST-LINK_CLI.exe -c SWD -P C:\Users\govin\AppData\Local\Temp\arduino_build_136199\GxEPD_HD_Example.ino.bin 0x8000000 -Rst -Run -NoPrompt 
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

No target connected
Unable to connect to ST-LINK!

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem:texane-stlink\st-flash.exe write C:\Users\govin\AppData\Local\Temp\arduino_build_136199\GxEPD_HD_Example.ino.bin 0x8000000

Am I missing something?

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

I had tried to find out about prerequisites for this to work, by trying on my new (virgin) Windows 10 system. Because of the issue with the missing MSVC dlls I do not know what steps were really required.

I don't want to re-install a copy of the virgin system, to try again. So you need to check if the following 2 steps get your installation working:

1. install the ST-Link USB driver connection to the STM32 package.

Use the Windows Explorer to locate install_drivers.bat. On my system it is here:

C:\Users\ZinggJ\Documents\Arduino\hardware\Arduino_STM32\drivers\win

Right-click on install_drivers.bat and select "Run as Administrator". Confirm.

Installation should succeed.

If installation fails, you may need to uninstall the previous driver using Device Manager, selecting remove driver files.

2. Update the ST-Link firmware using ST-LinkUpgrade from en.stsw-link007.zip

I hope this works for you.

Jean-Marc

Dear Mr. Jean-Marc,

  1. install the ST-Link USB driver connection to the STM32 package.

It worked!
Installation succeeded.
Thanks a Ton!! :slight_smile:

  1. Update the ST-Link firmware using ST-LinkUpgrade from en.stsw-link007.zip

Done.

Following is the output from Arduino Terminal:

....
Sketch uses 432824 bytes (82%) of program storage space. Maximum is 524288 bytes.
Global variables use 64104 bytes (97%) of dynamic memory, leaving 1432 bytes for local variables. Maximum is 65536 bytes.
Low memory available, stability problems may occur.

C:\Program Files (x86)\Arduino>rem @echo off 

C:\Program Files (x86)\Arduino>rem: Note E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ get path of this batch file 

C:\Program Files (x86)\Arduino>rem: Need to change drive if My Documents is on a drive other than C: 

C:\Program Files (x86)\Arduino>set driverLetter=E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

C:\Program Files (x86)\Arduino>set driverLetter=E: 

C:\Program Files (x86)\Arduino>E:

E:\>cd E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_22061/GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: ------------- use STLINK CLI 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>stlink\ST-LINK_CLI.exe -c SWD -P C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin 0x8000000 -Rst -Run -NoPrompt 
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

No target connected
Unable to connect to ST-LINK!

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem:texane-stlink\st-flash.exe write C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin 0x8000000

Still not getting connected.
Any idea, please?

Note:
This is regarding N_J1 Connector (the JTag Connector to which we connect ST-LINK/V2 Dongle).
The Schematic of DESTM32-L1-11 mentions Pin#7 as JTMS and Pin#9 as TCK.
Image of N-J1 from Schematic

I have tried both the following connection combinations:
ST-LINK-V2 Dongle / Pin# on N_J1(JTag Connector)
COMBINATION#1
3.3V / 1
GND / 4
SWDIO / 5
SWCLK / 7
COMBINATION#2
3.3V / 1
GND / 4
SWDIO / 5
SWCLK / 9

But, still getting the same message in Arduino Terminal:

....
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

No target connected
Unable to connect to ST-LINK!
.....

I am always giving 5V DC power to the "DC5V Input" on DESTM32-T board.

I know, it is increasingly becoming frustrating.
Kindly see if you can help, please.

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

now I see the error:

I have tried both the following connection combinations:
ST-LINK-V2 Dongle / Pin# on N_J1(JTag Connector)
COMBINATION#1
3.3V / 1
GND / 4
SWDIO / 5
SWCLK / 7
COMBINATION#2
3.3V / 1
GND / 4
SWDIO / 5
SWCLK / 9

try COMBINATION#3
3.3V / 1
GND / 4
SWDIO / 7
SWCLK / 9

Jean-Marc

and some "modern art" I am struggling with (the vendor of)

IMG_20191206_0001.pdf (677 KB)

Dear Mr. Jean-Marc,

and some "modern art" I am struggling with (the vendor of)

It's a Benq Display, right?
Is the vendor cooperative to replace?
Hope you get a replacement soon! :slight_smile:
For what project are you using it?
Enjoy your "modern art"!
:slight_smile: :slight_smile:

now I see the error:
try COMBINATION#3
3.3V / 1
GND / 4
SWDIO / 7
SWCLK / 9

Thanks a TON!!!!!
That worked...at least the board got connected.
Thanks a lot.
:slight_smile:

Now I get the following on Arduino Terminal:

Sketch uses 432824 bytes (82%) of program storage space. Maximum is 524288 bytes.
Global variables use 64104 bytes (97%) of dynamic memory, leaving 1432 bytes for local variables. Maximum is 65536 bytes.
Low memory available, stability problems may occur.

C:\Program Files (x86)\Arduino>rem @echo off 

C:\Program Files (x86)\Arduino>rem: Note E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ get path of this batch file 

C:\Program Files (x86)\Arduino>rem: Need to change drive if My Documents is on a drive other than C: 

C:\Program Files (x86)\Arduino>set driverLetter=E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

C:\Program Files (x86)\Arduino>set driverLetter=E: 

C:\Program Files (x86)\Arduino>E:

E:\>cd E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win\ 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_22061/GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>set str=C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: ------------- use STLINK CLI 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>stlink\ST-LINK_CLI.exe -c SWD -P C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin 0x8000000 -Rst -Run -NoPrompt 
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface

ST-LINK SN: 303F09002A12354D314B4E00
ST-LINK Firmware version: V2J35S7 (Need Update)
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 3.3 V
Connection mode: Normal
Reset mode: Software reset
Device ID: 0x414 
Device flash Size: 512 Kbytes
Device family: STM32F10xx High-density

Loading file...
Flash Programming:
  File : C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin
  Address : 0x08000000
Memory programming...
�������������������������������������������������� 0%
 0%��� 6%��� 13%���� 20%��� 27%���� 34%��� 41%���� 48%��� 55%���� 62%��� 69%���� 76%��� 83%���� 90%��� 97%�� 100%
Memory programmed in 23s and 672ms.
Programming Complete.

MCU Reset.

Application started.


E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe 

E:\Users\govin\OneDrive\Documents\Arduino\hardware\Arduino_STM32\tools\win>rem:texane-stlink\st-flash.exe write C:\Users\govin\AppData\Local\Temp\arduino_build_22061\GxEPD_HD_Example.ino.bin 0x8000000

And... there is no activity on the display.
I presume GxEPD_HD_Example will display some text or image on successful completion of uploading the sketch.

Any further guidance will be very helpful, please.

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

Is the vendor cooperative to replace?

This is an ongoing story for one week now.
The vendor is obliged to, but requested to open a support ticket with benq.eu.
There seems to be an agreement between them for support cases.
But now the open ticket was refused, the ball is back to the vendor.
It is not yet clear if I need to report the case to my legal insurance.

I am glad you successfully made one step forward to use your e-paper.

You could post a close-up photo of the connection of the e-paper to the demo board.

Which connector to use and the orientation of the e-paper should be clear from one of my photos.

You need to pull out the black retainer of the connector about 1mm, then push in the flex cable, then push in the black cubes of the retainer.

The example produces diagnostic output on Serial2, the serial pins that can connect through jumpers to the USB-to-serial chip. If you connect the USB cable you can see this diagnostic output in the Serial Monitor of the Arduino IDE (115200 baud). Unfortunately the parallel IF e-papers provide no feedback on their connector.

Jean-Marc

Dear Mr. Jean-Marc,

Thanks for the guidance.

Few questions, further:

Can you kindly point out the location of the “serial pins (that can connect through jumper to the serial-to-usb chip)” on DESTM32-T, please?

Irrespective of ‘diagnostic output on serial2’, we would get to see some sort of display on the ePaper, if everything runs well. Am I right?
If yes, what is that that gets displayed?
Some text or image?

Note:
I’m travelling. Will post the “closeup photo of the connection of ePaper to demo board” tomorrow, please.

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

Can you kindly point out the location of the "serial pins (that can connect through jumper to the serial-to-usb chip)" on DESTM32-T, please?

See picture of your post #15 and my answer in #16:

D: closed, for diagnostic output through USB

Irrespective of 'diagnostic output on serial2', we would get to see some sort of display on the ePaper, if everything runs well. Am I right?
If yes, what is that that gets displayed?
Some text or image?

An example that doesn't show anything on the display wouldn't make much sense, would it? :slight_smile:

It would greet the world, show some text, then the demo from Good Display, then a partial update test, and some final text.

Jean-Marc

Dear Mr. Jean-Marc,

It's working!!

Thanks for all the guidance and support. :slight_smile:
I couldn't have achieved this without your kind help.

The problem was with the power inputs to DESTM32-T.

Final working set up is (kindly refer to yellow markers 1, 2 & 3 in the above image):

  1. For 5V Power
    From Power Adapter (DC 5V, 1.5A) to P_J7 Connector on DESTM32-T.
  2. For 3.3V Power
    From ST-LINK/V2 Dongle to N_J1 connector on DESTM32-T (3.3V to Pin1 and GND to Pin4; please note that SWDIO & SWCLK are not connected)
  3. ST-LINK/V2 Dongle

Overheating problem while providing 3.3V supply to P_J7 Connector on DESTM32-T
A.
However, the ST-LINK/V2 Dongle gets over-heated very soon and I have to disconnect it within 1 minute of connecting !!
B.
I have tried providing 3.3V from YwRobot-MB-V2 BREADBOARD POWER SUPPLY (3.3V/5V) . But, then, the AMS1117 (voltage regulator) gets overheated in no time. I powered the YwRobot board from a 12V DC (1 Amp) Adapter.

In case A above: The heat dissipation is supposed to be proportional to 1.7V (=5V-3.3V)
In case B above: The heat dissipation is supposed to be proportional to 8.7V (=12V-3.3V)
However, in both the cases same overheating is happening within a minute!

I know that it is irrelevant to discuss this here; I'll solve it myself.
However, if you can tell me how you are powering your DESTM32-T, it would be helpful.

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

Congratulations! I am pleased to get this positive feedback.

I power my board through an USB cable from an USB3 connection from my notebook, with a switchable USB3 HUB in between. I do not connect the 3.3V from the ST-Link V2 to the board.

The power jumper needs to be set for supply from USB for this, and the power switch set to the ON position.

You could check this: if the power switch is set OFF, the LED on the TCON board is off, if the power switch is ON, the LED will be on.

I didn't notice any overheating. I will check. And I will add photos.

Jean-Marc

Maximum current on 5V during refresh was about 0.45A.

Do not power through J7! This jumper can be replaced by a current meter to measure current drawn by the TCON-11.

Dear Mr. Jean-Mark,

Thanks for the constant guidance.
I have powered the board ONLY through USB Interface from 5V (1Amp) DC Adapter, and everything works PERFECT!! :slight_smile:

Now, regarding the content to be displayed...

Currently, the demo sketch demonstrates display of different aspects (like refresh types, content-types etc.). Fine.

Is it possible that we write some text in a separate content-file* (apart from the sketch), and call it from within the code of the sketch and then display?
*To start with we can have some formatted text in this content-file. However, we need to add some images too to this content-file, later on.

If yes, is it possible to dynamically change the contents of that content-file? I mean, is it possible to receive content (from some external source) through UART and replace the contents of the text-file?

If my doubts are very mundane, please don't bother yourself to explain; but then, kindly try to provide me some hints towards the direction I have to research.

I, once again, thank you very much for all the help and support.

Thanks,
Regards.
Jiva

Dear Mr. Jiva,

Currently, the demo sketch demonstrates display of different aspects (like refresh types, content-types etc.).

Yes, and it completely uses available processor RAM and ROM (flash).
You can select to see a different example by uncommenting line 30, to see some bitmap examples instead of the demo from Good Display.
You can comment line 25 and uncomment line 27 to get ~30k free RAM.

Is it possible that we write some text in a separate content-file* (apart from the sketch), and call it from within the code of the sketch and then display?

Yes, this is possible. There are several options for this:

  1. You could have the initial content in code space, and loaded new content in free RAM. You would quickly run out of RAM, especially for bitmaps.
  2. The main board has an additional RAM chip, I think it is SPIRAM, that could be used. It can be connected by adding jumpers.
  3. You could add an SD-card module. These are inexpensive and easily connected through SPI.
  4. You could add SPI-flash. I think there are modules for this, I may even have some somewhere.

All options can be easily used for showing bitmaps.

For formatted text I have no experience. You would need to decide about the format to use, and search for available interpreter library to present it.

I would be interested to learn how you intend to proceed to your final goal. Do you intend to use the DESTM32-T as a prototype or proof-of-concept, and what would be the next steps?

Good Luck!

Jean-Marc

Dear Mr. Jiva,

I have started a new topic in the Arduino Forum Displays How to render formatted text with Arduino?
I hope we will get useful hints for this.

I have searched for "jpeg" with the Arduino Library Manager and got the expected library JPEGDecoder by Bodmer I had read about in this forum.
I will try this library for big e-paper displays for b/w and grey level bitmaps.

Jean-Marc

Dear Mr. Jaen-Marc,

Thanks for the suggestions.

I would be interested to learn how you intend to proceed to your final goal. Do you intend to use the DESTM32-T as a prototype or proof-of-concept, and what would be the next steps?

Right now, my intention is to use DESTM32-T for POC (proof-of-concept). If it works, building a prototype can be thought of.

  1. You could add SPI-flash. I think there are modules for this, I may even have some somewhere.

Can you provide some details about this SPI-Flash Module, please? Any possible guidance on this module for showing bitmaps, is highly appreciated please.

I have started a new topic in the Arduino Forum Displays 'How to render formatted text with Arduino?'

That's a good initiative. Thanks.

I have searched for "jpeg" with the Arduino Library Manager and got the expected library JPEGDecoder by Bodmer I had read about in this forum.
I will try this library for big e-paper displays for b/w and grey level bitmaps.

Great. Do continue your good work.

Thanks,
Regards.
Jiva