pdrake : Please help, I am a student & working on KV31F UART1 Rx.
I am using the base code from MCUExpresso SDK for frdmkv31f_demo_app_mc_pmsm
Keeping most of code same I changed following things :
1. Configured UART1 Rx to PTE1 - using Pin configuration.
2. UART1 config
3. reading data using ui8UARTRead = UART_ReadByte(UART1);
4. taking action if ui8UARTRead has certain value.
Please let me know where I am going wrong?
Hereby I am attaching main.c
Please help it will be highly appreciated.
To configure a UART there are a number of steps. Some of the better explanations are in the reference manual(see Functional Description sections of the UART) and the KQRUG(Look in chapter 12).
1) Unfortunately there was no UART support built into this project. If I were you I would look at the project Hello World and copy what they did for the UART. Or Option 2 (MCRSP_PMSM_V1.2.0) below which has full freemaster interface control built in.
So When you create the hello_world project in MCUXpresso IDE check the UART in the SDK Debug Console?
2) As you tried, use the Pins Config Tool to change the pins to be used for the UART both TX and RX. Soon there will be a peripheral tool that will aid you to do all of the setup for the various peripherals.
1) If you are wanting to control a motor and do not have experience with motor control can I suggest using Kinetis Motor Suite.
2) The PMSM demo project in the sdk is a base example that is not outfitted with a freemaster control.
The other place to get a demo and a full motor control reference design is here: MCRSP_PMSM_V1.2.0
I hope this helps
Thank you for your ans.
I could able to make the motor work / control as per my needs. but what I
am trying to achieve is KV31F should receive input on UART and then it
should operate the motor based on received speed.
But I am not able to receive data on UART.