File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
examples/stm32/f7/stm32f7-discovery/lcd-ram-demo Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
1
tar ext :3333
2
- file lcd_ram_demo .elf
2
+ file lcd-ram-demo .elf
3
3
mon reset halt
4
4
foc c
Original file line number Diff line number Diff line change @@ -103,16 +103,16 @@ void sdram_init(void)
103
103
cr_tmp |= FMC_SDCR_NR_12 ;
104
104
cr_tmp |= FMC_SDCR_NC_8 ;
105
105
106
- /* We're programming BANK 1, but per the manual some of the parameters
107
- * only work in CR1 and TR1 so we pull those off and put them in the
108
- * right place.
106
+ /* We're programming BANK 1
107
+ * Per the manual some of the parameters only work in CR1 and TR1
108
+ * So when using BANK2: we need pull those off and put them in the right place.
109
+ * FMC_SDCR1 |= (cr_tmp); // & FMC_SDCR_DNC_MASK);
110
+ * FMC_SDCR2 = cr_tmp;
109
111
*/
110
- FMC_SDCR1 |= (cr_tmp & FMC_SDCR_DNC_MASK );
111
- FMC_SDCR2 = cr_tmp ; // NEEDED?
112
+ FMC_SDCR1 = (cr_tmp );
112
113
113
114
tr_tmp = sdram_timing (& timing );
114
- FMC_SDTR1 |= (tr_tmp & FMC_SDTR_DNC_MASK );
115
- FMC_SDTR2 = tr_tmp ; // NEEDED?
115
+ FMC_SDTR1 = (tr_tmp );
116
116
117
117
/* Now start up the Controller per the manual
118
118
* - Clock config enable
@@ -135,7 +135,6 @@ void sdram_init(void)
135
135
* set the refresh counter to insure we kick off an
136
136
* auto refresh often enough to prevent data loss.
137
137
*/
138
- //FMC_SDRTR = 683;
139
138
FMC_SDRTR = ((uint32_t )0x0603 ); /* SDRAM refresh counter (100Mhz SD clock) */
140
139
/* and Poof! a 8 megabytes of ram shows up in the address space */
141
140
You can’t perform that action at this time.
0 commit comments