PLL setting and boot problem with FE310-G002

Hi everyone. I’m using Freedom Studio (on windows) to program FE310-G002 on LoFive R1 using a J-Link debugger.

I guess the MCU is running at 16MHz. It’s too slow for me and I’m trying to set up the PLL inside the MCU, but I can’t find any document or example on how to use PLL from the freedom metal library to set a higher clock frequency such as 256MHz.

Besides, the MCU doesn’t run the program after a hardware reset or when powering on. It only works when I load a new program into the SPI flash by JTAG debugger (the program does exist in the flash). I think there is something wrong with the starting sequence inside the ROM memory, which makes the MCU not booting from the SPI flash.

Has anyone here ever encountered these problems? Please let me know your thinking on this.

Thank you!

Edit: I found a solution for the first problem

You either erased the bootloader of your firmware base address doesn’t match the one bootloader expects.

Thank you. I tested with two LoFive R1 modules and the same thing happened. I didn’t mess up with the firmware nor bootloader :slightly_frowning_face:

People in this forum have been talking about checking ROM content by address. However, I can’t find any tools to do that. Do you have any idea about that, @Disasm ?

Update: Now I have one HiFive1 rev b and two LoFive R1 boards. The HiFive1 doen’s have the second problem of booting when debugging on Freedom studio, only those LoFive R1 boards do. But after I debug HiFive1 by Segger IDE, I got the same problem again.