blob: 27bf869f45a220d9b2b4d268ce75bd2ef626a534 [file] [log] [blame]
Armando Montanezec9dd672020-06-05 12:32:51 -07001// Copyright 2020 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14
15#include "pw_boot_armv7m/boot.h"
Ewout van Bekkum712cbfb2020-08-24 11:55:57 -070016#include "pw_sys_io_baremetal_lm3s6965evb/init.h"
Armando Montanezec9dd672020-06-05 12:32:51 -070017
Ewout van Bekkum712cbfb2020-08-24 11:55:57 -070018void pw_boot_PreStaticMemoryInit() {
19 // Force RCC to be at default at boot.
20 const uint32_t kRccDefault = 0x078E3AD1U;
21 volatile uint32_t* rcc = (volatile uint32_t*)0x400FE070U;
22 *rcc = kRccDefault;
23 const uint32_t kRcc2Default = 0x07802810U;
24 volatile uint32_t* rcc2 = (volatile uint32_t*)0x400FE070U;
25 *rcc2 = kRcc2Default;
26}
27
Ewout van Bekkumfff82ec2020-08-21 15:54:28 -070028void pw_boot_PreStaticConstructorInit() {}
Ewout van Bekkum712cbfb2020-08-24 11:55:57 -070029
30void pw_boot_PreMainInit() { pw_sys_io_Init(); }