setWatch(function() #343
Replies: 15 comments
-
Posted at 2014-01-16 by @gfwilliams Which board do you have? It works on the Espruino board (although you have to change LED4 to LED3). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-16 by Frida Sorry, I forgot that, it is a stm32f3discovery. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-16 by JumJum works fine on my stm32f4Discovery with nightly build from 13th of Jan |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-16 by Frida Yes, and mine is: Although I have inserted a print ("asdf"); instead of LED4.set();, it does not work. I found my old 1v41 and it works! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-17 by @gfwilliams Hi Frida, Thanks, it's a big help knowing it's setWatch that's broken on the F3. I'm crazy busy at the moment so I don't know when I'll be able to fix it. I've created a bug for it (espruino/Espruino#183), and there's always the 'nightly' builds that you could try: https://espruino-nightly.noda.se/ 1v41 was released on 18th Oct, so it might be worth trying to narrow it down and see when it broke. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-01-17 by Frida Please, take your time, I play with my F3 until I get my Espruino'.s. I found out that the nightly build of 2013-12-09 works, but the nightly build of 2013-12-10 does not work. Inside it says 1v43. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-17 by Frida If I make setWatch twice or more, I get the function double or more, when I hit the button.
If I made it with this, I get a fault, because both pins, start with 1, but are different ports.
If I chance that line I get the error if I made 2 with the same pin nr. in jswrap_io.c
to:
But C is very difficult for me, so would it be possibly to check on the ports also? It can wait to after the kickstarter is over. I am still chasing the fault on my stm32f3discovery. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-18 by @allObjects Weird that same port same pin does not bother firmware, but same pin of different ports does. Multiple watches on the same pin - with different setups - could have some advantages. One watch could be the counting the changes, two others the rises and falls, and three more the first changes. To make that possible, all would have to be in the firmware. If the hardware has to be setup, then different setups are contradictory, and the last setup would win. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-19 by @gfwilliams I think this is expected behaviour. The hardware only has 16 IRQ lines, for pins So if you're watching A1, that's fine. You can add multiple watches because the IRQ is being used already for that pin. But you can't watch both A1 and B1. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-19 by @allObjects
explains a lot... and: No matter what power to the software, hardware shines trough! @gordon, are these 16 IRQ lines a) dedicated 16 interrupts? - or b) do they come out of a pool of interrupts? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-19 by @gfwilliams They're kind of dedicated. Some have their own IRQ, but some of them share an IRQ. All 16 can be active. You'd have to check the datasheet for exact details, but they shouldn't matter. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-20 by Frida Well now I success. I found the error in: I have changed the following lines:
The fault is in section 3: it vent 1,2,4 and should be 0,1,2. I hope you can integrate it in the next version. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-21 by @gfwilliams Wow, thanks! I won't get this in today as I'm busy, but I'll try and get it in soon.
Really? Were you compiling with optimisation, as JSH_PIN0 should have got optimised out.
It'll break everything that's not an F3-based part, but I'll #ifdef it in there for the STM32F3 :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-25 by Frida
I have only changed these two lines in Makefile. I can wait till after I get the Pico's. Right now I have it running. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-01-26 by @gfwilliams I've now updated GitHub with your changes - thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-01-16 by Frida
setWatch(function() {
LED4.set();
}, BTN1, {repeat:true});
It worked in ver. 1.41, but not in ver. 1.45.
Is there another way to write it now?
Beta Was this translation helpful? Give feedback.
All reactions