URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [sw/] [bootloader/] [bootloader.c] - Diff between revs 14 and 21
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 14 |
Rev 21 |
Line 166... |
Line 166... |
**************************************************************************/
|
**************************************************************************/
|
int main(void) {
|
int main(void) {
|
|
|
// ------------------------------------------------
|
// ------------------------------------------------
|
// Processor hardware initialization
|
// Processor hardware initialization
|
|
// - all IO devices are reset and disbaled by the crt0 code
|
// ------------------------------------------------
|
// ------------------------------------------------
|
|
|
// reset system time
|
|
MTIME_LO = 0;
|
|
MTIME_HI = 0;
|
|
|
|
// deactivate unused IO devices
|
|
neorv32_wdt_disable();
|
|
neorv32_pwm_disable();
|
|
neorv32_spi_disable();
|
|
neorv32_trng_disable();
|
|
neorv32_twi_disable();
|
|
|
|
// get clock speed (in Hz)
|
// get clock speed (in Hz)
|
uint32_t clock_speed = SYSINFO_CLK;
|
uint32_t clock_speed = SYSINFO_CLK;
|
|
|
// init SPI for 8-bit, clock-mode 0, MSB-first, no interrupt
|
// init SPI for 8-bit, clock-mode 0, MSB-first, no interrupt
|
if (clock_speed < 40000000) {
|
if (clock_speed < 40000000) {
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.