I used TWR-KW24D512 Dev Board.
The OpenSDA chip is programmed the firmware downloaded from segger website.(JLink_OpenSDA_2015-10-13.sda)
The UART 1 is configured to baud rate 115200, 8N1.
But PC fails to tx/rx frames from the dev board from the mini USB port.
Can you help point out what is the cause of the issue?
Thanks!
Hi Lu Wang,
Sorry for my delay. Regarding the problem you're having may be caused by several reasons, however I would recommend to check the jumpers in your board.
This might be the reason you're not getting records.
Please take a look to this link in page 14, you will see the jumpers configuration, specially J17 and J18:
Please let me know if you have further concerns.
Thanks for your response to my issue!
The jumpers are correct.
The question is that I configured MCGCLKOUT uses external reference clock(32MHz) via MCG_C1, and divide value (SIM_CLKDIV1) is set to 1 (divided by 2).
I set the UART module clock to 327678*512 based on the formula in section 53.4.3. And it is not working properly. The baud rate is set to 115200 (8N1).
But the UART works, if I set UART module clock to 32768*460.
Can I know where is the cause of this problem? Is my understanding of the manual correct?
Thanks!
Lu
I hope you’re doing well. Sorry for my delay regarding the formula I am not very sure how did you get the numbers to set the UART. The formula comes from this:
Core Clock is the one you should set this is a known value.
I would check your Core Clock and the Baud rate fine adjust (BRFA).
You can see this information in page 1374 of the MKW2xD Reference Manual.
I hope this information helps.
Please let me know if you have further concerns.
Can you give me a sample code for initializing System Clock and Uart baud rate?
I try to configure System Clock and baud rate via manipulating MCG_C1, OUTDIV1, but they are not working.
Lu
Hello,
I hope you're doing well. I recommend to download KINETIS-SDK: Software Development Kit for Kinetis MCUs.
Software Development Kit for Kinetis MCUs|NXP
Once you have download this, please follow this path for the UART samples:
C:\Freescale\KSDK_1.3.0\examples\twrkw24d512\driver_examples\uart
I hope this information helps.
Hi,
Do you have any simple example to show how the clock is initialized?
The source code is too much to get a quick start…
Lu
Can you give me some sample register values?
I want to set UART baud rate to 115200. And the reference external clock is 32MHz.
Thanks!
Lu