Code Monkey home page Code Monkey logo

micropython_k210_lobo's Introduction

MicroPython for Kendryte K210

This MicroPython port is now in a stable phase, but some bugs and issues can be expected, please report
All standard MicroPython functionality and modules are implemented, as well as advanced thread support, file system support, display module, network, enhanced K210 peripheral support ...
Modules providing support for still unsupported K210 peripherals will be implemented soon


For discussion about this MicroPython port please visit the dedicated Forum


Wiki pages are provided with detailed information about usage, classes, methods ... (not yet complete)


If you find this project useful, you can contribute by making a donation.  Donate


This implementation was based on Sipeed MaixPy, but it diverged from it and is now a completely independent project.

Main features:

  • Based on kendryte-freertos-sdk, modified to include some needed features not yet implemented and enhanced drivers support
  • MicroPython core based on latest release build from main Micropython repository
    Unchanged except for the thread support and other changes needed to work with 64-bit RISC-V.
  • BUILD.sh script is provided to make building MicroPython firmware as easy as possible
  • Running two independent Micropython instances on two K210 cores is supported.
    Rich set of functions for data exchange between instances is provided.
  • Refactored _thread module with many new features, based on my MicroPython for ESP32 thread module.
    Rich set of threads related methods, including inter-thread notifications and messages.
  • Full support for LittleFS as default file system on internal Flash.
    LittleFS file system image can be prepared on host and flashed to the board.
    SPIFFS is also supported (with directories support) and can be selected when building.
  • Full support for Fat32 file system on external SD Card
  • Full file timestamp support for LittleFS, SPIFFS and Fat32
  • improved utime module, all time related values are handled as 64-bit values
  • SRAM buffer is provided with content preserved after reset, accessible via machine.mem_xxx methods
  • uart module, compatible with the uart module on my ESP32 port
    buffered, interrupt based input with callbacks on events
  • Pin module, compatible with the Pin module on my ESP32 port
  • i2c module, master & slave, compatible with the i2c module on my ESP32 port
    SSD1306 module provided as MicroPython frozen module
  • spi module, master & slave, compatible with the spi module on my ESP32 port with added slave support
  • WS2812 (neopyxel) support, using spi module
  • Timer and PWM modules
  • OneWire & DS18x20 module
  • ymodem module for file transfer to/from K210 board using ymodem protocol is provided
  • uhashlib and ucryptolib using K210 hardware AES are implemented
  • Display module ported from my MicroPython for ESP32 display module
    Rich set of drawing methods, direct write or framebuffer, jpeg, bmp and raw image format
    Flexible fonts support (fixed width and proportional) with user fonts loadable from file (online Font creator provided)
  • Full network support for WiFi (based on ESP8266/ESP8285) and GSM modules.
    • My own ESP8266/ESP8285 firmware is provided with enhanced features and OTA firmware update support
    • PPPoS support for GSM modules
    • full SMS support for GSM modules with collbacks on SMS receive
    • flexible and feature rich AT command method is provided for both WiFi and GSM modules
    • Full MicroPython socket module compatibility, with some additional features. FTP Server and Web Server examples are available.
    • urequests module (written in C) supporting all http request methods, http and https ( SSL/TLS, on WiFi, only)
    • Full featured mqtt module (written in C) with callbacks on all events
    • FTP Server and Web Server provided as frozen modules
  • usqlite3 module, data base on internal flash or SD Card, in-memory database supported
  • Boot menu, invoked by external pin, is provided which can help solve some issues.
    Options to prevent loading of boot.py and/or main.py, force format of the internal file system, load the default configuration ...
  • Many configuration options can be configured directly from MicroPython (saved on Flash):
    • running two MicroPython instances
    • heap and stack sizes
    • using PyStack
    • default CPU frequency
    • default REPL baudrate
    • boot menu pin
    • default log level
    • using ansi colors
    • MicroPython VM divisor
  • pye, full screen file editor (as MicroPython frozen module) is provided
  • MPyTerm, serial terminal emulator specially designed for MicroPython is provided.
    Included are commands to synchronize MicroPython time from PC, change the REPL baudrate, transfer files to/from MicroPython filesystem (including transferring whole directories).
    Fast block file transfer is used, protected with CRC.
  • Eclipse project files included.
    To include it into Eclipse goto:
    File->Import->General->Existing Projects into Workspace
    Select root directory [select MicroPython_K210_LoBo directory]
    Finish.
    Rebuild index
    Execute Index->Freshen All Files.
  • Many modules from my MicroPython for ESP32 port are already ported, porting some others is planned.
  • More to come soon ...


This MicroPython port was tested on Sipeed's MAIX boards.
Here are some links to the distributors:

Seed
AnalogLamb
Banggood (prices to high)

It should also work on Kendryte KD233, probably with some modifications, but it was not tested.


For build instructions see the Wiki.


micropython_k210_lobo's People

Contributors

loboris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micropython_k210_lobo's Issues

Firmware: Seems to run slow

I tried to run a file called runtest.py (copied below), which was used a while ago in the MP forum for speed tests. The results are odd. For instance, the add test takes about 15 seconds at 400MHz 25 seconds at 240 Mhz, compared to the about 3 seconds on the sipeed image, about 1 second on a Pyboard, 2 (non SPIRAM), 3 (SPIRAM) seconds on a ESP32. The numbers are not fully comparable, since the K210 uses 64 bit numbers instead of 32 bit, but 15 seconds just strange.

import time
import machine

def pi(places=100):
  # 3 + 3*(1/24) + 3*(1/24)*(9/80) + 3*(1/24)*(9/80)*(25/168)
  # The numerators 1, 9, 25, ... are given by (2x + 1) ^ 2
  # The denominators 24, 80, 168 are given by (16x^2 -24x + 8)
  extra = 8
  one = 10 ** (places+extra)
  t, c, n, na, d, da = 3*one, 3*one, 1, 0, 0, 24

  while t > 1: 
    n, na, d, da = n+na, na+8, d+da, da+32
    t = t * n // d
    c += t
  return c // (10 ** extra)

def pi_test(n=5000):
    t1=time.ticks_ms()
    t=pi(n)
    t2=time.ticks_ms()
    print('Pi test: ', time.ticks_diff(t2,t1)/1000, 's')

def add_test(n=1000000, a = 1234, b = 5678):
    t1=time.ticks_ms()
    sum = 0
    for i in range(n):
        sum = a + b
    t2=time.ticks_ms()
    print('Add test: ', time.ticks_diff(t2,t1)/1000, 's')

def mul_test(n=1000000, a = 1234, b = 5678):
    t1=time.ticks_ms()
    sum = 0
    for i in range(n):
        sum = a * b
    t2=time.ticks_ms()
    print('Mul test: ', time.ticks_diff(t2,t1)/1000, 's')

def div_test(n=1000000, a = 1234, b = 5678):
    t1=time.ticks_ms()
    sum = 0
    for i in range(n):
        sum = a / b
    t2=time.ticks_ms()
    print('Div test: ', time.ticks_diff(t2,t1)/1000, 's')

print('Speed test')
try:
    print('System freq: {:.1f} MHz'.format(machine.freq()[0]/1000000))
except:
    print('System freq: {:.1f} MHz'.format(machine.freq()/1000000))

add_test()
mul_test()
div_test()
pi_test()

Cannot flash the WiFi firmware to M1W

So I have got myself a USB to Serial Adapter on Amazon, but I'm still getting the following error. Any tips?

$ ./flash.sh -eo -t 1MB -m dout
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
./flash.sh: line 217: [: -ge: unary operator expected

==========================
Flashing ESP8266 firmware:
--------------------------
  Flash type: 1MB
  Flash mode: dout
   Partition: 0
     Address: 0x001000
    Firmware: '../upgrade/esp8285_AT_1_2.bin'
 Erase Flash: 'yes'
================================================

esptool.py v2.7
Serial port /dev/cu.wchusbserial1410
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

Erase flash failed!

Here is my set up (quite crude, I know)

IMG_0159
IMG_0156
IMG_0155

Camera and LCD not working, OMV modules not part of this port

I git cloned , compiled, reflashed my Sipeed M1w Dock succesfully with this Micropython port. While I appreciate all the nifty options this port brings, I noticed there is no sensor module in this port. Hence the camera is not working.

Also, i read somewhere in the code about a USE_DISPLAY environment variable that would allow the display module to be compiled, but I could not find where to set it. There is no ./BUILD.sh menuconfig possible unfortunately.

So, how could i bring up the camera functionnality to this port ?
the original Micropython Maixpy code has a quite different structure than this port, and the Camera code and includes are quite intricated. What would it take to port the Maixpy code relative to the camera/sensor to this port ?

And for the LCD (it´s a classical ILI9341) present on the Sipeed Dock board, did anybody manage to have it running ?

FLASH File system initialization failed! SOLVED.

I have tried flashing 3 times and i keep getting this issue:
Board: Sipeed MAiX Dock M1W DAN
Trying to get extra features such as ftp and ota which are not supported in official fw.

`$ kflash -p /dev/ttyS7 -b 2000000 -t MaixPy.bin
[INFO] COM Port Selected Manually:  /dev/ttyS7
[INFO] Default baudrate is 115200 , later it may be changed to the value you set.
[INFO] Trying to Enter the ISP Mode...
._._._._.
[INFO] Automatically detected dan/bit/trainer

[INFO] Greeting Message Detected, Start Downloading ISP
Downloading ISP: |=====================================================================================| 100.0% 10kiB/s
[INFO] Booting From 0x80000000
[INFO] Wait For 0.1 second for ISP to Boot
[INFO] Boot to Flashmode Successfully
[INFO] Selected Baudrate:  2000000
[INFO] Baudrate changed, greeting with ISP again ...
[INFO] Boot to Flashmode Successfully
[INFO] Selected Flash:  On-Board
[INFO] Initialization flash Successfully
Programming BIN: |=====================================================================================| 100.0% 60kiB/s
[INFO] Rebooting...
--- forcing DTR inactive
--- forcing RTS inactive
--- Miniterm on /dev/ttyS7  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

W (1245) CONFIG: Error reading configuration (crc)
M (22232) CONFIG: Default flash configuration set (1)
Q (28226) [MAIXPY]: PLL0=988000000, PLL1=398666666, PLL2=45066666, SPI3clk=494000000
Q (35868) [MAIXPY]: RAM buffer of 1024 bytes allocated at 0x80595c80
M (44238) [MAIXPY]: Heaps: FreeRTOS=3716 KB (811 KB free), MPy=2820 KB, other=419 KB
lfs error:969: Corrupted dir pair at 0 1
Error mounting Flash file system, select an option
A - continue without file system (default)
F - format Flash and try to mount again
E - erase Flash, format and try to mount again
E (10078601) [MAIN]: FLASH File system initialization failed!`

Any Advice?

boot from SD card

Hello!

I built this repo on an Ubuntu and flashed it to my dev board:
20190716_165542

However I have difficulties booting from SD card.
On every boot I have to use Putty.exe to connect to the board and execute the following code:

import os
os.mount(os.VfsSDCard(), '/sd')
os.chdir('/sd')
import boot

Could this be automated somehow? How can I check if an SD card is actually inserted?
An editable _boot.py file would be great like this one

I digged a little deeper and I found the static const char* DEFAULT_BOOT_PY but editing the string with newlines and space indents is a bit tedious. Is there a better option? Should I edit that line? If so what would be the best script? Should I just put the os.mount(...) in a try catch block and if there is an exception print out something along the line of "failed to mount SD Card"?

Side note:
I've checked the wiki: https://github.com/loboris/MicroPython_K210_LoBo/wiki/i2c
But for master I2C I got errors when I tried to use those arguments. For example "i2c.writeto(addr, buf [,stop=True])" has no stop argument. If I put True or False at the end I get argument related error messages. What am I doing wrong? Do I have to enable a flag in mpconfigport.h file to have all the features? I see that there is a MICROPY_PY_MACHINE_I2C option disabled by deafult. But if I enable it nothing really changes. The output file has the sime size, same argument error. Maybe I mixed up something?

Local build firmware

Hello,

This issue superficially may be different and therefore with apologies I have started a new thread. I cannot flash a local build firmware to the Maixduino board. The flash process cannot detect K210 which is similar to that I reported using the pre-built firmware.

This time around I changed cables and ports and verified that irrespective of the cable and the physical port, the attached device (viz. Pixel 2XL) is detected and participates in bi-directional data exchange.
MicroPython local build firmware.docx

So I did some nominal dump of the port information that has been captured in the attachment. Bottom line, I suspect that the Sipeed implementation of the FTDI driver leaves something to be improved later. Is my amateur interpretation correct? Appreciate your indulgence and further guidance.

Kind regards.

BUILD.sh improvements on MacOS

The code for computing the FILESIZE in BUILD.sh is incorrect on MacOS.

FILESIZE=$(stat -s MicroPython.bin | cut -d' ' -s -f 1 | cut -d'=' -s -f 2)

is getting the value of the first field in the output of stat -s and this is st_dev=16777223 on my machine. Alternative implementations are

FILESIZE=$(eval $(stat -s MicroPython.bin); echo $st_size)

or

FILESIZE=$(stat -s MicroPython.bin | cut -d' ' -s -f 8 | cut -d'=' -s -f 2)

which also works for me but I am not sure if this is always true.

This code appears twice in BUILD.sh and both need updating.

Thanks for all the updates!

Using pre-built firmware with Maixduino

Hello,
I'm having teething problems deploying the pre-built firmware to the Maixduino board. The following command from the unarchived firmware working directory reports that K210 cannot be detected!
./kflash.py -p /dev/ttyUSB0 -b 2000000 -t MaixPy.bin

I have attached a document listing the steps performed to arrive at the last command. I would appreciate some guidance on troubleshooting the issue. In the interim, I am trying to build the firmware for a subsequent test as a workaround activity.

MicroPython - installing pre-built firmware.docx

cannot flash on maixpy go

I cannot flash firmware to maixpy go as below. So how to resovle?
./ktool.py -p /dev/ttyUSB0 -b 2000000 -t MicroPython.bin

invite join MaixPy project

hi, how are things going with you recently?
we have port micropython/openMV IDE, Arduino IDE, and platformIO IDE to k210.
I think your repo for k210 is clean and tidy, but limited functions compare to our repo
We sincerely invite you join our MaixPy project
help us to maintain,improve MaixPy
And we will send new free boards to you
do you have the time?

WiFi firmware

After reading the document I'm not quite clear about how to get Wi-Fi work on a Maix M1w. Here are some elementary questions:

  1. Do I have to buy a USBtoSerial adapter? AFAIK, Sipeed's MaixPy has WiFi support and they doesn't seem to require an adapter. It would be great if you can explain why it is required.
  2. I'm getting an error with the following configuration on macOS Mojave. I guess it is related to the fact that I ignore the whole "Flashing AT Firmware to the Sipeed-M1 (DanDock) board's WiFi (ESP8285)" part due to the lack of a USBtoSerial adapter? (You can see there are some bash errors at the top of the error message, though, probably due to the incompatibility between BSD and Linux)
SERIAL_PORT="/dev/cu.wchusbserial1430"
FLASH_TYPE="1MB"
FLASH_MODE="dout"
EXOPT="-b 460800"
ERASE_FLASH="yes"
ONLY_BOOT="no"
ONLY_FW="no"
PART_NUM=0
TEST_ONLY="no"
ERASE_ONLY="no"
ONLY_CRT="no"
FLASH_BLANKS=""
FW_FILE=""

Error message

$ ./flash.sh -t 1MB -m dout
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
./flash.sh: line 217: [: -ge: unary operator expected

==========================
Flashing ESP8266 firmware:
--------------------------
  Flash type: 1MB
  Flash mode: dout
   Partition: 0
     Address: 0x001000
    Firmware: '../upgrade/esp8285_AT_1_2.bin'
 Erase Flash: 'yes'
================================================

esptool.py v2.7
Serial port /dev/cu.wchusbserial1430
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

Erase flash failed!
  1. Maix M1w seems to have a 8MB flash (?), but current the biggest supported flash size is 4MB. How can I get around with this?
  2. Forgive a total newbie like me, but can you explain what this repo is for? I suppose it's to provide WiFi support for MaixPy-FreeRTOS, but you also mentioned "OTA", does it mean I can flash my board over WiFi without connecting it to a computer?

Anyway, this repo is at least as cool as Maixpy. Good job!

machine.UART not working

In every Version I tested to far of the prebuild images I can't initialise a UART.
The board just resets.

import machine
uart = machine.UART(1, tx=21, rx=20)
core 0, core dump: misaligned load
E (65958383) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (65975134) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (65991887) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66008641) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66025394) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66042147) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66058900) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66075653) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66092406) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66109159) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66125912) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66142665) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66159419) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66176172) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66192925) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66209678) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66226431) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66243184) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66259937) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66276690) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66293443) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66310196) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66326950) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66343703) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66360456) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66377209) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66393962) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66410715) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66427468) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66444221) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66460974) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66477727) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66494481) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66511234) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66527987) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66544740) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66561493) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66578246) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66594999) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66611752) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66628505) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66645258) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66662012) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66678765) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66695518) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66712271) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66729024) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66745777) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66762530) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66779283) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66796036) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66812790) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66829543) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66846296) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66863049) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66879802) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66896555) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66913308) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66930061) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66946814) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66963567) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66980321) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (66997074) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67013827) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67030580) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67047333) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67064086) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67080839) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67097592) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67114345) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67131098) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67147852) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67164605) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67181358) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67198111) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67214864) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67231617) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67248370) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67265123) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67281876) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67298630) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67315383) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67332136) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67348889) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67365642) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67382395) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67399148) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67415901) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67432654) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67449407) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67466161) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67482914) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67499667) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67516420) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67533173) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67549926) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67566679) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67583432) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67600185) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67616938) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67633692) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67650445) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67667198) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67683951) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67700704) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67717457) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67734210) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67750963) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67767716) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67784470) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67801223) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67817976) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67834729) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67851482) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67868235) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67884988) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67901741) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67918494) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67935247) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67952001) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67968754) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (67985507) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68002260) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68019013) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68035766) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68052519) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68069272) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68086025) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68102778) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68119532) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68136285) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68153038) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68169791) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68186544) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68203297) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68220050) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68236803) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68253556) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68270310) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68287063) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68303816) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68320569) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68337322) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68354075) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68370828) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68387581) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68404334) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68421087) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68437841) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68454594) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68471347) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68488100) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68504853) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68521606) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68538359) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68555112) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68571865) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68588618) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68605372) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68622125) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68638878) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68655631) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68672384) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68689137) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68705890) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68722643) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68739396) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
E (68756150) FreeRTOS: (/home/LoBo2_Razno/K210_razvoj/MicroPython_K210_LoBo/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/freertos/tasks.c:4105) pxTCB == pxCurrentTCB[uxPsrId]
M (3655) [K210_MAIN]: Default flash configuration set

edit: with the ota firmware I get some additional output:

Cause 0x0000000000000004
reg[00](mpec ) = 0x00000000800124e6, reg[01](ra   ) = 0x00000000800124c8
reg[02](sp   ) = 0x00000000801b3d58, reg[03](gp   ) = 0xffffffffffffffff
reg[04](tp   ) = 0x0000000000000000, reg[05](t0   ) = 0x00000000800cffc0
reg[06](t1   ) = 0x0000000080312630, reg[07](t2   ) = 0x00000000800004c8
reg[08](s0/fp) = 0x0000000080312630, reg[09](s1   ) = 0x00000000801b3ec0
reg[10](a0   ) = 0x0000000000000000, reg[11](a1   ) = 0x0000000000000064
reg[12](a2   ) = 0x0000000080196f30, reg[13](a3   ) = 0x0000000000000000
reg[14](a4   ) = 0x3632383735303134, reg[15](a5   ) = 0x00000000801b6118
reg[16](a6   ) = 0x0000000080196f30, reg[17](a7   ) = 0x0000000000000005
reg[18](s2   ) = 0x0000000080196f78, reg[19](s3   ) = 0x00000000801b41b8
reg[20](s4   ) = 0x0000000000000002, reg[21](s5   ) = 0x0000000080312650
reg[22](s6   ) = 0x0000000000000000, reg[23](s7   ) = 0x00000000801b6868
reg[24](s8   ) = 0x000000000000a7b3, reg[25](s9   ) = 0x0000000000000000
reg[26](s10  ) = 0x00000000801b6768, reg[27](s11  ) = 0x0000000000000000
reg[28](t3   ) = 0x000000000000000b, reg[29](t4   ) = 0x000000000000000c
reg[30](t5   ) = 0x0000000000000000, reg[31](t6   ) = 0x0000000000000000
freg[00](ft0 ) = 0x0000000000000000, freg[01](ft1 ) = 0x0000000000000000
freg[02](ft2 ) = 0x0000000000000000, freg[03](ft3 ) = 0x0000000000000000
freg[04](ft4 ) = 0x0000000000000000, freg[05](ft5 ) = 0x0000000000000000
freg[06](ft6 ) = 0x0000000000000000, freg[07](ft7 ) = 0x0000000000000000
freg[08](fs0 ) = 0x0000000000000000, freg[09](fs1 ) = 0x0000000000000000
freg[10](fa0 ) = 0x0000000000000000, freg[11](fa1 ) = 0x0000000000000000
freg[12](fa2 ) = 0x0000000000000000, freg[13](fa3 ) = 0x0000000000000000
freg[14](fa4 ) = 0x0000000000000000, freg[15](fa5 ) = 0x00000000bf800000
freg[16](fa6 ) = 0x0000000000000000, freg[17](fa7 ) = 0x0000000000000000
freg[18](fs2 ) = 0x0000000000000000, freg[19](fs3 ) = 0x0000000000000000
freg[20](fs4 ) = 0x0000000000000000, freg[21](fs5 ) = 0x0000000000000000
freg[22](fs6 ) = 0x0000000000000000, freg[23](fs7 ) = 0x0000000000000000
freg[24](fs8 ) = 0x0000000000000000, freg[25](fs9 ) = 0x0000000000000000
freg[26](fs10) = 0x0000000000000000, freg[27](fs11) = 0x0000000000000000
freg[28](ft8 ) = 0x0000000000000000, freg[29](ft9 ) = 0x0000000000000000
freg[30](ft10) = 0x0000000000000000, freg[31](ft11) = 0x0000000000000000

Read data from 16-bit register address (I2C)

Hello,

I'm trying to read the data from a battery fuel gauge (BQ27531) where I need to send a 16-bit register address:
16-bit

In other distros it can be achieved by:

from machine import I2C, Pin

i2c =machine.I2C(sda=Pin(4), scl=Pin(5))
value = i2c.readfrom_mem(0x55, 0x2233, 1, addrsize=16)

or by:

def _get_reg16(self, address):
        self.i2c.start()
        self.i2c.write(ustruct.pack('>BH', self._address << 1, address))
        data = self.i2c.readfrom(self._address, 2)
        return ustruct.unpack('>B', data)[0]

However we don't have "addrsize" attribute for i2c.readfrom_mem nor do we have i2c start/stop control. Here is similar question where I got the answers from.

Basically I have to send: 0x55 (slave address) + 0x00 (control reg) + 0x01 (tell me your device type) then the result would come back: 0x0531.

Do you think this can be done?

Unexpected Restarts

Hi Boris,

I'm considering a port of our standalone SDK project to a uPy supported version and think yours may provide a base for that.

I'm on WIndows with wsl2 so I built the F/W using the steps on your WIKI with no trouble. I installed the firmware (MicroPython.kfpkg) using the kflash gui tool (V1.6) and connected with my terminal prog. I followed some of the steps in the wiki and then I ran a simple loop/print test. After a few seconds the device restarted. Refer to the following output...

M (370013) [K210_MAIN]: Default flash configuration set

RISC-V Kendryte ---------------------------------------------
 _    _   _____   _   ______    ___   ___   ______   _     _
( )  / ) (___  ) ( ) (  __  )  (   \ /   ) (  __  ) ( )   ( )
| |_/ /   ___| | | | | |  | |  | |\ \ /| | | |__| |  \ \_/ /
|  _ )   ( ____) | | | |  | |**| | \_/ | | |  ____)   \   /
| | \ \  | |___  | | | |__| |  | |     | | | |         | |
(_)  \_) (_____) (_) (______)  (_)     (_) (_)         (_)
-------------------------------------------------------------
MicroPython-FreeRTOS by LoBo v1.12.02
-------------------------------------

MicroPython 1.12.02 (68a6b75-dirty) built on 2022-02-05; Sipeed_board with Kendryte-K210
Type "help()" for more information.
>>> import machine, _thread
>>> _thread.list()

Total system run time: 69.065 s, number of tasks running: 
MicroPython threads:
-------------------------------------------------------------------------------------------------------------------
ID(handle) Proc             Name      State  Stack  Used MaxUsed PyStack   Used    Type Priority Run time (s)   (%)
-------------------------------------------------------------------------------------------------------------------
2150748512    0       MainThread*   running  32768  1424    2840    4096     64    MAIN        8        0.237  0.34

FreeRTOS tasks running:
-------------------------------------------------------------------------------
ID(handle) Proc             Name     State MinStack Priority Run time (s)   (%)
-------------------------------------------------------------------------------
2150748512    0     main_mp_task   Running    29928       15        0.237  0.34
2149323944    0             IDLE     Ready     7416        0       68.462 99.13
2149326056    1             IDLE     Ready     7416        0        0.000  0.00
2150713248    0    hal_tick_task   Blocked     7432        1        0.001  0.00
-------------------------------------------------------------------------------
FreeRTOS heap: Size: 3141632, Free: 731544, Min free: 664208
  System heap: Free: 744448

>>> machine.state()
 PLL0: 988000000, PLL1: 806000000,  PLL2:  45066666, SPI3clk: 494000000
 APB0: 247000000, APB1: 247000000,  ACLK: 494000000,    HCLK: 494000000
  CPU: 494000000,  KPU: 403000000
SRAM0: 494000000 (ACLK/1)
SRAM1: 494000000 (ACLK/1)

Current SPI Flash speed: 35285714 Hz
RAM buffer of 4096 bytes at 0x80300000
OTA not used
Heaps: FreeRTOS=3068 KB (714 KB free), MPy=2300 KB, other=727 KB
>>> machine.mpy_config()

MicroPython configuration:
--------------------------
   MPy version code: 011201
  Two MPy instances: False
       PyStack used: True
Available heap size: 2300 KB
      MPy heap size: 2300 KB
       PyStack size: 4096 B
     MPy stack size: 32768 B
      CPU frequency: 400 MHz
      REPL baudrate: 115200 bd
      Boot menu pin: 0
  Default log level: 2 (LOG_WARN)
     Use log colors: 1 (True)
         VM divisor: 32 bytecodes
(False, True, 2355200, 2355200, 0, 4096, 32768, 400000000, 115200, 0, 2, True, 32)
>>>
>>> import time
>>> i=0
>>> current_time=time.ticks_ms()
>>> while(True):
...     i+=1
...     if time.ticks_ms()>current_time+500:
...         current_time=time.ticks_ms()
...         print("i = {}".format(i))
...
...
...
i = 1
i = 87910
i = 175811
i = 263633
i = 351473
i = 439325
i = 527201
i = 615064
i = 702950
i = 790815
i = 878692

M (370937) [K210_MAIN]: Default flash configuration set

RISC-V Kendryte ---------------------------------------------
 _    _   _____   _   ______    ___   ___   ______   _     _
( )  / ) (___  ) ( ) (  __  )  (   \ /   ) (  __  ) ( )   ( )
| |_/ /   ___| | | | | |  | |  | |\ \ /| | | |__| |  \ \_/ /
|  _ )   ( ____) | | | |  | |**| | \_/ | | |  ____)   \   /
| | \ \  | |___  | | | |__| |  | |     | | | |         | |
(_)  \_) (_____) (_) (______)  (_)     (_) (_)         (_)
-------------------------------------------------------------
MicroPython-FreeRTOS by LoBo v1.12.02
-------------------------------------

MicroPython 1.12.02 (68a6b75-dirty) built on 2022-02-05; Sipeed_board with Kendryte-K210
Type "help()" for more information.
>>> 

This happens every time but the time (i value) varies slightly each time. I simpler version of the test seems to run indefintely without issue...

M (370942) [K210_MAIN]: Default flash configuration set

RISC-V Kendryte ---------------------------------------------
 _    _   _____   _   ______    ___   ___   ______   _     _
( )  / ) (___  ) ( ) (  __  )  (   \ /   ) (  __  ) ( )   ( )
| |_/ /   ___| | | | | |  | |  | |\ \ /| | | |__| |  \ \_/ /
|  _ )   ( ____) | | | |  | |**| | \_/ | | |  ____)   \   /
| | \ \  | |___  | | | |__| |  | |     | | | |         | |
(_)  \_) (_____) (_) (______)  (_)     (_) (_)         (_)
-------------------------------------------------------------
MicroPython-FreeRTOS by LoBo v1.12.02
-------------------------------------

MicroPython 1.12.02 (68a6b75-dirty) built on 2022-02-05; Sipeed_board with Kendryte-K210
Type "help()" for more information.
>>> import time
>>> while(True):
...     time.sleep(1)
...     print(".",end="")
...
...
...
.............................................................................................................................................................................................................................

Can you confirm this as an issue?

Thank you

WiFi "Error setting baudrate"

After successfully flashing the provided firmware, When I try to connect with this error.
Sipeed Dock M1W with ESP8285

>>> import network
>>> wifi = network.wifi
>>> wifi.reset()
>>> wifi.debug(True)
True
>>> wifi.reset()
>>> import _thread, network, time, machine, socket, gc, os
>>> wifi.start(tx=7, rx=6, ssid="SSID", password="PASS", baudrate=921600, wait=True)
M (10359821780) [WIFI]: Initialize WiFi UART
M (10359825780) [WIFI]: UART #0: initialize uart hardware
M (10359856677) [WIFI]: UART #0: initialized, tx=7, rx=6, bdr=921641
M (10359882693) [WIFI]: WiFi TASK STARTED
M (10359985755) [ATCMD]: Check and set device baudrate
W (10360626108) [ATCMD]: Trying at 115200 bd
W (10361316499) [ATCMD]: Trying at 230400 bd
W (10362006892) [ATCMD]: Trying at 460800 bd
W (10362697281) [ATCMD]: Trying at 1000000 bd
W (10363387678) [ATCMD]: Trying at 2000000 bd
E (10364076089) [ATCMD]: Error setting baudrate
M (10364080371) [WIFI]: UART #0 deinitialized
M (10364085209) [WIFI]: WiFi TASK TERMINATED
False

And here is log from flash:

./flash.sh -t 1MB -m dout

==========================
Flashing ESP8266 firmware:
--------------------------
  Flash type: 1MB
  Flash mode: dout
   Partition: 0
     Address: 0x001000
    Firmware: '../upgrade/esp8285_AT_1_2.bin'
 Erase Flash: 'yes'
================================================

esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_____....._____.
Detecting chip type... ESP8266
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 40MHz
MAC: 60:01:94:f0:8e:09
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 0.5s
Staying in bootloader.

esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._
Detecting chip type... ESP8266
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 40MHz
MAC: 60:01:94:f0:8e:09
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 128 bytes to 75...
Wrote 128 bytes (75 compressed) at 0x000fc000 in 0.0 seconds (effective 51.4 kbit/s)...
Hash of data verified.
Flash params set to 0x0320
Compressed 4080 bytes to 2696...
Wrote 4080 bytes (2696 compressed) at 0x00000000 in 0.4 seconds (effective 74.2 kbit/s)...
Hash of data verified.
Compressed 1684 bytes to 1206...
Wrote 1684 bytes (1206 compressed) at 0x0007b000 in 0.2 seconds (effective 67.4 kbit/s)...
Hash of data verified.
Compressed 435876 bytes to 313593...
Wrote 435876 bytes (313593 compressed) at 0x00001000 in 50.4 seconds (effective 69.2 kbit/s)...
Hash of data verified.

Leaving...
Staying in bootloader.

Finished.

On a side note, The instructions should probably be updated or the flash.sh script fixed..
The instructions state that we should:
Execute `./flash.sh -eo -t 1MB -m DOUT` to erase the existing firmware
But when we get to:
Execute `./flash.sh -t 1MB -m DOUT` to flash the new firmware
This also causes erase first. That makes 2 erases before write.
Also, During the second command, we are given a very brief window to reboot device while holding esp8285 boot pin to ground. This can be very tricky. I think that "flash.sh" should be fixed to not perform erase during write action.

Also, All of the steps in the instructions are "#1" lol.

Oh yea, And:
./flash.sh -eo -t 1MB -m DOUT
should be replaced with:
./flash.sh -eo -t 1MB -m dout
Since it will fail with capitals.

I2C device already used / Error initializing I2C hardware

Hello!

This piece of code used to work before. Now all I get is:

from machine import I2C

i2c = I2C(0, freq=100000, scl=40, sda=41)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: I2C device already used

i2c = machine.I2C(1, freq=100000, scl=40, sda=41)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Error initializing I2C hardware

This code runs after a restart so there should be nothing using/locking any I2C hardware.

Can I somehow see what hardware is being used and maybe grab it's reference via a global "getter" method? Is this a bug that you can/could reproduce?

BUILD.sh script failing

BUILD.sh fails when compiling kendrite SDK:
===[ 'mklfs' created ]===
===[ BUILDING MicroPython FIRMWARE ]===
.
.
-----[ source k210_env ... ]-----
-----[ k210_env export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/username/micropython/MAIX/MicroPython_K210_LoBo/k210-freertos/../kendryte-toolchain/bin/ ... ]---

=====[ PLATFORM_MK ./mpy_support/k210.mk ./platform/drivers/k210.mk ./third_party/k210.mk ./third_party/spiffs/k210.mk ./k210.mk ]=====
=====[ Compiling mpy_support docs platform third_party ... ]=====
=====[ compile mpy_support docs platform third_party . ]=====
=====[ AllDirs ... ]======
=====[ drivers/ ]======
=====[ sdk/ ]======
w25qxx.c:44:10: fatal error: devices.h: No such file or directory
#include <devices.h>
^~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:74: w25qxx.o] Error 1
make[1]: *** [Makefile:59: compile] Error 2
GEN build/genhdr/qstr.i.last
../../micropython/py/mpstate.c:27:10: fatal error: py/mpstate.h: No such file or directory
#include "py/mpstate.h"
^~~~~~~~~~~~~~
compilation terminated.
../../micropython/py/malloc.c:31:10: fatal error: py/mpconfig.h: No such file or directory
#include "py/mpconfig.h"
^~~~~~~~~~~~~~~
compilation terminated.
../../micropython/py/gc.c:33:10: fatal error: py/gc.h: No such file or directory
#include "py/gc.h"
^~~~~~~~~
compilation terminated.
../../micropython/py/pystack.c:30:10: fatal error: py/runtime.h: No such file or directory
#include "py/runtime.h"
^~~~~~~~~~~~~~
compilation terminated.
../../micropython/py/qstr.c:31:10: fatal error: py/mpstate.h: No such file or directory
#include "py/mpstate.h"

TFT Display on Maix Amigo

I have the Sipheed Maix Amigo flashed and working good so far, very fast so far, but I'm trying to get all of the peripherals to work. Is there any way to mirror the screen instead of just changing orientation, or a device level config that I'm missing?

tft.init()

image

tft.init(rot=tft.PORTRAIT)

image

tft.init(rot=tft.LANDSCAPE_FLIP)

image

KPU

This is definitely a better MPy port for K210 for Pythonic programming. I can explore a lot of MPy modules and features.
But regarding to access the KPU, I'm not sure how to do it. Please advice.

When triangle is drawn with fill colour, firmware crashes and reboots

MaixPy-FreeRTOS by LoBo v1.11.11

MicroPython 1.11.11 (76c3fd1-dirty) built on 2019-08-07; Sipeed_board with Kendryte-K210
Type "help()" for more information.

import display
tft = display.TFT()
tft.init()
tft.useFB(False)
False
tft.triangle(10,100,30,100,20,50,tft.BLUE)
tft.clear()
tft.triangle(10,100,50,100,20,50,tft.BLUE)
tft.triangle(10,100,50,100,20,50,tft.BLUE,tft.RED)
E (160673060) FreeRTOS: (/home/LoBo2_Razno/MAIX/MAIXPY/MaixPy/k210-freertos/platform/sdk/kendryte-freertos-sdk/lib/bsp/device/dmac.cpp:212) count > 0 && count <= 0x3fffff

M (3213) [MAIXPY]: Configuration loaded from flash
Q (7729) [MAIXPY]: PLL0=988000000, PLL1=398666666, PLL2=45066666, SPI3clk=494000000
Q (16062) [MAIXPY]: RAM buffer of 1024 bytes allocated at 0x80595cc0
M (25226) [MAIXPY]: Heaps: FreeRTOS=3716 KB (811 KB free), MPy=2820 KB, other=419 KB

Can't use SSL with latest firmware

My ESP8285 firmware is up-to-date, and I can't seem to use SSL with the latest firmware as the AT firmware crashes. Please see below:

>>> import network, machine, os
>>> wifi = network.wifi
>>> wifi.start(tx=7, rx=6, ssid="***REDACTED***", password="***REDACTED***", wait=True)
True
>>> 
>>> wifi.ifconfig()
('192.168.1.48', '192.168.1.1', '255.255.255.0', '192.168.1.1', '208.67.222.222')
>>> 
>>> wifi.debug(True)
True
>>> 
>>> requests = network.requests
>>> requests.debug(True)
>>> 
>>> res = requests.get('http://loboris.eu/K210/test.txt')
M (6217934) [ATCMD]: AT COMMAND: [AT+CIPSSLSIZE?\r\n] Expecting: [\r\nOK\r\n], [\r\nERROR\r\n]
M (6231488) [ATCMD]: AT RESPONSE: match condition 1 at position 34 (4 ms, 24 byte(s), buf_start=16)
M (6240285) [ATCMD]: AT COMMAND: [AT+CIPSSLSIZE=16384\r\n] Expecting: [\r\nOK\r\n], [\r\nERROR\r\n]
M (6253492) [ATCMD]: AT RESPONSE: match condition 1 at position 40 (2 ms, 0 byte(s), buf_start=40)
W (6262357) [WIFI_TASK]: no match, removed [.222.222\r\n^^^^^^+CIPSSLSIZE:40]
M (6269862) [ATCMD]: AT COMMAND: [AT+TCPSTART=0,"TCP","loboris.eu",80,3,0\r\n] Expecting: [0,CONNECT\r\n], [\r\nERROR\r\n], [\r\n+TCPSTART]
M (6325528) [ATCMD]: AT RESPONSE: match condition 1 at position 16 (39 ms, 0 byte(s), buf_start=16)
W (6334334) [WIFI_TASK]: no match, removed [96\r\n^^^^^^^^^^^^^]
M (6340883) [ATCMD]: AT COMMAND: [AT+TCPSEND=0,109\r\n] Expecting: [\r\n>], [\r\n+TCPSEND:Busy\r\n]
M (6353538) [ATCMD]: AT RESPONSE: match condition 1 at position 16 (2 ms, 0 byte(s), buf_start=16)
M (6362234) [ATCMD]: AT COMMAND: [Send data] Expecting: [\r\n+TCPSEND:Complete\r\n], [\r\nOK\r\n], [\r\nERROR\r\n], [FAIL]
W (6373777) [ATCMD]: data: [GET /K210/test.txt HTTP/1.1\x0D\x0AUser-Agent: MicroPython HTTP Client/1.0\x0D\x0AHost: lobo]
M (6432580) [ATCMD]: AT RESPONSE: match condition 1 at position 35 (38 ms, 37 byte(s), buf_start=19)
M (6441482) [WIFI_TASK]: +TCP data request found [+TCP,0,9,1331:]
M (6448038) [WIFI_TASK]: Data for link_id 0 (srv=9), len=1331 [+TCP,0]
M (6455073) [WIFI_TASK]: +TCP Requesting data
M (6575874) [WIFI_TASK]: received (127 ms); socket: len=1331, ovf=0, tail=1331, head=0
Y (6583518) [WIFI_TASK]: Wait for data processing
M (6589110) HTTP_CLIENT: http_on_headers_complete, status=200, offset=269, nread=269
Q (6696708) [WIFI_TASK]: Data processed in 108 ms
M (6701314) [WIFI_TASK]: +TCP Confirm receive
Q (6706711) [WIFI]: Close socket 0 (0)
M (6710617) [ATCMD]: AT COMMAND: [AT+TCPCLOSE=0\r\n] Expecting: [\r\nOK\r\n], [\r\nERROR\r\n]
M (6724698) [ATCMD]: AT RESPONSE: match condition 1 at position 0 (4 ms, 0 byte(s), buf_start=0)
Y (6733230) [WIFI_TASK]: connection for socket with link_id 0 closed, active=285 ms, time=135 ms
W (6742671) [WIFI_TASK]: closed, removed [0,CLOSED]
Q (6748053) [WIFI_TASK]: Processing delay
>>> res[0]
200
>>> 
>>> res2 = requests.get('https://loboris.eu/K210/test.txt')
M (6769874) [ATCMD]: AT COMMAND: [AT+CIPSSLSIZE?\r\n] Expecting: [\r\nOK\r\n], [\r\nERROR\r\n]
M (6783728) [ATCMD]: AT RESPONSE: match condition 1 at position 35 (4 ms, 25 byte(s), buf_start=16)
M (6792677) [ATCMD]: AT COMMAND: [AT+TCPSTART=0,"SSL","loboris.eu",443,3,0\r\n] Expecting: [0,CONNECT\r\n], [\r\nERROR\r\n], [\r\n+TCPSTART]
M (7164929) [ATCMD]: AT RESPONSE: match condition 1 at position 41 (355 ms, 0 byte(s), buf_start=41)
Q (7173797) [WIFI_TASK]: Continue
W (7177805) [WIFI_TASK]: no match, removed [^^^^^^^^^^^^^^\r\n+CIPSSLSIZE:16384\r\n^^^^^^^]
Q (7186638) [WIFI_TASK]: more data, check again
M (7191924) [ATCMD]: AT COMMAND: [AT+TCPSEND=0,109\r\n] Expecting: [\r\n>], [\r\n+TCPSEND:Busy\r\n]
M (7205945) [ATCMD]: AT RESPONSE: match condition 1 at position 16 (3 ms, 0 byte(s), buf_start=16)
M (7214641) [ATCMD]: AT COMMAND: [Send data] Expecting: [\r\n+TCPSEND:Complete\r\n], [\r\nOK\r\n], [\r\nERROR\r\n], [FAIL]
W (7226184) [ATCMD]: data: [GET /K210/test.txt HTTP/1.1\x0D\x0AUser-Agent: MicroPython HTTP Client/1.0\x0D\x0AHost: lobo]
W (8249492) [ATCMD]: AT COMMAND: TIMEOUT (1000 ms, 506)
M (8254487) [ATCMD]: AT RESPONSE: no response (506) [\r\n+TCPSEND:109\r\n\r\n ets Jan  8 2013,rst cause:2, boot mode:(3,0)\r\n\r\nload 0x40108000, len 3056, room 16 \r\ntail 0\r\nchksum 0xd7\r\nload 0x3fffb000, len 992, room 8 \r\ntail 8\r\nchksum 0xd7\r\ncsum 0xd7~\r\n==============================\r\nLoBo ESP8266 Bootloader v1.2.0\r\n==============================\r\n   Flash map: 2, 1MB (512+512)\r\n  Flash mode: DOUT, [ESP8285]\r\nReset reason: EXCEPTION (28)\r\n\r\nLoading configured firmware (0)\r\n  Address: 001000\r\nStarting firmware 0, map 2 from 001000...\r\n\r\n\r\nready\r\nWIFI CONNECTED\r\n]
W (8308719) [WIFI_TASK]: no match, removed [^^^^^^^^^^\r\nOK\r\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^]
E (8357942) [WIFI]: Send: error sending data
Q (8362688) [WIFI]: Status: [\r\n+TCPSEND:109\r\n\r\n ets Jan  8 2013,rst cause:2, boot mode:(3,0)\r\n\r\nload 0x40108000, len 3056, room 16 \r\ntail 0\r\nchksum 0xd7\r\nload 0x3fffb000, len 992, room 8 \r\ntail 8\r\nchksum 0xd7\r\ncsum 0xd7~\r\n==============================\r\nLoBo ESP8266 Bootloader v1.2.0\r\n==============================\r\n   Flash map: 2, 1MB (512+512)\r\n  Flash mode: DOUT, [ESP8285]\r\nReset reason: EXCEPTION (28)\r\n\r\nLoading configured firmware (0)\r\n  Address: 001000\r\nStarting firmware 0, map 2 from 001000...\r\n\r\n\r\nready\r\nWIFI CONNECTED\r\n]
E (8414859) TRANS_SSL: Write error, errno=Network is unreachable
E (8421368) HTTP_CLIENT: Error write request
Q (8426147) [WIFI]: Close socket 0 (0)
M (8430584) [ATCMD]: AT COMMAND: [AT+TCPCLOSE=0\r\n] Expecting: [\r\nOK\r\n], [\r\nERROR\r\n]
M (8444570) [ATCMD]: AT RESPONSE: match condition 2 at position 31 (4 ms, 0 byte(s), buf_start=16)
W (8453289) [WIFI_TASK]: no match, removed [^^^^^^^^^^^^^^^^AT+TCPCL]
W (8514670) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (8575703) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (8587326) [WIFI_TASK]: no match, removed [O]
Q (8591499) [WIFI_TASK]: more data, check again
W (8596718) [WIFI_TASK]: no match, removed [SE=0\r\n^^^^^^]
W (8636708) [WIFI_TASK]: no match, removed [^^^WIFI GOT IP\r\nAT+TCPCL]
W (8697763) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (8758801) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (8819836) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (8880873) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (8941911) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9002943) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9063979) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9125015) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9186050) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9247088) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9308124) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9369165) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9430198) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9491229) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9552268) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9613301) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9674339) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9735377) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9796411) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9857449) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9918488) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (9979525) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10040559) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10101592) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10162631) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10223665) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10284704) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10345738) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
W (10406769) [WIFI_TASK]: no match, removed [OSE=0\r\n^^^^^^^^^AT+TCPCL]
E (10472823) [REQUESTS]: HTTP Request failed: 28675 []
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: HTTP Request failed
>>> res2[0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name not defined
>>> 

Logs from the ESP UART:

==============================
LoBo ESP8266 Bootloader v1.2.0
==============================
   Flash map: 2, 1MB (512+512)
  Flash mode: DOUT, [ESP8285]
Reset reason: EXCEPTION (0)

Loading configured firmware (0)
  Address: 001000
Starting firmware 0, map 2 from 001000...


ready
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP
AT

OK
AT

OK
ATE0

OK
+TCPCOMMANDS:1

OK
+CWMODE:1

OK
+CWJAP:"***REDACTED***","ac:84:***REDACTED***",11,-63,0

OK

OK

OK
+CIPRECVMODE:0

OK

OK

OK
+CIPSNTPCFG:0

OK

OK
+CIPSNTPCFG:1,0,"pool.ntp.org"

OK
+CIPSTA:ip:"192.168.1.48"
+CIPSTA:gateway:"192.168.1.1"
+CIPSTA:netmask:"255.255.255.0"

OK
+CIPDNS_CUR:192.168.1.1
+CIPDNS_CUR:208.67.222.222

OK
+CIPSSLSIZE:4096

OK

OK
0,CONNECT

OK

>
+TCPSEND:109

+TCPSEND:Complete

OK

+TCP,0,9,1331:HTTP/1.1 200 OK
Date: Wed, 19 Feb 2020 17:14:58 GMT
Server: Apache/2.4.29 (Ubuntu)
Last-Modified: Wed, 20 Mar 2019 13:08:43 GMT
ETag: "426-5848652314cc0"
Accept-Ranges: bytes
Content-Length: 1062
Vary: Accept-Encoding
Content-Type: text/plain; charset=UTF-8

===============
Welcome to K210
===============

General Specifications:
-----------------------
 * The K210 includes two 64-bit RISC-V CPU cores, each with a built-in independent FPU.
 * KPU high performance Convolutional Neural Network (CNN) hardware accelerator.
   The primary functions of the K210 are machine vision and hearing,
   which includes the KPU for computing convolutional neural networks and
   an APU for processing microphone array inputs.
 * The K210 features a Fast Fourier Transform (FFT) Accelerator for high performance
   complex FFT calculations. As a result, for most machine learning algorithms,
   the K210 has high-performance processing power.
 * Advanced TSMC 28nm process, temperature range -40°C to 125°C
 * Firmware encryption support
 * Unique programmable IO array maximises design flexibility
 * Low voltage, reduced power consumption compared to other systems
   with the same processing power
 * 3.3V/1.8V dual voltage IO support eliminates need for level shifters

---------
2019 LoBo
---------

OK
0,CLOSED
+CIPSSLSIZE:16384

OK
0,CONNECT

OK

>
+TCPSEND:109

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40108000, len 3056, room 16 
tail 0
chksum 0xd7
load 0x3fffb000, len 992, room 8 
tail 8
chksum 0xd7
csum 0xd7�
==============================
LoBo ESP8266 Bootloader v1.2.0
==============================
   Flash map: 2, 1MB (512+512)
  Flash mode: DOUT, [ESP8285]
Reset reason: EXCEPTION (28)

Loading configured firmware (0)
  Address: 001000
Starting firmware 0, map 2 from 001000...


ready
WIFI CONNECTED
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

ERROR
WIFI GOT IP
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

ERROR
AT+TCPCLOSE=0

GPIO reset

hello tried this simple code conected with pullup button (on M1W)
`from machine import Pin
p1 = Pin(18, Pin.IN, Pin.PULL_UP)
while True:
if not p1.value():
print('Button pressed!')

print(p1.value())`
when i pres button Maixpy is reseted...
tried same code on esp32 and works

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.