Chat freely about anything...

User avatar
By eriksl
#81641 A quick update on the progress: tonight I finished the new configuration code, which gives me an additional 8 kbytes which I need for the networking (LWIP) code to work smooth and flawlessly. Next step is to tweak LWIP config to make maximum use of it. Every now and then I see the network interface stopping responding now, and only a reset helps. This of course is unacceptable and was never the case before I changed to the LWIP interface. So I think it's somewhere in the tweaking there. Once I have that out of the way, I'll make a new release. Which will also fix the slow tcp response of the pre-release image.
User avatar
By SpYd3r Web
#81644
eriksl wrote:What is it exactly what you're experiencing? There may be a very short spike/glitch when powering on, due to SDK booting code doing all kinds of weird things with the hardware. That's something I can't prevent. Does it come "on" at all, or only after the spike?


During boot it does have a very short spike/glitch where it turns high/on then low/off, but it leaves the pin in the low/off state; I've used v19 and the v20 pre-release, same result unfortunately.
User avatar
By eriksl
#81673 Thanks for your feedback. When updating some code the other night I came across this piece of code:

Code: Select all                  case(io_pin_output_digital):
                  case(io_pin_lcd):
                  case(io_pin_timer):
                  {
                     // FIXME: add auto-on flag
                     io_trigger_pin_x((string_t *)0, info, pin_data, pin_config, pin,
                           pin_config->flags.autostart ? io_trigger_on : io_trigger_off);

                     break;
                  }

where the "FIXME" speaks for itself I'm afraid :shock: The current code does act on the "auto flag" but sends a "trigger" not an "on" event. The trigger is very useful for blinking outputs, (auto)pwm outputs etc, so simply replacing it is not the solution.

I think we can do two things here. One is that you await the fix, which may take a while, because the whole codebase is in a flux at the moment (although progress is quite good), or you use the sequencer in the meantime.

Something like this should get you going:
Code: Select allsea 0 0 0 1 0
fs auto-sequencer

This says: store at sequencer position "0": I/O "0" / pin "0" -> value "1" for "0" milliseconds (it won't turn off by itself, so duration can be zero).
Then: start the sequencer automatically after start.
User avatar
By SpYd3r Web
#81698
eriksl wrote:Something like this should get you going:
Code: Select allsea 0 0 0 1 0
fs auto-sequencer

This says: store at sequencer position "0": I/O "0" / pin "0" -> value "1" for "0" milliseconds (it won't turn off by itself, so duration can be zero).
Then: start the sequencer automatically after start.


Are sequencers used with the digital output mode or another mode? Using v20, I tried doutput, timer, and pwm modes and each attempt to use the sea/sequencer-set command resulted with "sequencer-set: error setting entry (set)".

Code: Select allim 0 0
io[0]: Internal GPIO@00
  pin:  0, mode: digital output       [hw: digital output] flags: [autostart], output, state: off, max value: 1, info:
sea
> usage: sequencer-set index io pin value duration_ms
sea 0 0 0 1 0
> sequencer-set: error setting entry (set)
ss
> sequencer
>
> running: no
> total flash size available: 16384
> total entries in flash available: 2048
> flash offset for ota image #0: 0x076000
> flash offset for ota image #1: 0x000000
> flash offset mapped into address space: 0x40276000
fs
> flags:
>
>    no strip-telnet
>       log-to-uart
>    no tsl-high-sens
>    no bh-high-sens
>    no cpu-high-speed
>    no wlan-power-save
>    no uart0-tx-inv
>    no uart0-rx-inv
>       log-to-buffer
>       auto-sequencer
>    no pwm1-extend
>    no tmd-high-sens
>    no apds3-high-sens
>    no apds6-high-sens
>    no uart1-tx-inv
>    no udp-term-empty
config-dump
flags=770 (770/770)
wlan.mode=0 (0/0)
wlan.client.ssid=XXXX (0/0)
wlan.client.passwd=XXXXXXXXX (0/0)
io.0.2.mode=1 (1/1)
io.0.2.llmode=1 (1/1)
io.0.2.flags=0 (0/0)
io.0.0.mode=3 (3/3)
io.0.0.llmode=3 (3/3)
io.0.0.flags=1 (1/1)

slots total: 160, config items: 10, free slots: 150