Page 1 of 1

tm1637 arduino ide library issues -----SOLVED----

Posted: Wed Dec 14, 2022 3:43 am
by deg87
Hi all, it is my first post here, i'm in search of help about using TM1637TinyDisplay.h library, that is write to work whit arduino, on my stm32f103c8t6.

It compile whitout problem, but the test scketch is'nt work, i wonder if there is something i miss.

I believe (maybe i'm wrong) that if arduino ide compile a sketch it should work.

i know that i'm pretty generic in my question but i need a point to start to understand how to solve that problem.
ty to any that will help me in this task ;)

Re: tm1637 arduino ide library issues

Posted: Wed Dec 14, 2022 11:01 am
by GonzoG
If it compiles it only means that there are nos syntax errors or misspelled names.
If library, your program or TM1637 module use any hardware specific features it might not work on different type of MCU.

Eg. If it needs 5V signal it might not work with STM32 that have 3.3V.

Re: tm1637 arduino ide library issues

Posted: Wed Dec 14, 2022 5:58 pm
by deg87
I see that it is possible to make it work using cubeide, so it is not an hardware problem.
tm1637 and display is powered by 5v and mcu from 3.3v. The pins i used for CLK and DIO to control tm1637 have a pullup to 5v and they are 5v tollerant, so i tent to exlude hardware problems.

i see whit scope that in some way the pins are working, i point to timing problems or other software problem.
how can i manage to make it work?

i'm pretty noob on software side, much more on hardware side :?

Re: tm1637 arduino ide library issues

Posted: Thu Dec 15, 2022 2:01 am
by deg87
OK i manage it to work simply changing the pin i used, unfortunatly i already printed 10 pcb :roll:

I have used PB3 and PB4 that is already used by jtag :(

using PB14 and PB15 work well.

As i said i used PB3 and PB4 on printed pcb... my question at this point is, there is a way to disable Jtag function?
my intention is to use these two pins like normal pins...

:?:

Re: tm1637 arduino ide library issues

Posted: Thu Dec 15, 2022 2:22 am
by deg87
Solved :D

just put this line in setup:

Code: Select all

enableDebugPorts();
maybe it help someone :mrgreen:

Re: tm1637 arduino ide library issues -----SOLVED----

Posted: Thu Dec 15, 2022 2:25 am
by hobbya
So you have used Maple core.
If you use STM32 core, the JTAG pins PB3, PB4, PA15 will be released once you set them as output port:

Code: Select all

pinMode(PB3, OUTPUT);
pinMode(PB4, OUTPUT);
pinMode(PA15, OUTPUT);