Author Topic: setting up FlexRAM from loader for iMXRT1062  (Read 2454 times)

Offline jackking

  • Newbie
  • *
  • Posts: 31
    • View Profile
setting up FlexRAM from loader for iMXRT1062
« on: July 24, 2022, 04:53:29 PM »
In the guide (page 21): https://www.utasker.com/docs/iMX/MCUXpresso.pdf

It states that FlexRAM can be preconfigured for the application:

Quote
In comparison, this one has the desired FlexRAM configuration:
02f8 // first two bytes specify the length
030805ffffff // specify DTC/ITC and OCR bank sizes to be
pre-configured for the application (when not ff)
ffffffffffffffff
ffffffffffffffff
followed by further ff padding bytes
....
3 banks to be assigned to DTC, 8 to ITC and 5 to OCR

Does the number of banks include the mandatory 512k OCR banks on the 1062?

For example, in my app I have DTC = 512k, ITC = 0k, OCR = 512k
Would the header.txt be?:
Code: [Select]
02f8                   // first two bytes specify the length
0f000fffffff           // specify DTC/ITC and OCR
ffffffffffffffff
ffffffffffffffff

Also, in the example the byte count is shorter by than the blank 0xff padding, is this intentional?
« Last Edit: July 24, 2022, 04:55:55 PM by jackking »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: setting up FlexRAM from loader for iMXRT1062
« Reply #1 on: July 25, 2022, 12:49:48 AM »
Hi

The i.MX RT1062 has 512k FlexRAM and 512k OCRAM2. The 512k OCRAM2 is not part of the FlexRAM and its size and location are fixed.
This means that
0f000f would be referring to only FlexRAM and giving
480k DTC, 0 ITC and 480k OCR, which is not possible as there is not so much FlexRAM.
therefore the question is what you are referring to with your 512k OCR size? If it is the fixed OCRAM2 it is not in the FlexRAM and the FlexRAM setup would be 100000 16 x DTC banks (at 32k each) for a total of 512k DTC, 0 ITC and 0 OTC (with 512k fixed OCRAM2).

The header is 760 bytes in total (required padding size) and the first two bytes are 0x2f8 (760) to indicate its size (in case it were to change at some point). The size entry is therefore a part of the overall padding and so I think that the document is accurate.

Regards

Mark

Offline jackking

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: setting up FlexRAM from loader for iMXRT1062
« Reply #2 on: July 25, 2022, 10:34:40 PM »
Mark, thanks for the quick reply.  Thanks for confirming that the fixed OCRAM was not meant to be represented in the header.