Hi,
I am using MK22FN1M0AVLH12 processor, copy the part code of the No-Block UART example of frdmk22f in V1.3 KSDK. The SW hold at send function, seems that send function can't find the correct ISR.
My question is,
Best Regards,
Kent
Solved! Go to Solution.
I think I have found the reason. The reason is baud rate is wrong in the example, which is caused by "#define DEMO_UART_CLKSRC kCLOCK_BusClk", and get 60M, which cause wrong. If use "#define DEMO_UART_CLKSRC kCLOCK_CoreSysClk", then can fix make the example wrong well.
I am not sure if I use MK22FN1M0AVLH12, may example "\twrk21f120m\driver_examples\uart\interrupt_transfer\kds" is for twrk21f120m.
Hi Kent,
Your problem is mainly caused by the mismatching between your chip and code.
Answer your 3 question in details:
1.Why have the above issue? Should some place define interrupt vector?
If the code and the chip is mismatching, when the code access the area which the hardware don't have, then it may enter in the defaultISR.
2.What evaluationd board is for MK22FN1M0AVLH12? TWR-K21F120M?
You can refer to TWR-K21F120M, but you should better refer to
3.I use wrong code? Not the code from frdmk22f?
You can refer to KSDK2.0 code which can be download from this link:
Welcome to Kinetis Expert | Kinetis Expert
Click build an sdk button, then select the processor like this:
Generate the code ,and download it, you will find the uart code in folder: SDK_2.0_MK22FN1M0Axxx12\boards\twrk21f120m\driver_examples\uart
Wish it helps you!
If you still have 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!
-----------------------------------------------------------------------------------------------------------------------
Kerry,
yes, I creat KSDK V2.0 UART example, do as following,
PC COM tool can receive the data from the board, but have the below question,
Best Regards,
Kent
I think I have found the reason. The reason is baud rate is wrong in the example, which is caused by "#define DEMO_UART_CLKSRC kCLOCK_BusClk", and get 60M, which cause wrong. If use "#define DEMO_UART_CLKSRC kCLOCK_CoreSysClk", then can fix make the example wrong well.
I am not sure if I use MK22FN1M0AVLH12, may example "\twrk21f120m\driver_examples\uart\interrupt_transfer\kds" is for twrk21f120m.