Skip to content

Crash when using flexcomm5 as i2c on LPC5526 #52727

Answered by DerekSnell
RomainPelletant asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @RomainPelletant ,

The clock function returns 0 Hz because the clock signal to Flexcomm5 is not enabled. The clocks are initialized in soc.c. These lines in soc.c are where some other Flexcomm clocks are selected and enabled. The same needs to be done for Flexcomm5.

One option is to modify this soc.c file. However, clock configuration will depend on the board/application. If I were changing this, I would want to control it in my own board file, not in the shared soc.c. Your board file could add another hardware initialization function similar to clock_init(). And you can add your init function to Zephyr's start-up initialization using the SYS_INIT macro. Just be aware of the initializa…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by DerekSnell
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #51003 on December 01, 2022 15:44.