boards/hifive1: fix CLOCK_CORECLOCK#10805
Conversation
|
I don't have the hardware for testing on hifive1, it would be great if someone could test before merging. |
|
@maribu you seem to be involved with FE310 at the moment... Could you test this? |
To be honest: Just by accident. I don't even have a board. Update: Fixed typo |
|
Maybe @kenrabold could test? |
|
Yes, it is fine. That #define is not used anywhere except in the new PR to support SPI. I don't have anything to test that the SPI code works, but the change above is OK. The board.c for the HiFive1 inits the main clock in board_init_clock() and it uses a different #define for the desired clock rate. The UART driver then checks what the board freq is dynamically to compute the clock divider for the selected baud rate. That way the UART doesn't have to rely on getting the clock rate based on a set #define. Perhaps the SPI code can do something similar. |
|
|
aabadie
left a comment
There was a problem hiding this comment.
the change above is OK
proxy-ACK, and go
Contribution description
CLOCK_CORECLOCKwas completely wrong; fixed itTesting procedure