RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Enumerations | Functions
init_system.c File Reference

This source file contains parts of the system initialization. More...

#include <stdint.h>
#include <stdbool.h>
#include <bsp/tms570.h>
#include <bsp/tms570-pinmux.h>
#include <bsp/tms570_selftest.h>
#include <bsp/tms570_hwinit.h>

Enumerations

enum  tms570_flash_power_modes { TMS570_FLASH_SYS_SLEEP = 0U , TMS570_FLASH_SYS_STANDBY = 1U , TMS570_FLASH_SYS_ACTIVE = 3U }
 

Functions

void tms570_trim_lpo_init (void)
 Adjust Low-Frequency (LPO) oscilator (HCG:trimLPO)
 
void tms570_flash_init (void)
 Setup Flash memory parameters and timing (HCG:setupFlash)
 
void tms570_periph_init (void)
 Power-up all peripherals and enable their clocks (HCG:periphInit)
 
void tms570_system_hw_init (void)
 TMS570 system hardware initialization (HCG:systemInit)
 

Detailed Description

This source file contains parts of the system initialization.

Enumeration Type Documentation

◆ tms570_flash_power_modes

Enumerator
TMS570_FLASH_SYS_SLEEP 

Alias for flash bank power mode sleep

TMS570_FLASH_SYS_STANDBY 

Alias for flash bank power mode standby

TMS570_FLASH_SYS_ACTIVE 

Alias for flash bank power mode active

Function Documentation

◆ tms570_flash_init()

void tms570_flash_init ( void  )

Setup Flash memory parameters and timing (HCG:setupFlash)

  • Setup flash read mode, address wait states and data wait states
  • Setup flash access wait states for bank 7
  • Disable write access to flash state machine registers
  • Setup flash bank power modes

◆ tms570_periph_init()

void tms570_periph_init ( void  )

Power-up all peripherals and enable their clocks (HCG:periphInit)

  • Disable Peripherals before peripheral powerup
  • Release peripherals from reset and enable clocks to all peripherals
  • Power-up all peripherals
  • Enable Peripherals

◆ tms570_system_hw_init()

void tms570_system_hw_init ( void  )

TMS570 system hardware initialization (HCG:systemInit)

  • Set up flash address and data wait states based on the target CPU clock frequency The number of address and data wait states for the target CPU clock frequency are specified in the specific part's datasheet.
  • Configure the LPO such that HF LPO is as close to 10MHz as possible
  • Wait for PLLs to start up and map clock domains to desired clock sources

◆ tms570_trim_lpo_init()

void tms570_trim_lpo_init ( void  )

Adjust Low-Frequency (LPO) oscilator (HCG:trimLPO)

Initialize Lpo:

Load TRIM values from OTP if present else load user defined values