If I want to take one of the Driver examples for the k64 Tower board (UART/CAN) and run it on my MK24 custom board what files would I need to change? Bare minimum only. Here is an explanation of what I’ve done so far.
Hi alexbodurka,
The picture you have mentioned is correct.
After you create the K24 project. if you want to add the uart code.
You need to add the code in board.c, clock_config.c, pin_mux.c and main.c.
Please don't forget to add the according driver head file include code in the main.c.
After the code modification, just build it.
You can refer to the K64 uart and flexcan demo to write the according file.
If you meet the question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hey kerry, I still can't get the clock settings to work. I created another thread for this
Hi alexbodurka,
Mark already reply your new post.
You can try mark's code, if you still have question, just let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Kerry,
I'm having the same issue Alex had with the clocks. I get the impression Alex abandoned the code in clock_config.c and used Mark's code instead. I'm not yet ready to abandon the generated code and would like to get it to work. I posted a more detailed question on the second thread Alex created but I'm posting here as well to get another set of eyes on this. Any help would be much appreciated.
Hi Ryan,
That post is very old, I suggest you create a new question post by yourself, then we will reply you directly in your own post.
You can give us your detail question information, then we will help you to check it.
If you want I to reply, you can @kerry zhou in your new created post, then I will get the notification, then check you detail question, thank you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I did. That got me pass the while loops but I'm not sure if my bit checking was correct in the while loops. Tested the UART and I now see activity on it but baud rate is way off so that leads me to think there was an issue while setting up the clocks. I verified that my MCG registers are correctly set but what should the MCG->S Status register be at the end of it?