I’ve successfully uploaded the demo_gpio program to the Arty board but the printing over UART is very flaky. I’m getting garbage when I use a baud rate 115200 and it’s better if I use 57600 instead but it prints the message only partially and the formatting is broken. I’ve tried searching the forums for similar issues, but I did not find anything that addresses this problem. Any help is greatly appreciated!
1 Like
The clock of Freedom E300 Arty is now 32.5 MHz. See below two codes.
// See LICENSE for license details.
package sifive.freedom.everywhere.e300artydevkit
import Chisel._
import chisel3.core.{attach}
import chisel3.experimental.{withClockAndReset}
import freechips.rocketchip.config._
import freechips.rocketchip.diplomacy.{LazyModule}
import sifive.blocks.devices.gpio._
import sifive.blocks.devices.spi._
import sifive.fpgashells.shell.xilinx.artyshell.{ArtyShell}
import sifive.fpgashells.ip.xilinx.{IBUFG, IOBUF, PULLUP, PowerOnResetFPGAOnly}
//-------------------------------------------------------------------------
// E300ArtyDevKitFPGAChip
//-------------------------------------------------------------------------
This file has been truncated. show original
But in Freedom E SDK, the clock is defined 65MHz. See below.
//See LICENSE for license details.
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include "platform.h"
#include "encoding.h"
#define CPU_FREQ 65000000
#define XSTR(x) #x
#define STR(x) XSTR(x)
#ifndef VECT_IRQ
#define TRAP_ENTRY trap_entry
#else
#define TRAP_ENTRY vtrap_entry
#endif
extern int main(int argc, char** argv);
extern void TRAP_ENTRY();
This file has been truncated. show original
You can change below.
-#define CPU_FREQ 65000000
+#define CPU_FREQ 32500000
1 Like