|
PebbleOS v4.47.0-1075-g013613c8a
|
RAM driver for an SDRAM on the STM32H7 FMC. More...
Data Structures | |
| struct | pbl_ram_sdram_cas_latency |
| A CAS latency of an SDRAM and the highest clock it allows. More... | |
| struct | pbl_ram_sdram |
| A JEDEC SDR SDRAM. More... | |
| struct | pbl_ram_stm32_fmc |
| SDRAM on the FMC. More... | |
Macros | |
| #define | PBL_RAM_STM32_FMC_DEFINE(sym, _name, _base, _clk, _pinctrl, _addr, _size, _width, _banks, _row_bits, _col_bits, _t_rc_ps, _t_ras_ps, _t_rp_ps, _t_rcd_ps, _t_wr_ps, _t_mrd_ps, _t_xsr_ps, _t_ref_ms, ...) |
| Define an SDRAM on the FMC. | |
RAM driver for an SDRAM on the STM32H7 FMC.
The device brings the SDRAM up when it comes up and keeps it powered and refreshed. Its address gives the FMC bank and the mapping: bank 1 at 0xc0000000 or, swapped, 0x60000000, bank 2 at 0xd0000000 or 0x70000000. The swapped addresses are normal memory, cached and executable by default. The SDRAM clock is the FMC kernel clock divided by 2 or 3, whichever first stays within 100 MHz. The timings and the lowest CAS latency allowed at that clock come from the SDRAM.
| struct pbl_ram_sdram_cas_latency |
| struct pbl_ram_sdram |
A JEDEC SDR SDRAM.
| Data Fields | ||
|---|---|---|
| uint8_t | banks | Internal banks, 2 or 4. |
| const struct pbl_ram_sdram_cas_latency * | cas_latencies | CAS latencies of the speed grade. |
| uint8_t | col_bits | Column address bits, 8 to 11. |
| uint8_t | num_cas_latencies | Number of CAS latencies. |
| uint8_t | row_bits | Row address bits, 11 to 13. |
| uint32_t | t_mrd_ps | Load mode register to the next command, in picoseconds. |
| uint32_t | t_ras_ps | Active to precharge, in picoseconds. |
| uint32_t | t_rc_ps | Active to active of a bank, in picoseconds. |
| uint32_t | t_rcd_ps | Active to read or write, in picoseconds. |
| uint16_t | t_ref_ms | Time in which every row is refreshed, in milliseconds. |
| uint32_t | t_rp_ps | Precharge to active, in picoseconds. |
| uint32_t | t_wr_ps | Write recovery, in picoseconds. |
| uint32_t | t_xsr_ps | Exit self-refresh to active, in picoseconds. |
| uint8_t | width | Data bus width, 8, 16 or 32 bits. |
| struct pbl_ram_stm32_fmc |
SDRAM on the FMC.
| Data Fields | ||
|---|---|---|
| uintptr_t | addr | CPU address of the SDRAM. |
| uintptr_t | base | FMC registers. |
| struct pbl_clk | clk | FMC kernel clock. |
| struct pbl_pinctrl | pinctrl | Pins. |
| struct pbl_ram | ram | RAM device. |
| struct pbl_ram_sdram | sdram | SDRAM. |
| size_t | size | Size of the SDRAM, in bytes. |
| #define PBL_RAM_STM32_FMC_DEFINE | ( | sym, | |
| _name, | |||
| _base, | |||
| _clk, | |||
| _pinctrl, | |||
| _addr, | |||
| _size, | |||
| _width, | |||
| _banks, | |||
| _row_bits, | |||
| _col_bits, | |||
| _t_rc_ps, | |||
| _t_ras_ps, | |||
| _t_rp_ps, | |||
| _t_rcd_ps, | |||
| _t_wr_ps, | |||
| _t_mrd_ps, | |||
| _t_xsr_ps, | |||
| _t_ref_ms, | |||
| ... | |||
| ) |
Define an SDRAM on the FMC.
| sym | Symbol of the device. |
| _name | Name. |
| _base | FMC registers. |
| _clk | FMC kernel clock, from PBL_CLK(). |
| _pinctrl | Default pin control state. |
| _addr | CPU address of the SDRAM. |
| _size | Size of the SDRAM, in bytes. |
| _width | Data bus width, in bits. |
| _banks | Internal banks. |
| _row_bits | Row address bits. |
| _col_bits | Column address bits. |
| _t_rc_ps | Active to active of a bank, in picoseconds. |
| _t_ras_ps | Active to precharge, in picoseconds. |
| _t_rp_ps | Precharge to active, in picoseconds. |
| _t_rcd_ps | Active to read or write, in picoseconds. |
| _t_wr_ps | Write recovery, in picoseconds. |
| _t_mrd_ps | Load mode register to the next command, in picoseconds. |
| _t_xsr_ps | Exit self-refresh to active, in picoseconds. |
| _t_ref_ms | Refresh period, in milliseconds. |
| ... | CAS latencies, each a pbl_ram_sdram_cas_latency initializer. |