Clarification needed for MK70 DDR control register 21 specification

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clarification needed for MK70 DDR control register 21 specification

193 Views
dodocolby
Contributor I

Hello all, 
I am running into an issue with a MK70FX512VMJ12 controlling the DDR on a legacy board.
We are using MQX. The issue comes from the following line in the bootloader:

ddr->CR21 = 0x00060232;   

I assume that line sets the DDR_CR21 register (as described on the section 34.4.22 of the K70 reference manual) to 0x00060236.
The reference manual states that the register field is split into 2 fields.

31–16 MR1DAT0 Data to program into memory mode register 1 for chip select .
15–0 MR0DAT0 Data to program into memory mode register 0 for chip select .

Most DDR manufacturers call those registers Mode Register (MR or MRS) and Extended Mode Register (EMR1, EMR2, EMR3). Should I assume that data from field 15-0 will be written by the state machine to the DDR's MR (Mode Register) and data from field 31-16 to EMR?

I suspect, and need confirmation from support engineers, that the state machine issues the necessary control signals irrespective of the values set in the DDR_CR21. That is because considering the data I write on bits 31-16 of the DDR_CR21 (0x0006) which assigns 000 to the 3 MSB bits, for proper operation those should be set to 001 as required by DDR specifications.

Note from DDR specs: "The extended mode register is written by asserting LOW on CS#, RAS#, CAS#, WE#, BA1 and HIGH on BA0, while controlling the states of address pins A0 ~ A12."  

dodocolby_0-1765462377582.png

The settings needed for BA2, BA1, and BA0 are '001', while the values I write to DDR_CR21 is '000'.

Does the DDR SDRAM controller overwrites those values set in DDR_CR21 to the correct ones?

Thank you,
dodocolby

 

0 Kudos
Reply
3 Replies

84 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @dodocolby ,

 

Could you please let me know the mask set of your chip? 

As far as I know, mask set 3N96B part has Errata e10521.
 
Also, what version of MQX are you using? I understand that MQX 4.x has an issue concerning the SIM_MCR DDRDQSDIS reset state, this bit needs to be cleared.
 
Although MQX is no longer supported, I noticed that in previous cases they all used 
ddr->CR21 = 0x00040232;  instead of the value you mentioned: 0x00060232.
 
 
That’s why I’m asking the questions above.
 
BR
Celeste
0 Kudos
Reply

25 Views
dodocolby
Contributor I

Hello,
I am using MQX 4.2 and 5N96B.

dodocolby_0-1765990752157.jpeg

We implemented "K70 DDR2 read failure with increasing temperature - NXP Community
K70 DDR2 temperature affect read data - NXP Community", and it seems the device is not sensitive to temperature anymore.

Thank you

 

0 Kudos
Reply

116 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @dodocolby ,

Thanks for using our community. I have noticed your question. I need some time to research before getting back to you. If there are any updates during this period, please feel free to share them anytime.

BR

Celeste

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2260311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EClarification%20needed%20for%20MK70%20DDR%20control%20register%2021%20specification%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2260311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20all%2C%26nbsp%3B%3CBR%20%2F%3EI%20am%20running%20into%20an%20issue%20with%20a%20MK70FX512VMJ12%20controlling%20the%20DDR%20on%20a%20legacy%20board.%3CBR%20%2F%3EWe%20are%20using%20MQX.%20The%20issue%20comes%20from%20the%20following%20line%20in%20the%20bootloader%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eddr-%26gt%3BCR21%20%3D%200x00060232%3B%20%20%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EI%20assume%20that%20line%20sets%20the%20DDR_CR21%20register%20(as%20described%20on%20the%20section%2034.4.22%20of%20the%20K70%20reference%20manual)%20to%200x00060236.%3CBR%20%2F%3EThe%20reference%20manual%20states%20that%20the%20register%20field%20is%20split%20into%202%20fields.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E31%E2%80%9316%20MR1DAT0%20Data%20to%20program%20into%20memory%20mode%20register%201%20for%20chip%20select%20.%0A15%E2%80%930%20MR0DAT0%20Data%20to%20program%20into%20memory%20mode%20register%200%20for%20chip%20select%20.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMost%20DDR%20manufacturers%20call%20those%20registers%20Mode%20Register%20(MR%20or%20MRS)%20and%20Extended%20Mode%20Register%20(EMR1%2C%20EMR2%2C%20EMR3).%20%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3EShould%20I%20assume%20that%20data%20from%20field%2015-0%20will%20be%20written%20by%20the%20state%20machine%20to%20the%20DDR's%20MR%20(Mode%20Register)%20and%20data%20from%20field%2031-16%20to%20EMR%3F%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3EI%20suspect%2C%20and%20need%20confirmation%20from%20support%20engineers%2C%20that%20the%20state%20machine%20issues%20the%20necessary%20control%20signals%20irrespective%20of%20the%20values%20set%20in%20the%20DDR_CR21.%20That%20is%20because%20considering%20the%20data%20I%20write%20on%20bits%2031-16%20of%20the%20DDR_CR21%20(0x0006)%20which%20assigns%20000%20to%20the%203%20MSB%20bits%2C%20for%20proper%20operation%20those%20should%20be%20set%20to%20001%20as%20required%20by%20DDR%20specifications.%3C%2FP%3E%3CP%3ENote%20from%20DDR%20specs%3A%20%3CEM%3E%22The%20extended%20mode%20register%20is%20written%26nbsp%3Bby%20asserting%20LOW%20on%20CS%23%2C%20RAS%23%2C%20CAS%23%2C%20WE%23%2C%20BA1%20and%20HIGH%20on%20BA0%2C%20while%20controlling%20the%20states%20of%20address%20pins%26nbsp%3BA0%20~%20A12.%22%26nbsp%3B%3C%2FEM%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22dodocolby_0-1765462377582.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22dodocolby_0-1765462377582.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22dodocolby_0-1765462377582.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22dodocolby_0-1765462377582.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369549i1B7347B1374B43AA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22dodocolby_0-1765462377582.png%22%20alt%3D%22dodocolby_0-1765462377582.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20settings%20needed%20for%20BA2%2C%20BA1%2C%20and%20BA0%20are%20'001'%2C%20while%20the%20values%20I%20write%20to%20DDR_CR21%20is%20'000'.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%230000FF%22%3EDoes%20the%20DDR%20SDRAM%20controller%20overwrites%20those%20values%20set%20in%20DDR_CR21%20to%20the%20correct%20ones%3F%3C%2FFONT%3E%3C%2FP%3E%3CP%3EThank%20you%2C%3CBR%20%2F%3Edodocolby%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2262829%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clarification%20needed%20for%20MK70%20DDR%20control%20register%2021%20specification%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2262829%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257929%22%20target%3D%22_blank%22%3E%40dodocolby%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20using%20our%20community.%20I%20have%20noticed%20your%20question.%26nbsp%3BI%20need%20some%20time%20to%20research%20before%20getting%20back%20to%20you.%20If%20there%20are%20any%20updates%20during%20this%20period%2C%20please%20feel%20free%20to%20share%20them%20anytime.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2263601%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Clarification%20needed%20for%20MK70%20DDR%20control%20register%2021%20specification%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2263601%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257929%22%20target%3D%22_blank%22%3E%40dodocolby%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ECould%20you%20please%20let%20me%20know%20the%20mask%20set%20of%20your%20chip%3F%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3EAs%20far%20as%20I%20know%2C%20mask%20set%203N96B%26nbsp%3Bpart%20has%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Ferrata%2FKINETIS_3N96B.pdf%3F_gl%3D1*1hne5kl*_ga*NDA5NTg4NjMzLjE3NjU1MzUyMzQ.*_ga_WM5LE0KMSH*czE3NjU4NzY2MTQkbzEzJGcxJHQxNzY1ODc4OTUzJGo0MSRsMCRoMTkxMzQyMTMyMw..%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EErrata%3C%2FA%3E%26nbsp%3Be10521.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3EAlso%2C%20what%20version%20of%20MQX%20are%20you%20using%3F%20I%20understand%20that%20MQX%204.x%20has%20an%20issue%20concerning%20the%20SIM_MCR%20DDRDQSDIS%20reset%20state%2C%20this%20bit%20needs%20to%20be%20cleared.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EAlthough%20MQX%20is%20no%20longer%20supported%2C%20I%20noticed%20that%20in%20previous%20cases%20they%20all%20used%26nbsp%3B%0A%3CDIV%3Eddr-%26gt%3BCR21%20%3D%200x00040232%3B%26nbsp%3B%26nbsp%3B%3CSPAN%3Einstead%20of%20the%20value%20you%20mentioned%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E0x00060232.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EFor%20example%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FKinetis-Microcontrollers%2FK70-DDR2-read-failure-with-increasing-temperature%2Fm-p%2F653967%22%20target%3D%22_blank%22%3EK70%20DDR2%20read%20failure%20with%20increasing%20temperature%20-%20NXP%20Community%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMQX-Software-Solutions%2FK70-DDR2-temperature-affect-read-data%2Fm-p%2F1043539%22%20target%3D%22_blank%22%3EK70%20DDR2%20temperature%20affect%20read%20data%20-%20NXP%20Community%3C%2FA%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EThat%E2%80%99s%20why%20I%E2%80%99m%20asking%20the%20questions%20above.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EBR%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3ECeleste%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E