Skip to content

boards/hifive1: fix CLOCK_CORECLOCK#10805

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
beduino-project:fix-hifive1-coreclock-define
Jan 24, 2019
Merged

boards/hifive1: fix CLOCK_CORECLOCK#10805
aabadie merged 1 commit intoRIOT-OS:masterfrom
beduino-project:fix-hifive1-coreclock-define

Conversation

@pyropeter
Copy link
Copy Markdown
Contributor

Contribution description

  • The CLOCK_CORECLOCK was completely wrong; fixed it

Testing procedure

make BOARD=hifive1 -C tests/leds/

@aabadie aabadie added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports labels Jan 17, 2019
@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jan 17, 2019

I don't have the hardware for testing on hifive1, it would be great if someone could test before merging.

@pyropeter
Copy link
Copy Markdown
Contributor Author

@maribu you seem to be involved with FE310 at the moment... Could you test this?

@maribu
Copy link
Copy Markdown
Member

maribu commented Jan 21, 2019

@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

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jan 21, 2019

Maybe @kenrabold could test?

@kenrabold
Copy link
Copy Markdown
Contributor

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.

@pyropeter
Copy link
Copy Markdown
Contributor Author

CLOCK_CORECLOCK is also used in tests/leds. Thanks for the heads-up regarding the UART driver. I will look into that for SPI.

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change above is OK

proxy-ACK, and go

@aabadie aabadie merged commit 03ed77b into RIOT-OS:master Jan 24, 2019
@aabadie aabadie added this to the Release 2019.01 milestone Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants