i.MX RT1062 (Teensy 4.x) "chip configuration details"? - Page 1
Forum section: electronics / general

author: ebastler
author_rank: Super Contributor
timestamp: October 26, 2021, 05:39:23 am
content: 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 theProcessor 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!

author: ebastler
author_rank: Super Contributor
timestamp: October 26, 2021, 05:57:44 am
content: 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?

author: ebastler
author_rank: Super Contributor
timestamp: October 26, 2021, 06:47:12 am
content: 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.

author: newbrain
author_rank: Super Contributor
timestamp: October 26, 2021, 11:55:03 am
content: 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.

author: ebastler
author_rank: Super Contributor
timestamp: October 26, 2021, 12:10:46 pm
content: 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?)

author: newbrain
author_rank: Super Contributor
timestamp: October 26, 2021, 01:49:07 pm
content: Quote from: ebastler on October 26, 2021, 12:10:46 pmMy 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):QuoteI just switched to VSC+Cmake+pyOCD(+clang, sometimes) for all my NXP stuff and could not be happier (also, VS Community + VisualGDB).

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 26, 2021, 04:29:39 pm
content: You should check out the SDK.The SDK source files involved are: fsl_xbara.c, fsl_xbara.h, fsl_xbarb.c, fsl_xbarb.hYou can find an example project in the subdirectory:boards\evkmimxrt1060\driver_examples\xbara

author: ttt
author_rank: Regular Contributor
timestamp: October 27, 2021, 01:22:54 am
content: Quote from: ebastler on October 26, 2021, 05:57:44 amJust 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 RAMhttps://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 guidehttps://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-teensyOn the plus side, this MCU is fast. Very fast. And the peripherals are pretty good.

author: ebastler
author_rank: Super Contributor
timestamp: October 27, 2021, 05:36:14 am
content: 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...

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 27, 2021, 04:43:06 pm
content: Quote from: ebastler on October 27, 2021, 05:36:14 amThis is certainly a complex MCU.Quote from: ebastler on October 27, 2021, 05:36:14 amYeah 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.