Author Topic: i.MX RT1062 (Teensy 4.x) "chip configuration details"?  (Read 2341 times)

0 Members and 1 Guest are viewing this topic.

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6205
  • Country: de
i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« on: October 26, 2021, 05:39:23 am »
The NXP processor i.MX RT1062, which is used on the Teensy 4.x boards, has a neat "crossbar" feature. It lets you hard-wire various input signals (GPIOs or outputs/events generated by on-chip peripherals) to various outputs (GPIOs or inputs to on-chip peripherals). Optionally some basic and/or/invert logic can be applied to the signals via an "AOI module".

This is described in chapters 60..63 of the Processor Reference Manual (login required). But these chapters do not give the actual list of inputs and outputs, stating that they "are application specific and are described in the Chip Configuration details".

The "Chip Configuration details" don't seem to be included in the reference manual (which describes the overall i.MX RT1060 family, but does not mention the RT1062). Any idea where I can find the details for the RT1062? They are not in the chip datasheet either. Thanks for any pointers you might have!
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6205
  • Country: de
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #1 on: October 26, 2021, 05:57:44 am »
Ah right, the information might be available in the software development tools only. This would be my first project with an NXP MCU; I have downloaded MCUXpresso but not used it at all yet. Still exploring the possibilities in the documentation to confirm that this is the right processor platform for me.

I assume the pin/register configuration tool you mention is included in the MCUXpresso IDE?
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6205
  • Country: de
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #2 on: October 26, 2021, 06:47:12 am »
Perfect, thank you! I had not even picked up on the separate Configuration Tool, but this appears to be what I need. Just installed it; I will dig into it tonight.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #3 on: October 26, 2021, 11:55:03 am »
NXP documentation is not always well organized (IMHO, I know others here have different opinions).

This part specifically is a bit confusing.

While the description and register assignment of XBARx can be found in Chapter 61 of the RM, the mapping is half-hidden in chapter "4.6 XBAR Resource Assignments".
Numeric values for the constants are not provided, they should be just the "nn" values at the end of of the symbols in the table (double check in the header file).

I'll refrain to express my opinion on MCUxpresso in polite company.
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: ebastler

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6205
  • Country: de
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #4 on: October 26, 2021, 12:10:46 pm »
Thanks, newbrain! I will check chapter 4.6 once I'm back home tonight. It's not outside the realm of possibility that I have overlooked something in this 3000+ page document.  ::)

