These are chat archives for SmingHub/Sming

26th
May 2016
johndoe8967
@johndoe8967
May 26 2016 12:49
one question, I just had a look with my scope at the basic_HwPWM and I found out that the period time is not exact (I expected 1ms and I got 1.08ms), the duty cycle doesn't reach 100% and even more problematic, there is a very short additional puls at the end of the period.
did anybody experience the same?
johndoe8967
@johndoe8967
May 26 2016 15:02
second question: I get some very strange behavior on interrupt input with Wifi enabled, sometimes the pin changes behavior and outputs a high, but only for about 100ms
this happens on GPIO0
johndoe8967
@johndoe8967
May 26 2016 15:37
ok, the second question is solved, the output driving the input was not strong enough, now with a stronger driver there is no problem at all
hreintke
@hreintke
May 26 2016 18:05
@johndoe8967 :
Did you use SmingRTOS or SmingNONOS ?
johndoe8967
@johndoe8967
May 26 2016 19:06
SmingNONOS
hreintke
@hreintke
May 26 2016 19:35
I remember the short pulse and I am sure that is not within the SmingRTOS.
Can you try that ?
johndoe8967
@johndoe8967
May 26 2016 19:41
ok, today I lost to much time, so I will try later,
but it's good to know that you remember the pulse because I think this is crucial and I will write an issue
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 19:42
@hreintke Hello! Another time try to port some app from nonos to rtos.. almost all works (looks like) except WifiAccessPoint.enable(true); as soon as this command issued appliation crashes with
mode : sta(5c:cf:7f:01:54:43) + softAP(5e:cf:7f:01:54:43)
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
Fatal exception (29): 
epc1=0x40106f3a
epc2=0x00000000
epc3=0x4024c4f5
epcvaddr=0x00000008
depc=0x00000000
�tn_add=0x40206fa2
 ets Jan  8 2013,rst cause:1, boot mode:(3,6)
hreintke
@hreintke
May 26 2016 19:42
@johndoe8967
It is not a Sming issue but from the espressif SDK.
johndoe8967
@johndoe8967
May 26 2016 19:43
@hreintke: yes, I'm aware of it, I tried to debug it, but of course no source available
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 19:45
@hreintke useless mention that in nonos same code works as a charm..
Curtis Pope
@piperpilot
May 26 2016 19:46
ewww thats good to know as accesspoint.enable(true) is an important part of my code...are you saying it doesn't work in RTOS?
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 19:48
@piperpilot may be in some other env it works, may be my local modifications to SmingRTOS cause this.. don't know just now.. but even if I change it to pure SDK wifi_set_opmode_current((WIFI_MODE)3); it crashes...
hreintke
@hreintke
May 26 2016 19:49
It is not in much examples but at least it is in DNSCaptiveportal with no issues reported.
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 19:52
@hreintke Odd thing is that even pure SDK call crashes.. :(
hreintke
@hreintke
May 26 2016 19:53
@avr39-ripe :
You mean an application with only this call and nothing else ?
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 19:54
@hreintke No, mean my app where I change WifiAccessPoint.enable(true); to wifi_set_opmode_current((WIFI_MODE)3);
hreintke
@hreintke
May 26 2016 19:56
Just to be sure Espressif RTOS SDK 1.4 ?
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 19:57
yeh.. SmingRTOS - latest with some my mods...
@hreintke this is my SmingRTOS repo https://github.com/avr39-ripe/SmingRTOS/tree/devel

@hreintke and this is app https://github.com/avr39-ripe/DragonMaster/tree/rtos

and this is problem part https://github.com/avr39-ripe/DragonMaster/blob/rtos/lib/application/application.cpp#L112 commented out to test pure SDK call, crashes either..

johndoe8967
@johndoe8967
May 26 2016 20:01
@hreintke: I found an bbs.espressif issue about the HwPWM, exactly the same problem, even with scope measurement, and also a responding solution with source code of the PWM functions
http://bbs.espressif.com/viewtopic.php?f=31&t=1378
hreintke
@hreintke
May 26 2016 20:08
@avr39-ripe :
Will do a test in my environment tomorrow.
Alexander V. Ribchansky
@avr39-ripe
May 26 2016 20:08
@hreintke Ok, thanks!
hreintke
@hreintke
May 26 2016 20:16
@johndoe8967 :
The same sdk calls are used in Sming.
As I said, within SmingRTOS I have used HwPWM for servo control first. Without the "pulse issue" you have seen.
And, as far as my pwm knowledge goes, no other "signal problems"
There is an issue in both NONOS & RTOS SDK when calling multiple pwm_start's to quick.
That is the reason for me to move to servo lib.