Actual status of port for ESP32

Posted on
  • Christmas time is comin soon.
    That's a good time to report actual status of Espruino on ESP32.

    • ESP32 tree in Espruino on github
    • standard Espruino compiled and got it running (@nkolban)
    • WIFI handling added (@nkolban)
    • SPI compiled with Arduino Sources (@nkolban)
    • interrupt handling for gpios, to support setWatch (@jumjum123)
    • switch polling of console to interrupt driven handling (@jumjum123)
    • one wire implemented and tested with DS18B20 (@wilberforce)
    • I2C compiled with Arduino Sources and tested (@wilberforce)
    • ADC and DAC running with new driver for specified pins (@jumjum123)

    No drivers are available for I2C and SPI in esp-idf yet.
    Therefore we have to live with Arduino sources right now.
    Esp-idf is under heavy construction.
    Sometimes even a simple call of a function changes its parameter sequence.

    Actual status of Espruino for ESP32 is

    • available mainly for developer, it is extremly simple to build
    • first docs are available on github under targets/esp32/doc
    • needs testing, testing, testing
    • waiting for driver for I2C, SPI, BLE, etc. etc. in esp-idf to replace Arduino sources
    • PWM needs to be implemented
    • expect surprises, like not linear ADC
  • @JumJum and @Kolban, a great great thanks for all the bit-sweat you put into this ESP32 thing...

    From what I hear is that the platform is still quite fare from baked - less from prime time. I'm surprised about the high demand of the device despite this fact. Good to hear though that building is extremely simple... (for the ones that already 'suffered' through the growing pain of setup...).

  • This sounds great! Have you managed to get a proper interrupt/timer based UtilTimer?

    That would enable a whole bunch of things, like waveforms and software PWM

  • UtilTimer, hmm not available yet.
    In my understanding, period in jshUtilTimerStart is given as a 64 bit value in microseconds, correct ?
    And there is only one call at a time, no new call during "wait for interrupt" ?

  • Pretty much:

    The time value given to jshUtilTimerStart depends on the platform though. See jshGetMillisecondsFromTime to figure out what the number actually represents.

    You can call the IRQ handler at a time less than the 64 bit value, so if your timer can't go up that far (which is likely) just call it after the max time period it can handle.

    The point is that the IRQ handler should run in an IRQ, so potentially over the top of JS code that is executing

  • @JumJum

    Couple of corrections...

    The spi Neil added were just stubs, I have fleshed them out properly, and tried to get working with a Nokia display - no success yet, but getting close.

    The i2c is working - I have tested writing 8 bit to an i2c display - I've got output, but input has not been tested. An i2c scan does not work properly.

    One wire should work but doesn't yet. I'm not sure if interupts are the issue- I've tried to disable them, but not working yet. It could be related to the timings- I've got a few things to try yet. I don't have anything to measure the logic levels - using a led I can see it is on faintly which suggests the pin is toggling state.

    Gpio is now working for all pins, and a setwatch on the inbuilt flash button is working.

    The telnet sources compile - and it appears to listen on the port - but no input or output.

    Websockets are working, the crypto sources all compile, but https is not working yet. Might need @Gordon s help to debug when he is less busy!

  • Oh - and dump() outputs and then crashes, and we have a few odd messages about sockets at start up.

    The wifi save() state is also working, so you can connect to an access point, save, and it will come back up and join on reboot.

  • @Gordon
    With regards to UtilTimer I think the rtos can take care of this for us.
    Documentation is a bit thin, so you need to look at github sources of examples, and the likes of the arduino port to find the usage.

  • When would be a good time to bring into the main branch? I do plan to get the Travis build working, but for that I think ESP-idf stuff might have to stabilise otherwise we'll be chasing changes all the time...

  • Currently I am using the web IDE and an ESP32.
    I have been unable to import http, wifi or any modules. Any time I call setWatch, I have to re-flash my chip. How do I go about using the ESP32 tree from github mentioned above?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Actual status of port for ESP32

Posted by Avatar for JumJum @JumJum