libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
sdram.h
Go to the documentation of this file.
1
14//Edit the Linker Script to have the following lines in the following sections:
15/*
16MEMORY
17{
18 SDRAM (RWX) : ORIGIN = 0xC0000000, LENGTH = 64M
19}
20SECTIONS
21{
22
23 .sdram_data :
24 {
25 . = ALIGN(4);
26 _ssdram_data = .;
27
28
29 PROVIDE(__sdram_data_start = _ssdram_data);
30 *(.sdram_data)
31 *(.sdram_data*)
32 . = ALIGN(4);
33 _esdram_data = .;
34
35 PROVIDE(__sdram_data_end = _esdram_data);
36 } > SDRAM AT >FLASH
37 _sisdram_data = LOADADDR(.sdram_data);
38
39
40 .sdram_bss (NOLOAD):
41 {
42 . = ALIGN(4);
43 __ssdram_bss = .;
44 PROVIDE(__sdram_bss_start = _ssdram_bss);
45 *(.sdram_bss)
46 *(.sdram_bss*)
47 . = ALIGN(4);
48 _esdram_bss = .;
49
50
51 PROVIDE(__sdram_bss_end = _esdram_bss);
52
53 } > SDRAM
54}
55*/
56#ifndef RAM_AS4C16M16SA_H
57#define RAM_AS4C16M16SA_H
58#include <stdint.h>
59#include "daisy_core.h"
60
66/*
67 As mentioned above, this does not currently initialize correctly (startup
68 code needs to be modified to init SDRAM, and fill
69 The variables placed here will also need to fit inside of the flash in order to initialize.
70 */
71
74#define DSY_SDRAM_DATA __attribute__((section(".sdram_data")))
75
76
81#define DSY_SDRAM_BSS __attribute__((section(".sdram_bss")))
82
84{
85 public:
86 enum class Result
87 {
88 OK,
89 ERR,
90 };
91
95
96 private:
97 Result PeriphInit();
98 Result DeviceInit();
99 Result PeriphDeInit();
100 Result DeviceDeInit();
101};
102#endif
Definition sdram.h:84
Result DeInit()
Result
Definition sdram.h:87
Result Init()