cancel
Showing results for 
Search instead for 
Did you mean: 

MCB-STR9 Conversion to Second Serial Port

arm23
Associate II
Posted on February 23, 2008 at 15:34

MCB-STR9 Conversion to Second Serial Port

4 REPLIES 4
arm23
Associate II
Posted on May 17, 2011 at 09:49

Hi,

I have only just started using ARM9 (STR912FW44X6), and as a learning exercise I decided that I would convert the “measure�? project for the MCB STR9 to run on the other COM port (change of UART and all that this entails).

I understand that, in principle, I have to enable the new UART and various registers and GPINOUTS. I have two problems.

I began by trying to understand the setup as it comes from Keil for the original COM port.

First of all, when I look at the documentation that tells me which pin corresponds with, say, UART0 Tx, it tell me 3.1.

However, the documentation does not seem to explain where the codes below come from. How do you know what to send? What exactly does this mean? Am I missing some other datasheet or manual?

SCU->GPIOOUT[3] = 0x0008; /* P3.1 output UART0 TX */

SCU->GPIOIN[3] = 0x01; /* P3.0 input UART0 RX */

Secondly, I would be grateful if somebody could walk me through the steps of converting over to the second serial port (I do not plan to run the two ports at the same time now). There are three UARTs. For the second serial port, do I use UART1? In addition to going into the configuration wizard and clicking everything to do with the new UART, and figuring out the new codes for the new pins corresponding to that UART, do I need to do anything else?

Thanking You…

arm23
Associate II
Posted on May 17, 2011 at 09:49

Yeah I had that and the ''inisders guide'' from the hitex website as well.

I am still not getting it, just completly lost.

Could somoeone please walk me through it, referring to the specific documents by page number as they go to explain their reasoning. I feel that once i get the system, I will be able to set up anything register-wise in the future, just need help with this initial obstacle!

csp1769
Associate
Posted on May 17, 2011 at 09:49

Hey there,

I felt the same way when I first started using this micro, until I discovered a few documents. Look in the Documents section under the STR9, there are two really useful documents. The

http://www.st.com/stonline/products/literature/rm/13742.pdf

and the

http://www.st.com/stonline/products/literature/um/12238.pdf

. The reference manual basically gives you a description of each register, what its contents are and what it means. It also gives you a breakdown of each peripheral and bunches of other information. The standard firmware library is really nice because it does most of the dirty work and allows you to call upon functions to write to the necessary registers. I believe the MCBSTR9 board includes the standard library in the sample project folder, so you should be set to use it as long as you include the header file in your code ( #include ). The library they provide however I believe is v1.0, so you might want to download the updated version (1.2) from STs site under the documents and files section for the STR9.

If you look in the reference manual, I think you can answer your question as to what those registers mean, very easily. These two documents are a must to read and understand. Good luck. :)

- Corey

csp1769
Associate
Posted on May 17, 2011 at 09:49

You'll also want the

http://www.st.com/stonline/products/literature/ds/13495.pdf

, which has device characteristics but also very importantly it has all of the pin assignments and multiplexed functions of each pin.

-Corey