Circuitpython: Enable DCache on iMX RT

Created on 21 Jan 2020  路  8Comments  路  Source: adafruit/circuitpython

USB in #2532 is having issues. Like not producing the correct data for CDC and MSC.

https://forum.pjrc.com/threads/59040-CircuitPython-on-Teensy-4!?p=226968#post226968

Will disable the DCache for now and we can fix this and re-enable the DCache after.

enhancement memory optimization mimxrt10xx performance

All 8 comments

I haven't had that issue on the Feathers or evks so I think it might be only on your branch :D

USB in #2532 is having issues. Like not producing the correct data for CDC and MSC.

https://forum.pjrc.com/threads/59040-CircuitPython-on-Teensy-4!?p=226968#post226968

Will disable the DCache for now and we can fix this and re-enable the DCache after.

@tannewt can you sum up the discussion in pjrc forum, seem like they have a strict IP restriction. I tried opera but still cannot pass their firewall.
image

Ouch, maybe Paul could whitelist your IP.

In the meanwhile, here's a screenshot

@hathach in case it is useful to know, I found that I was getting read errors when reading a file from Flash at 2k bytes into the file -- see note in https://github.com/adafruit/circuitpython/pull/2532

Here is the specific post:

Screen Shot 2020-01-21 at 10 26 47 AM

thanks @tannewt @arturo182 @jerryneedell I will try to see if I could help on this issue :) . Another question, where should I find those mentioned scripts raytrace.py and llutm.py .

@arturo182 It is hard to whitelist since my IP is dynamic :)

@manitou48 would you mind posting your scripts you used in testing here?

pystuff.zip
I've attached a zip with the circuitpython test scripts. The scripts ran with with previous release of Teensy4 circuitpython and they run with python3. here are some performance numbers

          sinperf   fact   llutm  toggle   raytrace(32x32)
pyboard     13679    2129    1593    13.9 us   5.384 s   micropython v1.5
STM32F405   13114    1885    1984              5.123 s   micropython v1.11
STM32F405   59997    9995    5005    38.4     24.636 s   circuitpytho
M4          21973    4028    1984    21.4     10.785 s
T4          31006    3662    5371    43.6     13.178 s

            hsquare   wator32x32 pystone    counter
pyboard         82 us   1.2 s      1657       711921   micropython
STM32F405       89      1.0        1891       832431   micropython
STM32F405      258      8.3         329       123321   circuitpython
M4             131      5.5         704       348706
T4             145      4.7         635       222264

FWIW, NXP SDK copies data from FLASH to RAM and Teensy 4 core copies all of FLASH to RAM as part of startup. Most NXP examples disable Dcache (SCB_DisableDCache()). Teensy 4 has functions to clear sections of cache for DMA and IO use. Here is description of memory layout for Teensy 4:
https://www.pjrc.com/store/teensy40.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laurastephsmith picture laurastephsmith  路  4Comments

arturo182 picture arturo182  路  3Comments

timonsku picture timonsku  路  4Comments

kevinjwalters picture kevinjwalters  路  7Comments

wallarug picture wallarug  路  6Comments