Chris Cowdery

Trace is impossible on iMXRT1021 with Ethernet and QSPI !

Discussion created by Chris Cowdery on Jun 3, 2020
Latest reply on Jun 3, 2020 by jeremyzhou

I'm going to put this out there - I'm very frustrated with the design of the iMXRT1021.

Specifically, the pin multiplexing options are very poorly designed.

 

My use case is what I would expect to be very common for a processor of this class. I require Ethernet connectivity, and the lowest cost external Flash. This means my Flash is QSPI. I am sure many other designs are similar.

I also run FreeRTOS, which means debugging can be very complex.

 

I have discovered that with my combination, it is IMPOSSIBLE to use the ARM Embedded Trace Module for Debug !

This is for two reasons:

  1. The pin multiplexer allows only 2 of these peripherals to be used at the same time: TRACE, ENET and FlexSPI_A
  2. There is no ETB. So data from the ETM cannot be stored on-chip and output slowly via SWO. SWO can only sample the Program Counter for profiling, it is not fast enough for Instruction Trace.

 

The documentation is extremely poor in this regard, for example, the TRACE pins do not appear in the Reference Manual chapter 9 "External Signals and Pin Multiplexing". They are instead listed separately in chapter 27 "ARM Cortex M7 Platform". And nowhere is there an overall description of what debugging options are available on this part, their limitations, how to use etc. There are instead a number of separate remarks, often referring to ARM documentation.

 

Please forgive my obvious frustration here, but I cannot help but think that the debug infrastructure on this part is badly designed, and hidden behind bad documentation. This translates into many hours and days of wasted time to understand the situation and discover the best debug features are not accessible!

Outcomes