Hi
I am new in TWR system and I have 2 questions.
1. Is there any available demo for K60N512 for CW10.1? All I found were for IAR compiler
2. I just want to connect the TWR-Serial with the TWR-K60N512 to run a simple RS232
test program with HyperTerminal. I cannot understand how I can accomplish this simple task.
Thanks
Solved! Go to Solution.
Hi, Georgiad,
The pin usage is described in the TWR-K60N512 User's Manual. You can find it online here: http://cache.freescale.com/files/32bit/doc/ref_manual/TWR-K60N512-UM.pdf?fpsp=1
Have a look at the "Input/Output Connectors and Pin Usage Table" and "Tower Elevator Connections" sections.
The TWR-SER uses the UART1 interface from the Primary Connector for the RS232/785 signals. Therefore, the K60 PTC16/17 signals are the RX and TX signals used for this interface.
-mnorman
Georgiad,
The recent release of 10.1 has a brand new implementation of our tool called Processor Expert. Processor Expert has the ability to build physical and logical layer device drivers to your spec. So you can go in and assign the LDD (logical device driver) for the serial port, assign the pins to the proper port and you get a nice clean driver to write or read characters.
What's missing today and is coming soon are a few templates to help you get started with this. A few of us are working on these and will get them out as soon as we can. The code is there in processor expert but may be a bit difficult at first to know without looking at schematics as to which serial port you should use. The templates should help with that.
We'll also have the MQX release for 10.1 out soon, which is a great reference.
You can also look at the IAR MQX version to see how the Tower cards are initialized.
Take a look at www.freescale.com/mqx
I'll encourage the team to post some content for to see to the forum as it comes available.
Again, those that have used Processor Expert in the past will see a new software methodology for generating really clean reference drivers that are RTOS ready.
Cheers
JWW
Thanks JWW for your reply.
I know well Processor Expert because I used it in the past
for the 56807 processor. It is a very good fast development tool.
I have never used the TWR kit and although I have already built a first
application for the K60 which reads the AtoD inputs, I cannot
send the data to the rs232 output because I don't know how to
physically connect the connector on the serial board with the
UARTs of the K60 board. I can solder 2 wires directly on K60 and using
a level shifter read the data with hyper terminal, but then why buy
the serial board?
Thanks
Georgiad,
You are correct the whole point of Tower is so you don't have to do that.
I don't have the Tower K60 docs in front of me right now, but you should be able to glance at the schematics or look at the docs and see which UART is being routed to the tower edge. The TWR-SER then pulls the uart off the elevator backplanes. There are multiple uarts running through the backplanes to assist with having uarts on multiple story cards.
The templates I was referring to would help tell you how it is configured out of the box and it is what the IAR and MQX examples already do. But we dont' have the docs ready yet for the PE side. Coming soon!
Let me see if i can get somebody to post a simplified version.
-JWW
Hi, Georgiad,
The pin usage is described in the TWR-K60N512 User's Manual. You can find it online here: http://cache.freescale.com/files/32bit/doc/ref_manual/TWR-K60N512-UM.pdf?fpsp=1
Have a look at the "Input/Output Connectors and Pin Usage Table" and "Tower Elevator Connections" sections.
The TWR-SER uses the UART1 interface from the Primary Connector for the RS232/785 signals. Therefore, the K60 PTC16/17 signals are the RX and TX signals used for this interface.
-mnorman
Thanks both for the information. I resolved the problem but
Freescale urgently must prepare some examples mostly
for PE and K60. Actually there are few examples only for K40.
Just as an update, there are CW10.1 examples now available for both bare-metal and MQX 3.7
There's even a walk-through of using Processor Expert with MQX in the the second half of the document at C:\Program Files\Freescale\Freescale MQX 3.7\doc\FSL_MQX_3_7_in_CW_10_1.pdf after you install MQX. The Quick Start Lab for the K40/K60 tower boards has also been updated with CW10.1 projects and instructions.
Hi,
Can you please post or send by mail your code (noyasoft@gmail.com)
I have the exact same issue, I need to be able to send few bytes using the TWR-SER module to a terminal, and I can't figure how to set the pins.
Freescales docs and samples are amazingly hard to understand for those WITHOUT MQX.
Thanks,
Eitan.
Hi Eitan
SW has been sent to you.
You can find the UART initialisations in kinetis.c.
- extern void fnRxOn(QUEUE_HANDLE Channel) and
- extern void fnTxOn(QUEUE_HANDLE Channel)
For example,
_CONFIG_PERIPHERAL(A, 2, PA_2_UART0_TX); // UART0_TX on PA2 (alt. function 2)
Regards
Mark
Hi Mark,
Could you please also send me some bare-metal code to send and receive bytes of data through the serial port of the TWR-SER module? jjsafta@gmail.com
I'm new to embedded programming and I'm struggling with finding examples for this simple task.
Many thanks!
Juan
Hi Juan
I have sent you the uTasker Kinetis project.
It is recommended to run the project (simply configure for the K60 tower kit in config.h - activate #define TWR_K60N512 and ensure no other board types are enabled).
This will use UART3 as a command line interface: in app_hw_kinetis.h set the following value to match a COM port (or virtual com port) on your PC (COM 9 is set in the example below):
#define SERIAL_PORT_3 9
Build the project using Microsoft Visual Studio (the free express edition is adequate) which will hook up the PC's COM port to the Kinetis UART simulation (accurate in interrupt driven or DMA driven modes) so that the Kinetis simulator will send and receive on this UART via the COM port (when multiple COM ports are available all Kinetis UARTs can be operated in parallel).
Get to know the UART by setting break points in the UART code or interrupt routine as you communicate to/from it on the PC's COM port. |
Once you are happy with it, build the project using a cross compiler (it will build directly with GCC, Keil, IAR, Rowley Crossworks or CW10) and load to the target to see the same behaviour.
Regards
Mark
Hi Mark,
I am working on TWRk6N512 now with CW.10.5 version. I want to send the data to RS232 on TWR SER. Could you send me the bare metal code also on abdullah.tukl@gmail.com ? It would help me. I have observed it on Process Expert but i need the baremetal code.
Thanks
Hi
The uTasker project includes IAR, uVision, Rowley Crossworks, GCC and CW 10.1 support for the Tower kit with serial extension board and TFT display:
http://www.utasker.com/forum/index.php?topic=1252.0
Regards
Mark
P.S. Developer's details about the UART mapping (page 22/30) and various other practical points (including HW settngs or modification required at TWR kit) are included in the appendix of the following document: http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf