cancel
Showing results for 
Search instead for 
Did you mean: 

Example UART from ST doesn't work in the bank1

vaclav2
Associate II
Posted on January 30, 2007 at 06:48

Example UART from ST doesn't work in the bank1

5 REPLIES 5
vaclav2
Associate II
Posted on May 17, 2011 at 09:35

Hi

I have the problem with UART0. I work with REVA v2.0 and RIDE IDE 746-P1 (eval.ver. 06.10.22) and STR912FW44.

When I used UART EXAMPLE1 from the ST Library str91xstdlib (with the changes for the REVA board) and I loaded it into the bank0 of STR912, all was going O.K.

But this example doesn't work from bank1. But only UART doesn't work. GPIO pins (LEDs) work well.

The problem is probably at the line

UART_Init(UART0, &UART_InitStructure);

This line stopped my program. I was looking for the error and I mean that the problem is at the line

'' UART_MainClock =(SCU_GetMCLKFreqValue())*1000; '' in UARTInit(....) function.

There is the function '' SCU_GetMCLKFreqValue() '' with the line

'' if ((SCU->CLKCNTR&0x3) == 0x2) return (u32)(_Main_Crystal); ''

This line stopped the running of the program.

GPIO examples of the ST Library work in the bank1 as well as the bank0, only UART don't work.

Is the problem in the Start_up code (crt0_STR91x.s) ?

What is wrong?

[ This message was edited by: Vendelin on 29-01-2007 14:39 ]

amira1
Associate II
Posted on May 17, 2011 at 09:35

Hi Vendelin,

I work with REVA v2.0 and RIDE and the UART example works well when I boot from bank1.

Please find attached the UART project.

Could you send me your start up files if you still have a problem.

Best regards

mirou

[ This message was edited by: mirou on 29-01-2007 18:18 ]

vaclav2
Associate II
Posted on May 17, 2011 at 09:35

Hi Mirou

Thanks you for your help.

I tested your example and I have to tell you that the problem isn't in the C or startup code. When I use the R flasher, boot from bank1 and the function of UART is OK. When I use the CAPS or JTAG standalone, UART doesn't work. Please, can You test the boot from bank1 with using the CAPS and with your example of UART? My project and source files are here.

My settings of the CAPS :

Additional settings Security...............................nothing

Boot flash.....................Secondary Flash

JTAG/ISP ..........................FFFFFFFF

Sector protection ..................nothing

Firmware placement

Main flash.............................nothing

Secondary flash........... 0......1FFF.....uart.hex

OTP seting.......................... nothing

Program device

select region.....................2nd flash + Configuration

select operation..................program/verify

merge MCU firmware................set

select device.............. STR912FW44X6

hardware setup ...........Rlink

Best regards

Vendelin

amira1
Associate II
Posted on May 17, 2011 at 09:35

Hi Vendelin,

Could you please follow these steps in the CAPS:

Additional settings :

boot flash : secondary flash-->apply

Program device :

select region : configuration

select operation : Program only

select device : STR912FW44X6

hardware setup : Rlink

select Merge MCU firmware -->execute

Best regards

mirou

vaclav2
Associate II
Posted on May 17, 2011 at 09:35

Hi Mirou

I haven't problem to load the program into the bank1 and run it.

GPIO example works well when I boot from bank1. Only the peripheral UART doesn't want to go (Program with UART is going but the line '' UART_Init(UART0, &UART_InitStructure);'' stops it).

I attempted this procedure but it had no effect.

I will use RFlasher for my work. ;) It will be OK.

Thanks you for your help.

Regards

P.S Uf. My English isn't best. :-?

[ This message was edited by: Vendelin on 30-01-2007 11:33 ]