Teensy 4.0., DMA memory to peripheral (schematic)

Status
Not open for further replies.

LuisHS

Well-known member
Hi.
Is it possible to know which are the real ports of the RT1062 on the pins of Teensy 4.0?

I think the board scheme is not yet available, I would also like to know when we can download.

I need to program memory DMA to peripherals (8 GPIO ports), but for that I need the 8 addresses of the ports to be contiguous, so I need to know the real ports of the RT1062 that we have available in the Teensy 4.0 pinout.

Does anyone know if there is an example source available for Teensy 4.0, where I can see the configuration and use of DMA with SPI, and output DMA to several GPIO ports? I was looking at the examples of the new Teensyduino Beta, and I didn't find any.

I want to port the Teensy 3.6 Smartmatrix library to Teensy 4.0, and I essentially encounter the difficulty of using DMA and timers.

regards
 
It's a little annoying, but you can look up the pin ports and indices in the Teensy 4 library files.
core_pins.h on GitHub

A few people in the beta thread have been doing DMA stuff, but I haven't gotten it to work yet (for UART).
 
ok, thanks ecurtz and manitou.

There are two hardware versions, with RT1062 and RT1052?
I installed the latest Beta2 Teensyduino for T4, and I ordered Teensy 4.0 from Antratek, this one seems with RT1062.
 
ok, thanks ecurtz and manitou.

There are two hardware versions, with RT1062 and RT1052?
I installed the latest Beta2 Teensyduino for T4, and I ordered Teensy 4.0 from Antratek, this one seems with RT1062.

The only MCU in Teensy 4.0 is the imXRT 1062 chip!

The 1062 chip evolved to shipping state suitable for quantity deliveries in early 2019 - until then it was not a usable part - but it is now and the only Teensy 4.0 processor.

{ not to be confused with Beta 1 hardware from late 2018 that used the 1052 - none of those are supported or shipping in any fashion beyond those first few Beta1 boards. }
 
As for using DMA with T4 and spi. Look at spi library code. Or look at st7735_t3 library. Or my ili9341_t3n library.
 
As for using DMA with T4 and spi. Look at spi library code. Or look at st7735_t3 library. Or my ili9341_t3n library.

Thanks.
All the DMA sources for Teensy 3.6, are compatible with Teensy 4.0, SPI input and memory to GPIO ?

Do you know some example sources for Teensy 4.0, with interrupts and timers? I tried to compile a Teensy 3.6 source and I got an error with the configuration of the timers.

Regards
 
Thanks.
All the DMA sources for Teensy 3.6, are compatible with Teensy 4.0, SPI input and memory to GPIO ?

Do you know some example sources for Teensy 4.0, with interrupts and timers? I tried to compile a Teensy 3.6 source and I got an error with the configuration of the timers.

Regards

All T4 related (pre release) discussion, including code snippets etc, can be found in the monster thread. Best search in that thread.
 
Thanks.
All the DMA sources for Teensy 3.6, are compatible with Teensy 4.0, SPI input and memory to GPIO ?

Do you know some example sources for Teensy 4.0, with interrupts and timers? I tried to compile a Teensy 3.6 source and I got an error with the configuration of the timers.

Regards

No the DMA is different between most of the different processors. Took a lot of work back then to get T3.6 and T3.5 to work for example in ILI9341_t3n library... There are similarities, but major differences as well.

Things like: On T3.x you SPI to PUSHR register and from POPR registers. On T4, you probably go to TDR and from RDR register. The configuration code is different. Again the register set is completely different. Some good stuff is that the T4 can transfer up to 32 bits per item versus 16 for T3.x...

Again the easiest thing is to look at some of the places that have setup both to get an idea. In some places you will find I am doing stuff a lot different for T4. Example in ILI9341_t3n library, on T3.6, I would setup a chain of 3 or 4 DMASettings to do the transfer. With T4, I do things different, and only setup a chain if two DMASettings each with their own smaller buffer, which I copy parts of the frame buffer into... Why? Because if the frame buffer is in high memory, the values that the DMA transfers send may not match what the memory cache has... There is system calls you can call to flush the cache back to physical memory, which works well for one shot stuff, but had issues when I turned on continuous updates and had the display changing...
 
Again the easiest thing is to look at some of the places that have setup both to get an idea. In some places you will find I am doing stuff a lot different for T4. Example in ILI9341_t3n library, on T3.6, I would setup a chain of 3 or 4 DMASettings to do the transfer. With T4, I do things different, and only setup a chain if two DMASettings each with their own smaller buffer, which I copy parts of the frame buffer into... Why? Because if the frame buffer is in high memory, the values that the DMA transfers send may not match what the memory cache has... There is system calls you can call to flush the cache back to physical memory, which works well for one shot stuff, but had issues when I turned on continuous updates and had the display changing...


OK thanks.
Where can I get those examples or ILI9341_t3n libraries for Teensy 4.0?

I have opened the examples of the latest version of Teensyduino, and when compiling for Teensy 4.0, it gives me these errors:

C:\Users\xxx\Documents\Arduino\libraries\SdFat\src\SpiDriver\SdSpiTeensy3.cpp:23:21: fatal error: kinetis.h: No such file or directory

ILI9341_DMALIB_graphicstet:35: error: 'class ILI9341_t3DMA' has no member named 'dfillScreen'
tft.dfillScreen(ILI9341_BLACK);

ILI9341_DMALIB_graphicstet:178: error: 'class ILI9341_t3DMA' has no member named 'ddrawLine'
for(x2=0; x2<w; x2+=6) tft.ddrawLine(x1, y1, x2, y2, color);

ILI9341_DMALIB_graphicstet:224: error: 'class ILI9341_t3DMA' has no member named 'ddrawFastHLine'
for(y=0; y<h; y+=5) tft.ddrawFastHLine(0, y, w, color1);

ILI9341_DMALIB_graphicstet:225: error: 'class ILI9341_t3DMA' has no member named 'ddrawFastVLine'
for(x=0; x<w; x+=5) tft.ddrawFastVLine(x, 0, h, color2);

ILI9341_DMALIB_graphicstet:241: error: 'class ILI9341_t3DMA' has no member named 'ddrawRect'
tft.ddrawRect(cx-i2, cy-i2, i, i, color);

ILI9341_DMALIB_graphicstet:328: error: 'class ILI9341_t3DMA' has no member named 'dfillTriangle'
tft.dfillTriangle(cx, cy - i, cx - i, cy + i, cx + i, cy + i,



There are no source code examples for Teensy 4.0, to test Timers, interrupts, SPI/DMA and DMA memory to GPIO ??
 
Status
Not open for further replies.
Back
Top