At first glance, MCUXpresso seems about as beautiful a piece of software as STM32CubeIDE... (Hey, it's only 60% the syllables, so it must be much simpler, right?)
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #5 on: October 26, 2021, 01:49:07 pm »
At first glance, MCUXpresso seems about as beautiful a piece of software as STM32CubeIDE... (Hey, it's only 60% the syllables, so it must be much simpler, right?)
My doctor told me to stay away from Eclipse, lest my blood pressure skyrockets.

But hey, beauty is in the eye of beholder...

An extract from my stress-relief file (expletives removed):
Quote
It's death by a million papercuts
On a R7 2700X, with NVMe disk and plenty of RAM takes ages to start, and to exit, when compared with full Visual Studio and VS Code (and pretty much anything else- including Quartus!).

Why to uninstall a component I have to click "Installation details" in the About box?
And why the "Installation Details" I click in the Help menu (where also the "About" entry is) brings me to a different window?

Why dark themes are botched (both in Windows and Linux)? It's 2021 FFS!
* Menus for pin routing have blank (but active and valid!) entries. about half the time on Linux, about 10% of the time in Windows
* I have to switch to another tab and back to have the compilation output console display a correct background colour
* Many colour combinations are completely unreadable

Why half the time I restart a debug session it complains a previous one is active when it's not?
And why can't it give the option to stop and restart it when it actually is?

Hovering on a variable brings up a window with its current value, if in scope (sometimes, eh).
Why has the window to be 1000x1000 pixels for an uint8_t variable?

Why if I hit debug, it will start debugging what (I think it thinks) was my last debugged project, and not the project I'm in and just compiled?

The icons would have been OK for Windows 2.0 (3.11 was already nicer looking) and are mostly incomprehensible (especially on High-DPI display).

The preference panels (and many others) have windows with scrollbars inside windows with scrollbars inside...
All the panels are badly sized with respect to their content.
Resizing handles are thin and not obvious.


I just switched to VSC+Cmake+pyOCD(+clang, sometimes) for all my NXP stuff and could not be happier (also, VS Community + VisualGDB).
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: ebastler

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14309
  • Country: fr
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #6 on: October 26, 2021, 04:29:39 pm »
You should check out the SDK.
The SDK source files involved are: fsl_xbara.c,  fsl_xbara.h,  fsl_xbarb.c,  fsl_xbarb.h

You can find an example project in the subdirectory:
boards\evkmimxrt1060\driver_examples\xbara
 
The following users thanked this post: ebastler

Offline ttt

  • Regular Contributor
  • *
  • Posts: 87
  • Country: us
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #7 on: October 27, 2021, 01:22:54 am »
Still exploring the possibilities in the documentation to confirm that this is the right processor platform for me.

Just as a warning: Bringing this platform up from scratch is challenging. It took me about 2 weeks to get a MCUXpresso project up and running to run on the Teensy 4.0. Make sure you understand GCC linker scripts very well.

Other areas of the chip you have to fully understand:

- ITC/DTC/OC RAM https://www.nxp.com/docs/en/application-note/AN12077.pdf
- Configuring the MPU, setting up caches and access rights properly.
- Configuration of ITC/DRC/OC RAM which should be done in the reset vector in tight conjunction with a linker script. Read and understand Section 17 in the MCUXpresso IDE user guide https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf
- Configuring the external Flash device so it can booted from. Requires a NOR config section in your binary.

There are a few bare-metal projects on github. I recommend against using them as they are not complete and will get you on the wrong path as they are based on crummy Arduino code.

Here is the project I recently finished on the Teensy 4.0 which compiles in the MCUXpresso IDE and with CMake: https://github.com/tinic/airpusher-sign-teensy

On the plus side, this MCU is fast. Very fast. And the peripherals are pretty good.
« Last Edit: October 27, 2021, 01:25:38 am by ttt »
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 6205
  • Country: de
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #8 on: October 27, 2021, 05:36:14 am »
Thank you for the additional pointers, SiliconWizard and ttt! I am properly intimidated by the i.MX RT. ;)  It's a complex beast plus a new (to me) programming environment.

Just received a Teensy 4.1 board to play with. I will probably start with some performance tests using inline assembly code within the Arduino environment. (I intend to "abuse" the processor for an emulator/accelerator for legacy CPUs, on a small DIP-40 board that replaces the CPU. Need to check the response time to the host's clock edges first -- with all the caching, pipelining and branch prediction going on in the M7, this might not be as quick as I hope?) In parallel I will try and work my way into bare metal programming. Thank you for the starting point there, ttt!

I am sure I will be back on this forum with more questions...
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14309
  • Country: fr
Re: i.MX RT1062 (Teensy 4.x) "chip configuration details"?
« Reply #9 on: October 27, 2021, 04:43:06 pm »
I am properly intimidated by the i.MX RT. ;)  It's a complex beast plus a new (to me) programming environment.

This is certainly a complex MCU.

Just received a Teensy 4.1 board to play with. I will probably start with some performance tests using inline assembly code within the Arduino environment.

Yeah I've bought a Teensy 4.1 a few months ago and evaluated the RT1062 with it. It's pretty powerful - I actually never had so much processing power in a MCU before.

I would really suggest starting with the NXP SDK instead. There's a ton of examples.
 
The following users thanked this post: ebastler


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf