Skip to content

Enable DCache on iMX RT #2537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tannewt opened this issue Jan 21, 2020 · 9 comments
Closed

Enable DCache on iMX RT #2537

tannewt opened this issue Jan 21, 2020 · 9 comments
Labels
Milestone

Comments

@tannewt
Copy link
Member

tannewt commented Jan 21, 2020

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 tannewt added enhancement mimxrt10xx iMX RT based boards such as Teensy 4.x labels Jan 21, 2020
@tannewt tannewt added this to the 6.0.0 milestone Jan 21, 2020
@arturo182
Copy link
Collaborator

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

@hathach
Copy link
Member

hathach commented Jan 21, 2020

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

@arturo182
Copy link
Collaborator

Ouch, maybe Paul could whitelist your IP.

In the meanwhile, here's a screenshot

@jerryneedell
Copy link
Collaborator

@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 #2532

@tannewt
Copy link
Member Author

tannewt commented Jan 21, 2020

Here is the specific post:

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

@hathach
Copy link
Member

hathach commented Jan 22, 2020

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 :)

@tannewt
Copy link
Member Author

tannewt commented Jan 22, 2020

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

@manitou48
Copy link

manitou48 commented Jan 22, 2020

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

@tannewt tannewt modified the milestones: 6.0.0, Long term Jul 14, 2020
@tannewt tannewt changed the title iMX USB is having caching issues Enable DCache on iMX RT Jul 14, 2020
@tannewt
Copy link
Member Author

tannewt commented Mar 9, 2022

This was done in #3522

@tannewt tannewt closed this as completed Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants